Fix bug: size of a request header field exceeds server limit

Source: Internet
Author: User

It's really bad to use CMS to find this stuff. It's always a problem with all sorts of kiba.

Sometimes it appears when you browse the Web Page
Bad request
Your browser sent a request that this server cocould not understand.
Size of a request header field exceeds server limit.

Indicates an incorrect request. The server cannot understand how to send a request in your browser. The size of a request header exceeds the server limit.

The following is a solution. However, I personally feel that it is impossible to increase the size of the Request Header without limitation. Therefore, we still need to spend some time clearing the cookie. It must be because there are too many cookie calls, the request header data is too big.

Generally, the request header is too large because too many cookies are set.
This is related to server settings.
The limitrequestline command is used to limit the number of bytes of HTTP Request lines sent by the client. It allows the server administrator to increase or decrease the size of HTTP Request lines allowed by the client. Because the request line includes the HTTP method, Uri, and Protocol version, the limitrequestline command limits the length of the request URI. The server needs this value to be large enough to load all its resource names, including all the information that may be passed in the query in the GET request.
The limitrequestfieldsize command is used to limit the number of bytes in the request header sent by the client, allowing the server administrator to increase or reduce the limit on the size of the HTTP Request Header domain. Generally, the server needs to be large enough to accommodate the size of the header fields of any requests from common clients. The size of a common header domain is very different for different clients. It is generally closely related to configuring their browsers to support more content protocols.
The limitrequestline and limitrequestfieldsize commands give the server administrator greater controllability to control abnormal client request behavior. This helps avoid some forms of DoS attacks. The default value is 8190 ".

Solution:
1. technicians can modify the configuration file.
In the httpd. conf configuration file of Apache, add

 
Limitrequestline 40940Limitrequestfieldsize40940

2. Users can clear cookie records of browsers.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.