Skip to content

Commit

Permalink
🎨 Http2
Browse files Browse the repository at this point in the history
  • Loading branch information
何平 committed Mar 18, 2024
1 parent 74cbae3 commit 32728c3
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions cloud-admin/Http2/Parser/Http2Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,6 @@ public function parse($data, ServerConnection $connection): void
$this->dataBuffer .= $data;
if (!$this->handsFlag) {
if (strpos($this->dataBuffer, 'HTTP/1.')) { // 初略判断http1 //h2c升级握手升级部分
if ($connection->getTypeName() === 'ssl') {
$this->http2Connection->connection->send("HTTP/1.1 400 Bad Request\r\nContent-Type: text/html;\r\ncharset=utf-8\r\nContent-Length: 19\r\n\r\nnot support http1.x");
return;
}
$headerEndPos = strpos($this->dataBuffer, "\r\n\r\n");
if (!$headerEndPos) {
$this->http2Connection->connection->send("HTTP/1.1 400 Bad Request\r\nContent-Type: text/html;\r\ncharset=utf-8\r\nContent-Length: 19\r\n\r\nnot support http1.x");
Expand Down

0 comments on commit 32728c3

Please sign in to comment.