Stop parsing headers when switching to unknown protocols#899
Stop parsing headers when switching to unknown protocols#899mkauf wants to merge 1 commit intocurl:masterfrom
Conversation
mkauf
commented
Jun 28, 2016
- unknown protocols probably won't send more headers (e.g. WebSocket)
- improved comments and moved them to the correct case statements
- unknown protocols probably won't send more headers (e.g. WebSocket) - improved comments and moved them to the correct case statements
b379813 to
c8a077a
Compare
|
Can you explain what you are trying to do here, isn't it correct to continue to read headers on 101? For example consider this server response (cribbed from wikipedia) |
|
Exactly, the new protocol doesn't actually start until after the set of HTTP/1 headers. Explained in RFC 7230 section 6.7. But exactly how libcurl should behave in the case of a protocol upgrade to a protocol libcurl doesn't understand has never been defined and documented clearly. |
|
The code that I have changed gets executed after an empty header line (= end of headers) has been read. It's inside the "if" starting at https://github.com/mkauf/curl/blob/c8a077a2ecc12a7b601a00b3531b79c106b4e49e/lib/http.c#L3022 So the
That's right... but probably this protocol does not use HTTP headers (e.g. WebSocket) |