I am working on a very simple web server.
Till now I haven't found how to disable the annoying requests for favicon.ico from chrome.
So I was thinking what's the shortest/fastest answer to such a request. Is it ok just to disconnect after the request for favicon.ico is identified. Or is that considered impolite behaviour and should be avoided?
Alternativly I would send a 404 message. Do I need to send a text as well or do I have to send at least the information "content-length: 0" or can I even leave this?
Thank you!
According to RFC 2616, the shortest valid response would be
HTTP/1.0 404 <CRLF>
<CRLF>
There should be a space between 404
and the line terminator, actually separating the status code from the status reason message (which is an empty string in this case). This might not be strictly required, but I doubt saving a single byte is worth the minor deviation from the RFC.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With