You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by bu...@apache.org on 2004/02/08 14:01:08 UTC

DO NOT REPLY [Bug 24891] - raw-request-param returns null when used with cinclude

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24891>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24891

raw-request-param returns null when used with cinclude





------- Additional Comments From m_rolappe@web.de  2004-02-08 13:01 -------
the core problem is: request parameters vs. request attributes regarding
o.a.c.e.Request.get(). docs say:

...
     * Returns the value of the named attribute as an <code>Object</code>,
     * or <code>null</code> if no attribute of the given name exists.
...

HttpRequest, MultipartHttpServletRequest and RawRequestParameterModule assume
request parameters, CommandLineRequest and RequestWrapper assume request attributes.


description of problem in this case: 'cocoon:/testrequest?test=foo+bar+baz'
yields a SitemapSource, the corresponding request is represented by a
RequestWrapper, which internally stores the query string/request params. when
RawRequestParameterModule now tries to obtain the value of parameter 'test' via
request.get() (assuming request parameters), RequestWrapper (assuming request
attributes) just delegates this call to the wrapped request, disregarding the
query string/request paramaters and therefore failing.

the bug could be fixed by changing RequestWrapper's get(), but it would be more
appropriate to fix/clarify the method's contract first.