[Seaside-dev] Seaside 3.0a6ish

Paolo Bonzini bonzini at gnu.org
Thu May 20 15:08:35 UTC 2010


[oops we went off list]

On 05/20/2010 04:33 PM, Philippe Marschall wrote:
>>>> Alternatively, _do we need to use percent encoding at all_?
>>>
>>> Yes.
>>
>> So how does it work if I want to link www.google.com/search?q=ė from
>> Seaside?  Currently it will print %17%01 which makes no sense at all.
>
> Might make no sense but is exactly what we have to do because a URL
> must be made out of ASCII characters only because HTTP headers allow
> only ASCII.

But unless it's for a redirect, you don't write HTTP headers, the 
browser does.  So (again unless it's for a redirect) I don't see why 
Seaside should bother about URL encoding, after all HTML doesn't say 
a at href should be only ASCII.

>> I think that should be customizable just like in tomcat.
>
> It is statically, but not dynamically for each URL. The codec has a
> URL codec which might be different. This might bite you if you're
> creating links with non-ASCII characters to two different servers each
> expecting a different URL encoding.

Yeah, instead of having a URL codec in the code, we should have a codec 
and a URL codec _in the application configuration_.  And the latter 
should only be used by #redirectTo: instead of using #seasideString 
(which uses a normal WAHtmlStreamDocument).

This is all stuff for 3.1 of course.

But actually, I don't understand what is the problem with WAUrlEncoder. 
  You call

	super nextPutAll: (codec url encode: aString)

and WAEncoder calls #greaseInteger on each item of its argument.  So it 
works fine with both "each character is really a byte" strings and 
ByteArrays.

Paolo


More information about the seaside-dev mailing list