komuw / ong

ong, is a Go http toolkit.
MIT License
16 stars 4 forks source link

bad host header should return http 404 instead of 400 #341

Closed komuw closed 11 months ago

komuw commented 11 months ago
curl -vkLI -H 'Host: hhhexampleg.com' https://www.example.com
HEAD / HTTP/2
Host: hhhexampleg.com
User-Agent: curl/8.1.1

HTTP/2 404 
content-type: text/html
curl -vkLI -H 'Host: hhhexampleg.com' https://www.google.com 

HEAD / HTTP/2
Host: hhhexampleg.com

HTTP/2 404 
curl -vkLI -H 'Host: hhhexampleg.com' https://www.cloudflare.com

Host: hhhexampleg.com
HTTP/2 403