3 ms·
Not if the server refuses a connection on port 80. addendum: How quickly can a server write a 403 response and close the connection and can it be done before t
by whoopdedo 2y ago
Not if the server refuses a connection on port 80.
addendum: How quickly can a server write a 403 response and close the connection and can it be done before the client is able to write the entire HTTP request? My guess is not fast enough.
- lxgr 2y agoI'd be surprised if most HTTP clients even looked at the response code before writing at least the entire HTTP request (including authentication headers) out to the TCP send buffer. And if they do that, even if they immediately close the TCP socket upon seeing the 403, or even shut down their process, I believe most socket implementations would still write out the queued send buffer (unless there's unread inbound data queued up at the time of unclean socket close, in which case at least Linux would send an RST). And with "TCP fast open", it would definitely not work.