Skip to content

Commit b400edb

Browse files
committed
Use connection->end to send response
1 parent 56c4b63 commit b400edb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Protocols/Http.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ public static function input(string $buffer, TcpConnection $connection): int
118118
. '(?:GET|POST|OPTIONS|HEAD|DELETE|PUT|PATCH) +\/[^\x00-\x20\x7f]* +HTTP\/1\.[01]\r\n~i';
119119

120120
if (!preg_match($headerValidatePattern, $header, $matches)) {
121-
$connection->close("HTTP/1.1 400 Bad Request\r\nContent-Length: 0\r\n\r\n", true);
121+
$connection->end("HTTP/1.1 400 Bad Request\r\nConnection: close\r\nContent-Length: 0\r\n\r\n", true);
122122
return 0;
123123
}
124124

0 commit comments

Comments
 (0)