[#837] InteProxy does not forward HTTP/1.0 requests correctly

Date:
2008-11-26 19:45
Priority:
3
State:
Open
Submitted by:
Bernhard Herzog (bh)
Assigned to:
Nobody (None)
Hardware:
none
Product:
none
Operating System:
none
Component:
none
Version:
none
Severity:
none
Resolution:
none
URL:
Summary:
InteProxy does not forward HTTP/1.0 requests correctly

Detailed description
When a client sends a HTTP/1.0 request to InteProxy, InteProxy tries to also send a HTTP/1.0 request to the upstream server. The idea is that this makes forwarding the response to the client easier because the entity body will not have to be changed. For instance, a HTTP/1.1 server might send the response with the "chunked" transfer encoding which the HTTP/1.0 client won't understand, requiring InteProxy to convert this properly.

Under some circumstances, InteProxy sends incorrect HTTP/1.0 requests to the upstream server. E. g. Run InteProxy with demo.cfg and send a request via InteProxy with the following wget command:

wget "http://inteproxy-demo.intevation.org/cgi-bin/frida-wms?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetCapabilities";

The request sent to inteproxy-demo.intevation.org currently looks like this (when sent via a https_proxy):

GET https://inteproxy-demo.intevation.org/cgi-bin/frida-wms?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetCapabilities&user=meier&password=meier HTTP/1.1
content-length: 0
accept: */*
user-agent: Wget/1.10.2

It's a HTTP/1.1 request instead of the intended HTTP/1.0 request and it's missing the required Host: header field. The server correctly responds with a 400 Bad Request.

To correct this, either the Host: header has to be set correctly or it has to be turned into a HTTP/1.0 request. The latter requires some changes to inteproxy/proxyconnection.py which always sends the absolute URL which in HTTP/1.0 is only allowed for requests to proxies.
Message  ↓
Date: 2010-05-11 10:35
Sender: Bernhard Herzog

This was may have been partially fixed with r188 which made sure that the Host: header field was always set.

No attached documents

No changes have been made to this item