Overview

This topic describes how to handle the issue that HTTP status code 413 is returned for GET requests?

Problem description

If the header size of a GET request exceeds 10 KB, HTTP status code 413 is returned.

Cause

  • If you deploy Anti-DDoS Pro or Anti-DDoS Premium, WAF, SLB instance, and ECS instance in sequence, HTTP status code 413 is returned. You can query the error in the browser debugging mode.
  • If the SLB instance uses a TCP listener, HTTP status code 413 is returned when client_max_body_size of NGINX is set to a very small value.
  • If you modify the hosts file to redirect requests to ECS instances, HTTP status code 413 is returned. It means that the issue is caused by incorrect configurations of NGINX.

Solution

Set client_max_body_size based on the following limits:
  • Anti-DDoS Pro or Anti-DDoS Premium: 800 MB
  • WAF: 3 MB
  • SLB: 50 GB

Application scope

  • Anti-DDoS Pro and Anti-DDoS Premium