You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by imrezol <im...@gmail.com> on 2010/12/10 13:54:13 UTC

URIEncoding problem ver 6.0.29 64 bit on windows

Hi!

I set URIEncoding="UTF-8" at http connector  in server.xml:

<Connector port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" URIEncoding="UTF-8"/>

restart tomcat service and after that type an url with special charaters
like this:

http://localhost:8080/mywebapp/docs/Felhasználói_kézikönyv.pdf<http://localhost:8080/mywebapp/docs/Felhaszn%C3%A1l%C3%B3i_k%C3%A9zik%C3%B6nyv.pdf>

and I get a 404 error message:

*description* *The requested resource
(/*mywebapp*/*docs*/Felhaszn%C3%A1l%C3%B3i_k%C3%A9zik%C3%B6nyv.pdf)
is not available.*

If I do the same settings with 6.0.29 32 bit verison, it's work fine.

Thank:

    Zoltan Imre*
*

*
*

Re: URIEncoding problem ver 6.0.29 64 bit on windows

Posted by André Warnier <aw...@ice-sa.com>.
imrezol wrote:
> Hi!
> 
> I set URIEncoding="UTF-8" at http connector  in server.xml:
> 
> <Connector port="8080" protocol="HTTP/1.1"
>                connectionTimeout="20000"
>                redirectPort="8443" URIEncoding="UTF-8"/>
> 
> restart tomcat service and after that type an url with special charaters
> like this:
> 
> http://localhost:8080/mywebapp/docs/Felhasználói_kézikönyv.pdf<http://localhost:8080/mywebapp/docs/Felhaszn%C3%A1l%C3%B3i_k%C3%A9zik%C3%B6nyv.pdf>
> 
> and I get a 404 error message:
> 
> *description* *The requested resource
> (/*mywebapp*/*docs*/Felhaszn%C3%A1l%C3%B3i_k%C3%A9zik%C3%B6nyv.pdf)
> is not available.*
> 
> If I do the same settings with 6.0.29 32 bit verison, it's work fine.
> 
Hi.

That's an interesting question.
Before we tackle this, can you answer this question, precisely :
When you mention trying this with a 32-bit and a 64-bit version "of Tomcat", do you mean 
that you tried this on the exact same machine, with the same version of Tomcat, and with 
the exact same .pdf file under /mywebapp ?

(I am quoting "of Tomcat" above, because Tomcat itself would be the same, being Java code. 
  It is the JVM which is different)(which may already give a hint).

I consider the question interesting, because personally, I have always found this 
"URIEncoding" attribute rather questionable, in the HTTP and URI RFC sense.

As I understand the specs, this attribute should not exist.  A HTTP server should take the 
URI as it comes, decode it as per the uri-encoding/decoding scheme, and then just use the 
*byte* result 'as is' to locate the resource on disk.  It should not second-guess the 
client's intent.





---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: URIEncoding problem ver 6.0.29 64 bit on windows

Posted by imrezol <im...@gmail.com>.
Sorry, it was my mistake.
On 64 bit version webapp name was MyWebApp
On 32 bit version webapp name was mywebapp

On Fri, Dec 10, 2010 at 13:54, imrezol <im...@gmail.com> wrote:

> Hi!
>
> I set URIEncoding="UTF-8" at http connector  in server.xml:
>
> <Connector port="8080" protocol="HTTP/1.1"
>                connectionTimeout="20000"
>                redirectPort="8443" URIEncoding="UTF-8"/>
>
> restart tomcat service and after that type an url with special charaters
> like this:
>
> http://localhost:8080/mywebapp/docs/Felhasználói_kézikönyv.pdf<http://localhost:8080/mywebapp/docs/Felhaszn%C3%A1l%C3%B3i_k%C3%A9zik%C3%B6nyv.pdf>
>
> and I get a 404 error message:
>
> *description* *The requested resource (/*mywebapp*/*docs*/Felhaszn%C3%A1l%C3%B3i_k%C3%A9zik%C3%B6nyv.pdf)
> is not available.*
>
> If I do the same settings with 6.0.29 32 bit verison, it's work fine.
>
> Thank:
>
>     Zoltan Imre*
> *
>
> *
> *
>
>
>