-
-
Notifications
You must be signed in to change notification settings - Fork 217
Closed
Description
The api.h says on_status_complete can return HPE_PAUSED to pause the parser:
Lines 44 to 47 in fdc5e1c
| /* Possible return values 0, -1, `HPE_PAUSED` */ | |
| llhttp_cb on_message_complete; | |
| llhttp_cb on_url_complete; | |
| llhttp_cb on_status_complete; |
But the return values from on_status_complete is not respected.
The test is broken too:
llhttp/test/response/pausing.md
Lines 52 to 73 in fdc5e1c
| ### on_status_complete | |
| <!-- meta={"type": "response", "pause": "on_status_complete"} --> | |
| ```http | |
| HTTP/1.1 200 OK | |
| Content-Length: 3 | |
| abc | |
| ``` | |
| ```log | |
| off=0 message begin | |
| off=13 len=2 span[status]="OK" | |
| off=17 status complete | |
| off=17 len=14 span[header_field]="Content-Length" | |
| off=32 header_field complete | |
| off=33 len=1 span[header_value]="3" | |
| off=36 header_value complete | |
| off=38 headers complete status=200 v=1/1 flags=20 content_length=3 | |
| off=38 len=3 span[body]="abc" | |
| off=41 message complete | |
| ``` |
It's passing because of wrong assertion. There's not pause line in the log.
Metadata
Metadata
Assignees
Labels
No labels