Maximum on HTTP header values?

19sc027田中 1 Reputation point
2022-10-11T02:06:34.807+00:00

Is there an accepted maximum allowed size for HTTP headers? If so, what is it?

Windows development Internet Information Services
{count} votes

1 answer

Sort by: Most helpful
  1. Yurong Dai-MSFT 2,846 Reputation points Microsoft External Staff
    2022-10-11T03:20:39.683+00:00

    Hi @19sc027田中 ,
    HTTP does not define any restrictions. But most web servers do limit the size of the headers they accept. Uncapped HTTP header size keeps the server exposed to attacks and can bring down its capacity to serve organic traffic. Although each web server has some limitations, there are differences. The following are some common web servers:

    IIS - 8K-16K (varies by version)
    Apache - 8K
    Nginx - 4K-8K
    Tomcat - 8K – 48K

    If the header size exceeds this limit, the server will return a 413 Entity Too Large error.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the email notification for this thread.

    Best regards,
    Yurong Dai

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.