HTTP 204 Triggers Retry Flood/DOS
Upon an origin server sending an HTTP 204 response, two chained instances of polipo (one having the other set as its parentProxy) may continually re-request the resource even after the http client has terminated.
This bug is present in the current version from git (commit 11af3996e126fe9042f869869fc1c7dbcdee3546), as well as earlier versions.
Here is the setup/replication, in detail:
env -i make PREFIX=$HOME/polipo-install LOCAL_ROOT=$HOME/polipo-install/www install
Ensure defaults apply
[ -f ~/.polipo ] && mv ~/.polipo ~/.polipo-bak
Invoke each polipo instance in a separate terminal. You will need to kill at least one of them very quickly.
env -i $HOME/polipo-install/bin/polipo logLevel=0xff proxyPort=8801 env -i $HOME/polipo-install/bin/polipo logLevel=0xff proxyPort=8802 parentProxy=127.0.0.1:8801
In a third terminal, request a resource returning an HTTP 204
Curl exits immediately with the following output: """curl: (18) transfer closed with outstanding read data remaining"""
The second polipo(8802) produces no log output.
The first polipo(8801) repeats the following line for every request by the second polipo(8802): """Superseding object http://stackoverflow.com/posts/1938932/ivc/621d (204 -1 -1 (none) -> 204 -1 -1 (none))"""
Until the second polipo(8802) is killed, it will re-request the resource at an extremely high/abusive rate. (12 times in the moment it took me to switch terminals and ctrl-c the second polipo.)
I do not have a capture of the traffic between the polipo instances, but I do have a tcpflow capture of the traffic between the first polipo (8801) and the Stackoverflow web server, as seen by my gateway, which I will attach momentarily.
[Automatically added by flyspray2trac: Operating System: All]