瀏覽代碼

fix http input

walkor 10 年之前
父節點
當前提交
7a4e97b8f9
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Workerman/Protocols/Http.php

+ 1 - 1
Workerman/Protocols/Http.php

@@ -30,7 +30,7 @@ class Http implements \Workerman\Protocols\ProtocolInterface
             if(preg_match("/\r\nContent-Length: ?(\d+)/", $header, $match))
             {
                 $content_lenght = $match[1];
-                return $content_lenght;
+                return $content_lenght + strlen($header) + 4;
             }
             else
             {