https://issues.apache.org/bugzilla/show_bug.cgi?id=49699
Summary: Inconsistent Keep-alive from proxy to the origin
server.
Product: Apache httpd-2
Version: 2.2-HEAD
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: mod_proxy_http
AssignedTo: [email protected]
ReportedBy: [email protected]
Created an attachment (id=25836)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=25836)
Captured packets (can be opened by tcpdump, Wireshark, etc.)
Symptom:
If the (forward-)proxy receives "Connection: Keep-alive" request from client,
it sends "Connection: Keep-alive" to the origin server as well. But the proxy
closes the connection to the origin server immediately after it receives the
response (or after it sends response to the client).
[Initially found on 2.2.11 and confirmed with 2.2.16]
The possible negative impact of the symptom:
The origin server would expect the upcoming HTTP request in the persistent
connection. So the sudden close of connection may cause a confusion on the
origin server.
Workaround:
If the Keep-alive to the origin server is disabled ("SetEnv proxy-nokeepalive"
in httpd.conf), then there is no chance that the proxy confuses the origin
server with "Connection: Keep-alive".
However, I don't know how can we enable Keep-alive (without immediate closing
the connection) to the origin server.
How to reproduce:
1. Turn on forward proxy feature with the following httpd.conf, and run httpd.
---
ProxyRequests On
<Proxy *>
Allow from all
</Proxy>
---
2. Run tcpdump (or anything equivalent) to monitor the packets.
# tcpdump -i any -s 0 -w 0.cap tcp port 80
3. Use telnet to send a request:
$ telnet localhost 80
GET http://httpd.apache.org:80/ HTTP/1.1
Host: httpd.apache.org:80
Connection: Keep-Alive
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]