소스 검색

Merge pull request #4 from AnewG/patch-1

Content-Length 匹配存在bug
walkor 11 년 전
부모
커밋
f50073cf40
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      workerman/Common/Protocols/Http/Http.php

+ 2 - 2
workerman/Common/Protocols/Http/Http.php

@@ -21,7 +21,7 @@ function http_input($http_string)
     {
         // 找Content-Length
         $match = array();
-        if(preg_match("/\r\nContent-Length: ?(\d?)\r\n/", $http_string, $match))
+        if(preg_match("/\r\nContent-Length: ?(\d*)\r\n/", $http_string, $match))
         {
             $content_lenght = $match[1];
         }
@@ -481,4 +481,4 @@ class HttpCache
         }
         @\session_start();
     }
-}
+}