Skip to content

Commit b058b52

Browse files
committed
fix(http): Fix parse HTTP/1.0 in recv_status_line
Signed-off-by: Jianhui Zhao <[email protected]>
1 parent 46680f6 commit b058b52

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

http/client.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ local function recv_status_line(sock, timeout)
8686
return nil, err
8787
end
8888

89-
local code, status = data:match('^HTTP/1.1 +(%d+) +([%w%p ]*)\r?$')
89+
local code, status = data:match('^HTTP/1.[01] +(%d+) +([%w%p ]*)\r?$')
9090
if not code or not status then
9191
return nil, 'invalid http status line'
9292
end

0 commit comments

Comments
 (0)