diff --git a/third-party/http-parser/http_parser.c b/third-party/http-parser/http_parser.c
index e315163fbcb0e1ef4499c8ec91fcc2d41935d7dc..0cc16cb69423ee97dea6f9ccd25e30ec543ac46d 100644
--- a/third-party/http-parser/http_parser.c
+++ b/third-party/http-parser/http_parser.c
@@ -1070,10 +1070,13 @@ reexecute:
           case LF:
             parser->http_major = 0;
             parser->http_minor = 9;
-            UPDATE_STATE((ch == CR) ?
-              s_req_line_almost_done :
-              s_header_field_start);
             CALLBACK_DATA(url);
+            if (ch == CR) {
+              UPDATE_STATE(s_req_line_almost_done);
+            } else {
+              UPDATE_STATE(s_headers_almost_done);
+              REEXECUTE();
+            }
             break;
           default:
             UPDATE_STATE(parse_url_char(CURRENT_STATE(), ch));
@@ -1174,7 +1177,12 @@ reexecute:
           goto error;
         }
 
-        UPDATE_STATE(s_header_field_start);
+        if (parser->http_major == 0) {
+          UPDATE_STATE(s_headers_almost_done);
+          REEXECUTE();
+        } else {
+          UPDATE_STATE(s_header_field_start);
+        }
         break;
       }