httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Danijel <>
Subject [users@httpd] HTTP/0.9 and mod_proxy
Date Thu, 01 Oct 2009 14:25:11 GMT

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

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-Host: localhost:4080
	X-Forwarded-Server: localhost

	<html><head/><body>AS2 Adapter is alive.</body></html>

Also I've looked into the code:

    while (received_continue) {

        len = ap_getline(buffer, sizeof(buffer), rp, 0);
        if (len == 0) {
            /* handle one potential stray CRLF */
            len = ap_getline(buffer, sizeof(buffer), rp, 0);
        if (len <= 0) {
            backend->connection = NULL;
            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
                          "proxy: error reading status line from remote "
                          "server %s", p_conn->name);
            return ap_proxyerror(r, HTTP_BAD_GATEWAY,
                                 "Error reading from remote server");

So, the error is raised when len is <= 0. So, why is len <= 0 with the input


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