[users@httpd] POST encoding

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi

I use Apache httpd and mod_rewrite as a reverse proxy between an IIS and end-users. When filling forms, strings sent from the browser to the proxy via a POST transaction are not encoded the same way compared to the strings sent directly from the browser to IIS. Here is an example bellow. As one can see, the string "téléphone" is encoded "t%E9l%E9phone" when sent to IIS and "t%C3%A9l%C3%A9phone" when sent to the Apache proxy. To my knowlegde, %E9 is a normal UTF-8 encoding for é, but I don't understand the encoding used by Apache nor does it works well with the Web application (it displays strange symbols). I thought it might be a content negociation problem and I set the parameters "DefaultLanguage fr" and "AddDefaultCharset Off". I also have all the AddLanguage and AddCharset. Anyone has an idea of what could be wrong ?

Thanks a lot,

Matthieu

----- From Browser to IIS -----
Hypertext Transfer Protocol
    POST /save.asp HTTP/1.1\r\n
        Request Method: POST
        Request URI: /save.asp
        Request Version: HTTP/1.1
    Host: MyIisHostname\r\n
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.0.3) Gecko/20060426 Firefox/1.5.0.3\r\n
    Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5\r\n
    Accept-Language: fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3\r\n
    Accept-Encoding: gzip,deflate\r\n
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\n
    Keep-Alive: 300\r\n
    Connection: keep-alive\r\n
    Referer: http://MyIisHostname/edit.asp\r\n
    Cookie: ASPSESSIONIDSQDCDQTD=OFEFAOMAEJGINAJBFPAHDGOD\r\n
    Content-Type: application/x-www-form-urlencoded\r\n
    Content-Length: 41\r\n
    \r\n
Line-based text data: application/x-www-form-urlencoded
    MyVar=t%E9l%E9phone

----- From Browser to Apache reverse proxy -----
Hypertext Transfer Protocol
    POST /save.asp HTTP/1.1\r\n
        Request Method: POST
        Request URI: /save.asp
        Request Version: HTTP/1.1
    Host: 10.xx.yy.iis\r\n
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.0.3) Gecko/20060426 Firefox/1.5.0.3\r\n
    Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5\r\n
    Accept-Language: fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3\r\n
    Accept-Encoding: gzip,deflate\r\n
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\n
    Referer: http://10.xx.yy.proxy/edit.asp\r\n
    Cookie: ASPSESSIONIDSQDCDQTD=NFEFAOMACGFIOFAAMIDEJLNH\r\n
    Content-Type: application/x-www-form-urlencoded\r\n
    Max-Forwards: 10\r\n
    X-Forwarded-For: 10.xx.yy.browser\r\n
    X-Forwarded-Host: 10.xx.yy.proxy\r\n
    X-Forwarded-Server: ProxyHostname\r\n
    Content-Length: 53\r\n
    \r\n
Line-based text data: application/x-www-form-urlencoded
    MyVar=t%C3%A9l%C3%A9phone



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux