HTTP

HTTP 307 Temporary Redirect vs 499 Client Closed Request

HTTP 307 (Temporary Redirect) is a 3xx Redirection response, while 499 (Client Closed Request) is a 4xx Client Error response. 307 indicates that the resource temporarily resides at a different URL. Unlike 302, this guarantees the HTTP method will NOT be changed. In contrast, 499 means that a non-standard status code used by Nginx when the client closes the connection before the server responds.

Description

The resource temporarily resides at a different URL. Unlike 302, this guarantees the HTTP method will NOT be changed.

When You See It

When you need a temporary redirect that preserves the request method (POST stays POST).

How to Fix

Follow the Location header using the same HTTP method.

Description

A non-standard status code used by Nginx when the client closes the connection before the server responds.

When You See It

In Nginx logs when clients timeout or navigate away before receiving the response.

How to Fix

Optimize server response times. Check for slow upstream services.

Key Differences

1.

307 is a 3xx Redirection response, while 499 is a 4xx Client Error response.

2.

HTTP 307: The resource temporarily resides at a different URL. Unlike 302, this guarantees the HTTP method will NOT be changed.

3.

HTTP 499: A non-standard status code used by Nginx when the client closes the connection before the server responds.

4.

You encounter 307 when when you need a temporary redirect that preserves the request method (POST stays POST).

5.

You encounter 499 when in Nginx logs when clients timeout or navigate away before receiving the response.

When to Use Which

For 307 (Temporary Redirect): Follow the Location header using the same HTTP method. For 499 (Client Closed Request): Optimize server response times. Check for slow upstream services.

Learn More