httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Computa Computa <cc_apache_...@yahoo.fr>
Subject [users@httpd] Re : [users@httpd] POST encoding
Date Wed, 24 May 2006 10:15:00 GMT
I thank you for this first answer. Actually, there were prior connections between the browser
and the proxy or webserver. To an initial request, the webserver answers :
    HTTP/1.1 200 OK\r\n
        Request Version: HTTP/1.1
        Response Code: 200
    Date: Mon, 22 May 2006 14:22:06 GMT\r\n
    Server: Microsoft-IIS/6.0\r\n
    Content-Length: 249\r\n
    Content-Type: text/html\r\n
    Set-Cookie: ASPSESSIONIDQSACDQSC=IJFBEEOAADNHGKOIPFHDLMFE; path=/\r\n
    Cache-control: private\r\n

and the proxy answers :
    HTTP/1.1 200 OK\r\n
        Request Version: HTTP/1.1
        Response Code: 200
    Date: Mon, 22 May 2006 14:22:26 GMT\r\n
    Server: Microsoft-IIS/6.0\r\n
    Content-Type: text/html;charset=utf-8\r\n
    Set-Cookie: ASPSESSIONIDQSACDQSC=HJFBEEOAJNDDKDJEACOBCMML; path=/\r\n
    Cache-control: private\r\n
    Transfer-Encoding: chunked\r\n
    Content-Language: fr\r\n
    \r\n
    HTTP chunked response

As you can see, advertisement differs between the 2 : among others, Apache added "charset=utf-8\r\n"
in its Content-Type.
The beavior is the same both with Mozilla (win and linux) and IE. There is no caching an Apache...

I just can't see where is the solution to this problem of encoding. There's clearly a difference
in the content with and without the Apache reverse proxy but I don't know what to change in
my configuration !

Matthieu


----- Message d'origine ----
De : Axel-Stéphane  SMORGRAV <Axel-Stephane.SMORGRAV@europe.adp.com>
À : users@httpd.apache.org; Computa Computa <cc_apache_org@yahoo.fr>
Envoyé le : Mercredi, 24 Mai 2006, 11h22mn 32s
Objet : RE: [users@httpd] POST encoding

There must be something more to this, because there is no reason why the user agent should
encode differently depending on the server to which the request is sent. At the time the request
is sent, the browser does not even know what kind of server it is sending the request to,
and reverse proxies are completely transparent to the browser. It is only when it receives
the response that it knows what kind of server handled it (Server header), and that would
be IIS anyway (unless the response was served by an Apache cache). Content negociation is
end-to-end - not hop-by-hop.
 
Cdt
-ascs
 
________________________________

From: Computa Computa [mailto:cc_apache_org@yahoo.fr] 
Sent: Tuesday, May 23, 2006 12:36 PM
To: users@httpd.apache.org
Subject: [users@httpd] POST encoding


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 <http://MyIisHostname/edit.asp%5Cr%5Cn>

    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 <http://10.xx.yy.proxy/edit.asp%5Cr%5Cn>

    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




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org





Mime
View raw message