Преглед на файлове

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();
     }
-}
+}