Welcome! Log In Create A New Profile

Advanced

RE: nginx doesn't handle different URL encodings well

Pierre-Marie Baty
October 21, 2010 05:14PM
> From: edhoprima@gmail.com
> Date: Thu, 21 Oct 2010 23:45:06 +0700
> To: nginx@nginx.org
> Subject: Re: nginx doesn't handle different URL encodings well
>
> On Thu, Oct 21, 2010 at 8:57 AM, helen <nginx-forum@nginx.us> wrote:
> > On Wed, 20 Oct 2010 21:23:46 -0400, Pierre-Marie Baty wrote:
> >
> >> When the URL is Latin-1 encoded, the request sent is : GET
> >> /%e9t%e9-2008.jpg ----> nginx resolves this to "été-2008.jpg", the
> > file
> >> is served, OK
> >> When the URL is UTF-8 encoded, the request sent is : GET
> >> /%C3%A9t%C3%A9-2008.jpg ----> nginx resolves this to
> > "été-2008.jpg",
> >> and the file is not served. (file not found)
> >
>
> except that it works the exact reverse in my side. Are you sure the
> filename for the file in the filesystem stored in utf-8 format?
>
> setting LANG to en_US.UTF-8 may help. (eg. "LANG=en_US.UTF-8 ls" in a
> bash shells)

Thanks for the tip. I followed your advice and tried many locale combinations today.

Unfortunately none of them helped. I can't use UTF-8 as locale because FreeBSD's FFS has no support for multibyte filenames. So if I want the system "ls" command to output "été-2008.jpg" and not something weird, I have to use one of the 8-bit locales. Currently my LANG is fr_FR.ISO8859-15 (same as Latin-1 plus the €uro sign).

OK, let's sum up :

- nginx does no translation and the URL is directly passed as a request to the filesystem
- the new standards say that URLs are going to be sent UTF-8 encoded
- UTF-8 is a multibyte encoding scheme
- my server's filesystem support several encoding schemes but not multibyte ones, and thus it doesn't support UTF-8.

I guess I'll have to go down the painful URL rewrite way. What a pity...

I'm quite new to nginx. Could someone suggest me a config file syntax to do this ?

--
Pierre-Marie Baty
_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

nginx doesn't handle different URL encodings well

Pierre-Marie Baty October 20, 2010 09:28PM

Re: nginx doesn't handle different URL encodings well

helen October 20, 2010 09:57PM

Re: nginx doesn't handle different URL encodings well

helen October 20, 2010 10:32PM

Re: nginx doesn't handle different URL encodings well

Maxim Dounin October 21, 2010 03:34AM

RE: nginx doesn't handle different URL encodings well

Pierre-Marie Baty October 21, 2010 10:32AM

Re: nginx doesn't handle different URL encodings well

Maxim Dounin October 21, 2010 11:16AM

Re: nginx doesn't handle different URL encodings well

edogawaconan October 21, 2010 12:52PM

RE: nginx doesn't handle different URL encodings well

Pierre-Marie Baty October 21, 2010 05:14PM

Re: nginx doesn't handle different URL encodings well

Maxim Dounin October 21, 2010 07:28PM

Re: nginx doesn't handle different URL encodings well

edogawaconan October 21, 2010 08:44PM

RE: nginx doesn't handle different URL encodings well

Pierre-Marie Baty October 22, 2010 04:28AM

RE: nginx doesn't handle different URL encodings well

Pierre-Marie Baty October 22, 2010 05:34AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 172
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready