Skip to content

Commit cc97b99

Browse files
authored
Merge pull request php-pm#542 from mathieudz/disable_keepalive
Block keep-alive in HTTP 1.1
2 parents d307593 + 63757d0 commit cc97b99

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"symfony/error-handler": "^4.4|^5",
1010
"symfony/process": "^3.4|^4|^5",
1111
"react/event-loop": "^1.0",
12-
"react/http": ">=1.0 <1.3",
12+
"react/http": "^1.0",
1313
"react/stream": "^1.0",
1414
"react/socket": "^1.0",
1515
"react/child-process": "^0.6",

src/RequestHandler.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,8 @@ public function handleData($data)
122122
$remoteAddress = (string) $this->incoming->getRemoteAddress();
123123
$headersToReplace = [
124124
'X-PHP-PM-Remote-IP' => \trim(\parse_url($remoteAddress, PHP_URL_HOST), '[]'),
125-
'X-PHP-PM-Remote-Port' => \trim(\parse_url($remoteAddress, PHP_URL_PORT), '[]')
125+
'X-PHP-PM-Remote-Port' => \trim(\parse_url($remoteAddress, PHP_URL_PORT), '[]'),
126+
'Connection' => 'close'
126127
];
127128

128129
$buffer = $this->replaceHeader($this->incomingBuffer, $headersToReplace);

0 commit comments

Comments
 (0)