This topic is locked

Bad Request

9/1/2010 3:36:21 PM
PHPRunner General questions
V
vytb author

Hi,
The apps produced using PHPR v 5.2 (only!) show an error on some or all 'add' pages:
Bad Request. Your browser sent a request that this server could not understand. Size of a request header field exceeds server limit. Cookie:...
Is this really a problem on the server side (support guys are not quick to accept it) or something related to PHPR?

Sergey Kornilov admin 9/1/2010

It looks it really hits request size limit. You have to wait to see what server guys say.

V
vytb author 9/2/2010



It looks it really hits request size limit. You have to wait to see what server guys say.


In fact, the issue is the following. Does PHPR version 5.2 manages the cookies the way they may exceed the default settings of most servers/browsers (4KB ?)? After deleting the cookies the problem disappears for some time and then is back again.
The server guys say:
your application is sending too much data in the header/cookie that causes the limit error.
There are two parameters that can be set in the apache config, but it is going to affect others, and it is not advisable to make any changes to it just to accommodate your case ( http://httpd.apache.org/docs/2.2/mod/core.html#limitrequestline )

In fact, you should work on a more portable code set by reducing the data in the cookie to fit in the default settings of most servers/browsers:

http://developer.yahoo.com/performance/rules.html

http://php.net/manual/en/function.setcookie.php
http://objects4php.com/php_cookies_above_the_stateless_protocol.php

Sergey Kornilov admin 9/2/2010

Default size seems to 8kb.
Anyway, it's hard to see anything specific without seeing the actual application. If you need help with this let us know where we can see and troubleshoot this issue.
Just in case - using Firefox with Firebug and FireCookie you can see what actual cookies are being sent.