Size of a request header field exceeds server limit

size of a request header field exceeds server limit safari
curl your browser sent a request that this server could not understand
limitrequestfieldsize
your browser sent a request that this server could not understand. laravel
haproxy size of a request header field exceeds server limit
ohs size of a request header field exceeds server limit
apache failed to read request header line
400 bad request your browser sent an invalid request.

i have android app send JSON data to php web service running on WAMP Server.

when i send many records via JSON, i have an error:

"Bad Request 
Your browser sent a request that this server could not understand. 
Size of a request header field exceeds server limit."

i was changed the configuration in php.ini like upload_max_file_size to 64M and upload_max_filesize to 64M

How i can solve that please ?


It is because your http web service (apache?) does not allow requests with data more than LimitRequestFieldSize parameter (default is 8190 bytes)

Seems that one of your JSON request is too big or summ of Cookies data is too large and web service block it.

By the way increasing LimitRequestFieldSize is not a good idea, because of risk of DOS attacks.

Try to minimize/clear your cookies, or simplify Json request.

I keep getting: Bad Request Your browser sent a request that this , Size of a request header field exceeds server limit(print page). 5 replies; 10 have this problem; 66730 views; Last reply  The LimitRequestFieldSize directive allows the Web server administrator to reduce or increase the limit on the allowed size of an HTTP request header field. SPNEGO authentication headers can be up to 12392 bytes.


You try incrase LimitRequestFieldSize option httpd.conf or .htaccess file.

Usage is here: apache docs

400 Bad Request, Cookie Too Large, How do I fix 400 Bad Request request header or cookie too large? Size of a request header field exceeds server limit." This issue began several weeks ago and following "help" suggestions has not corrected the issue. What is needed to solve the problem?


if you need to transfer big data (between APIs with JSON in your case for example), rather than using a GET request and posting the data in headers, use POST request and send the data in body.

With POST, you can still use headers to validate tokens or small data but again post the big JSON data that will not fit in headers within POST body.

Here is a complete system for you to POST JSON data with PHP:

### Sender PHP Side:
# Core function that sends big data with POST:
function curl_post($url, $header, $data){
    $CURL = curl_init();
    curl_setopt($CURL, CURLOPT_URL, $url);
    curl_setopt($CURL, CURLOPT_POST, TRUE);
    curl_setopt($CURL, CURLOPT_HTTPHEADER, $header);
    curl_setopt($CURL, CURLOPT_POSTFIELDS, $data);
    curl_setopt($CURL, CURLOPT_RETURNTRANSFER, TRUE);
    $result = curl_exec($CURL);
    $http_code = curl_getinfo($CURL, CURLINFO_HTTP_CODE);
    curl_close($CURL);
    return array($http_code, $result);
}

# Prepare your data and send:
$url = "https://example.com/api.php";
$header = array(
    "Content-Type: text/html",
    "verify: <your fixed code to verify the request is legit>",
    "anything: <you can send anything with headers here but the text you send should be SMALL>"
);
list($http_code, $result) = curl_post($url, $header, json_encode($your_big_data));
echo "http_code: $http_code<br>result: $result";

###########################

### Receiver PHP Side: (api.php in our example)
if (function_exists("apache_request_headers")) {$myHeaders = apache_request_headers();}

# See the headers you posted from other side:
print_r($myHeaders);

# See the JSON POST body you posted from other side:
echo file_get_contents('php://input');

Here's How To Fix Request Header Or Cookie Too Large Error, This indicates that the Kerberos Token Size of the users Kerberos token exceeds the limit of the Apache web server. This token is sent as request header field  In the Add Header dialog box, enter the HTTP header and the maximum size that you want for the header limit, and then click OK. For example, the "Content-type" header contains the MIME type for a request. Specifying a value of 100 would limit the length of the "Content-type" header to 100 bytes.


Bad Request, Size of a request header field exceeds server limit. IBM HTTP Server Error.log shows the following message: "request failed: error reading the  This entry was posted in Software, Windows and tagged 400 Bad Request, chrome, cookies, exceeds server limit, firefox, google chrome, internet explorer, your browser sent a request that this server could not understand. size of a request header field exceeds server limit.


Request Header Field Size Exceeds Limit for Web server, Size of a request header field exceeds server limit." Solution. First, check the website URL you entered to make sure it is correct. If the web  Size of a request header field exceeds server limit." i was changed the configuration in php.ini like upload_max_file_size to 64M and upload_max_filesize to 64M How i can solve that please ?


Web Browsers, Size of a request header field exceeds server limit. Details. Accessing Websites, Windows. Upvote (56) Subscribe  Apache – “Size of a request header field exceeds server limit” Posted on July 19, 2016 by Sysadmin SomoIT. Symptoms. When trying to access to one of my published websites, the browser shows the following error: