What Is the Difference Between Http 408 and 504 Errors?

What Is the Difference Between Http 408 and 504 Errors?

These are both timeout errors, but who is timing out in a 408 vs. a 504?

From w3, 408 is defined as:

The client did not produce a request within the time that the server was prepared to wait. The client MAY repeat the request without modifications at any later time.

...And 504 is:

The server, while acting as a gateway or proxy, did not receive a timely response from the upstream server specified by the URI (e.g. HTTP, FTP, LDAP) or some other auxiliary server (e.g. DNS) it needed to access in attempting to complete the request.

So who is the 'client' in the 408 if not an intermediary server? If it's an actual end user, how does a server know to wait for their request before they have made it?

4

2 Answers

The client is the browser or client application. The server knows to wait for a request because it has accepted a connection, or already read part of the request, say a header or two.

1

Amazon documentation tells:

Indicates that the client cancelled the request or failed to send a full request

Mozilla documentation tells:

The HTTP 408 Request Timeout response status code means that the server would like to shut down this unused connection. It is sent on an idle connection by some servers, even without any previous request by the client

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Marcus Vance
Author

Marcus Vance

Marcus Vance is a cybersecurity auditor and technology writer dedicated to educating the public about online safety, data privacy regulations, enterprise security, and emerging cyber threats.