[Seaside] WAUrl class>>#decodePercent:
philippe.marschall at gmail.com
Thu Aug 29 15:18:05 UTC 2013
On Thu, Aug 29, 2013 at 7:46 AM, jtuchel at objektfabrik.de
<jtuchel at objektfabrik.de> wrote:
> Hi Philippe,
> please find the stacktrace attached. As I mentioned, I am on VA ST, so don't
> be surprised if the trace looks a bit different.
I could find all the information I need.
> What is happening is that Seaside receives an Ajax request with one of its
> parameters containing the String 'test%'.
> was just retrieved from a text input field using its .val() method.
> Removing $% from the string before sending an Ajax request solves the
Ok, so the decoding of this URL fails
If this indeed the raw URL and not already decoded then it is invalid
and can therefore not be decoded.
> encodeURI() would solve it as well, but that brings up a new problem,
> because the String received at the server side then is encoded and has to be
> decoded before it can be processed. AFAIK, VAST cannot do that yet - which
> is another story...
Decoding the URL is exactly what the code throwing the exception tries
to do. Are you sure VAST can't do this? If this is true that should
show up in other places as well like having % in a GET form.
Can you to to /tests/functional/WAInputGetFunctionalTest and enter
'test%' (without '') into "Text Input" and see if that works?
> You may argue that it is never a good idea to not encode Ajax parameters,
> and I have a hard time finding counter arguments. But I think the way the
> error shows up in the end (reading beyond the end of the input stream) is
Yes on both.
> So as Johan already said, maybe the only way to improve things here is to
> throw a better exception.
> I hope I could clarify the point with this message. Please feel free to ask
> if you need more information
Yes it's clear now, thank you.
More information about the seaside