cppalliance / http_proto

HTTP/1 parsing and serialization algorithms using C++11
https://develop.http-proto.cpp.al/
Boost Software License 1.0
23 stars 10 forks source link

Parser must replace obs-fold with SP #58

Open cmazakas opened 9 months ago

cmazakas commented 9 months ago

https://datatracker.ietf.org/doc/html/rfc9112#section-5.2

rfc9112 states:

A server that receives an obs-fold in a request message that is not within a "message/http" container MUST either reject the message by sending a 400 (Bad Request), preferably with a representation explaining that obsolete line folding is unacceptable, or replace each received obs-fold with one or more SP octets prior to interpreting the field value or forwarding the message downstream.

Our parser must adhere to this. Our implementation will opt into replacing the characters with a SP.