Nginx convert UTF8 request to ISO-8859-1
etienne.champetier at free.fr
etienne.champetier at free.fr
Tue Sep 24 20:19:51 UTC 2013
Hi,
IE8 (maybe also IE9/IE10) doesn't auto encode url (firefox do), and can make utf8 requests
If you put "http://<nginx-server>/?test=ééé" in the address bar, the é will not
be html encoded, and will be sent encoded in utf8 (c3a9 in hex, i've checked with wireshark)
The problem is that the fastcgi backend (mono webapp, unix socket)
get the é in ISO-8859-1 (e9 in hex, i've checked with socat)
Is it normal that nginx (1.4.1) convert the request encoding from UTF8 to ISO-8859-1?
Is there a workaround (linux/nginx conf)? (haven't found any yet)
What the RFCs are saying? (HTTP request encoding, Fastcgi param encoding)
I'm not using rewrite in nginx, i'm just passing the request to
a fastcgi unix socket.
(I will provide a minimal test conf/do more tests tomorrow)
To reproduce:
Request: curl -O "http://<nginx-server>/?test=ééé"
Request capture: sudo tcpdump -X 'port 80'
Backend capture: sudo socat -t100 -x -v UNIX-LISTEN:/path/to/sock,mode=777,reuseaddr,fork UNIX-CONNECT:/path/to/sock.original
http://superuser.com/questions/484671/can-i-monitor-a-local-unix-domain-socket-like-tcpdump
Thanks in advance
Etienne
More information about the nginx
mailing list