If a mist server gets a request without a host header, then the acceptor crashes and the server sends an empty response. The server should instead send a 400 response.
The logs from the server are
WARN Missing HTTP `host` header
EROR label=Supervisor(ChildTerminated) report=[Supervisor(Local(atom.create("glisten_connection_supervisor$1220"))), #(atom.create("errorContext"), ChildTerminated), Reason("Missing HTTP `host` header"), Offender([Pid(//erl(<0.142.0>)), Id(0), Mfargs(#(atom.create("gleam@otp@factory_supervisor"), StartChildCallback, Undefined)), RestartType(Temporary), Significant(False), Shutdown(5000), ChildType(Worker)])]
and the output of curl --verbose --header "Host:" localhost:8000 is
[...]
* Request completely sent off
* Empty reply from server
* Closing connection
curl: (52) Empty reply from server
If a mist server gets a request without a
hostheader, then the acceptor crashes and the server sends an empty response. The server should instead send a 400 response.The logs from the server are
and the output of
curl --verbose --header "Host:" localhost:8000is