Browse Source

Merge pull request #4 from AnewG/patch-1

Content-Length 匹配存在bug
walkor 11 years ago
parent
commit
f50073cf40
1 changed files with 2 additions and 2 deletions
  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();
     }
-}
+}