nodejs / http-parser

http request/response parser for c

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Parsing trailers

Chuongv opened this issue · comments

I noticed that when the http-parser parses trailers, it does not call the on_headers_complete after the trailers have been parsed. It instead goes to on_message_complete

Is that the intended behavior? Was not sure if my implementation is wrong or if this is expected.

Yes, that's the expected behavior. on_headers_complete signals the transition from headers to body, on_message_complete from body or trailing headers to end-of-message.

Sweet thanks, that aligns with what I am seeing.