Skip to content

Commit

Permalink
Switch off keep-alive semantics by setting NO_KEEPALIVE=true in envir…
Browse files Browse the repository at this point in the history
…onment
  • Loading branch information
thekid committed Jul 6, 2017
1 parent 526cf72 commit 700427b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ Web change log

## ?.?.? / ????-??-??

## 0.6.1 / 2017-07-07

* Added `NO_KEEPALIVE` environment variable to switch off keep-alive
semantics. This might be causing problems with certain proxy setups
(@thekid)

## 0.6.0 / 2017-07-07

* Changed logging to contain full stack trace of exceptions - @thekid
Expand Down
2 changes: 1 addition & 1 deletion src/main/php/xp/web/HttpProtocol.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public function handleData($socket) {
} finally {
$response->flushed() || $response->flush();

if ('Keep-Alive' === $request->header('Connection')) {
if ('Keep-Alive' === $request->header('Connection') && !getenv('NO_KEEPALIVE')) {
$request->consume();
} else {
$socket->close();
Expand Down

0 comments on commit 700427b

Please sign in to comment.