瀏覽代碼

Fixed request parsing regex typo

Maksim Kolinichenko 7 年之前
父節點
當前提交
d26ee03613
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      httplib.h

+ 1 - 1
httplib.h

@@ -1528,7 +1528,7 @@ inline bool Server::parse_request_line(const char* s, Request& req)
 
     std::cmatch m;
     if (std::regex_match(s, m, re)) {
-        req.version = std::string(m[4]);
+        req.version = std::string(m[5]);
         req.method = std::string(m[1]);
         req.target = std::string(m[2]);
         req.path = detail::decode_url(m[3]);