joakim verona wrote:

Thanks Chris,

As you might suspect I'm new to the cocoon internals and will try to make a better patch according to your comment.

Some other questions:
- Do you think it should still be "RawRequestParameterModule" or should it be a new module?
- I guess I dont understand how this module would be used in an Upload scenario. Do you have any pointers?

I think this should be turned into a generic MetaModule (URLEncodingMetaModule), and not restrict it to just request parameters. That way, we can hook any other inputmodule into it. This would also open the need for a URLDecodingMetaModule.



Just my $0.02.


Tony


/Joakim


Christian Haul wrote:

joakim verona wrote:

Hello list,

This is a patched version of RawRequestParameterModule so that it returns URLencoded request parameters.

The docs say that whats this module is supposed to do, and I'm shure it did/does in some circumstances.

I'm trying to do a proper patch entry in bugzilla to, but I thought the patch might be discussed here first.



* RawRequestParameterModule accesses request parameters without * decoding or casting. It uses the get() method instead of the getParameter()



return java.net.URLEncoder.encode((String)obj);



Doing the cast contradicts the comment and breaks the use for uploads. You need to check for an instance of String first and re-encode it only if it is a String IIUC.


Chris.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]




--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to