Alvaro Coronel wrote:
> Hello there.
>
> I have been trying the WebDAV servlet that comes with Resin, and found the
> following problem:
>
> using Resin (2.0.4, 2.0.5 or 2.1) on Windows 2000 with Java 1.3 and Explorer
> 5.5, I try to move a file called "Aņo" (year in spanish) to the web folder.
> I get an HTTP 400 error with the message string "Bad Request The URL
> contains escaped bytes unsupported by the utf-8 encoding."
>
> I have been looking at the source code. The exception seems to be thrown in
> the
> normalizeUriEscape() method of the com.caucho.server.http.Invocation class.
>
> The request to the servlet was "HEAD /cm/webdav/a%F1o2002 HTTP/1.1".
>
> I really donīt know how to follow from here. Is MS Explorer character
> encoding broken? anyone can offer any pointers I can use to carry on
> investigating?
You need to change the <character-encoding> in the resin.conf (or web.xml).
Resin uses UTF-8 encoding to interpret URLs by default. The example you
give uses Latin-1 to encode the ñ in the URL. The configuration
would look like:
<web-app id='/'>
<character-encoding>ISO-8859-1</character-encoding>
You could also use Latin-1 instead of ISO-8859-1; they're synonyms
Unfortunately, HTTP assumes both browser and server have agreed
beforehand on which character set to use, so Resin needs to guess.
-- Scott
>
> TIA
>
> Alvaro Coronel
>
Received on Wed 03 Apr 2002 08:11:44 -0800
This archive was generated by hypermail 2.1.8 : Thu Sep 28 2006 - 20:17:01 PDT