hpcloud / HPCloud-PHP

PHP Bindings for HP Cloud
hpcloud.github.io/HPCloud-PHP
MIT License
23 stars 12 forks source link

Disable HTTP 1.1 connection keep-alive #7

Closed meeuw closed 11 years ago

meeuw commented 11 years ago

As [1] states: If this value is set to 1.1 it is your responsibility to be 1.1 compliant.

PHP doesn't support Connection: keep-alive and feof will wait until the timeout of the webserver it reached (5 seconds for Apache).

This patch adds Connection: close to the headers of PHPStreamTransport to prevent keep-alive for HTTP 1.1 requests.

  1. http://www.php.net/manual/en/context.http.php#context.http.protocol-version
technosophos commented 11 years ago

I agree that this is the right thing to do for the PHP stream transport.

technosophos commented 11 years ago

Thank for for the pull request. Sorry it took us so long to respond.