httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Krist van Besien <>
Subject Re: [users@httpd] HTTP/0.9 and mod_proxy
Date Fri, 02 Oct 2009 13:10:19 GMT
On Thu, Oct 1, 2009 at 4:25 PM, Danijel <> wrote:
> Hi,
> I have to reverse proxy a beast which speaks HTTP/0.9. The documentation
> to mod_proxy says:
>        This module implements a proxy/gateway for Apache. It implements
>        proxying capability for FTP, CONNECT (for SSL), HTTP/0.9,
>        HTTP/1.0, and HTTP/1.1.
> The configuration simply is:
>        ProxyPass / http://backend:9110/
> But all I get is error 502. The log says:
>        error reading status line from remote server backend

You get this error because the backend didn't send a status line.
Apache is behaving exactly as designed here.

> The tcpdump between Apache and the backend looks like this:
>        GET /test HTTP/1.0
>        Host: backend:9110
>        User-Agent: curl/7.15.1 (x86_64-suse-linux) libcurl/7.15.1
>        OpenSSL/0.9.8a zlib/1.2.3 libidn/0.6.0
>        Accept: */*
>        Max-Forwards: 10
>        X-Forwarded-For:
>        X-Forwarded-Host: localhost:4080
>        X-Forwarded-Server: localhost
>        <html><head/><body>AS2 Adapter is alive.</body></html>

Your problem is that apache expects a http/1.0 response to an HTTP/1.0
request. Because the response does not conform to HTTP/1.0 it is
rejected. Thus the 502 error.

Apache will proxy HTTP/0.9 just fine. Just repeat your test with a
HTTP/0.9 client and you'll see. Apache does not translate between
HTTP/1.0 and HTTP/0.9. It would anyway not be easy to do this. So if
you send a HTTP/1.0 request to your forward proxy it will forward a
HTTP/1.0 request to the backend.


Bremgarten b. Bern, Switzerland
A: It reverses the normal flow of conversation.
Q: What's wrong with top-posting?
A: Top-posting.
Q: What's the biggest scourge on plain text email discussions?

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message