thaisnishimoto / 42sp_Webserv

1 stars 0 forks source link

Validate Header Field Host #7

Open iuryr opened 4 days ago

iuryr commented 4 days ago

Item 3.2 do RFC 9112

A client MUST send a Host header field ( Section 7.2 of [HTTP]) in all HTTP/1.1 request messages. If the target URI includes an authority component, then a client MUST send a field value for Host that is identical to that authority component, excluding any userinfo subcomponent and its "@" delimiter (Section 4.2 of [HTTP] ). If the authority component is missing or undefined for the target URI, then a client MUST send a Host header field with an empty field value. A server MUST respond with a 400 (Bad Request) status code to any HTTP/1.1 request message that lacks a Host header field and to any request message that contains more than one Host header field line or a Host header field with an invalid field value.



Parsing Requirements