cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 35811] - [html block] HTMLGenerator doesn't copy POST parameters
Date Thu, 06 Oct 2005 11:49:01 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=35811>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=35811





------- Additional Comments From wojtek@biela.pl  2005-10-06 13:48 -------
/at the GT2005 Hackaton/

There would be still a need for a proper test cast/scenario for this issue.
Nevertheless a short exploration of the HTMLGenerator lead to two conclusions in
the subject of passing POST parameters (in addition to GET parameters) passed to
the Cocoon request that invoked this generator.

1. there is a chance of exceeding the GET request size limit that some servers
might still have. this chance also exists in the current implementation of the
HTMLGenerator as it concatenates the URI params from the Cocoon request and the
params in the src attribute passed to the generator in the sitemap

2. at first you might want to change the implementation of HTMLGenerator in a
simple manner, by changing: 

query.append(request.getQueryString());

to a loop iterating over the request.getParameterNames() and
request.getParameterValues()

BUT! this might lead to trouble as the request there is a Cocoon wrapper for the
real HTTPServletRequest object, and it's getParameterValues() implementation 
decodes this array of parameters before returning them. this might not be an
issue for the English language, but for many European languages this might break
the resulting URL. 

So the second conclusion is actually a tip that this "bug" (or call it a
restriction) can be overcome by adding a getRawParametersValues() method to the
request wrapper that simply returns the HTTPServletRequest.getParameterValues()
and iterating this array in the HTTPGenerator.setup instead of the
getQueryString() call.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

Mime
View raw message