浏览代码

Merge pull request #125 from const-volatile/master

 Without Reason-Phrase read_response_line regex fails #124
yhirose 7 年之前
父节点
当前提交
e7e9ec616f
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      httplib.h

+ 1 - 1
httplib.h

@@ -2024,7 +2024,7 @@ inline bool Client::read_response_line(Stream& strm, Response& res)
         return false;
     }
 
-    const static std::regex re("(HTTP/1\\.[01]) (\\d+?) .+\r\n");
+    const static std::regex re("(HTTP/1\\.[01]) (\\d+?) .*\r\n");
 
     std::cmatch m;
     if (std::regex_match(reader.ptr(), m, re)) {