Webmastersite.net
Register Log In

Bad Request Error

Comments on Bad Request Error

Jenny
Forum Regular

Usergroup: Customer
Joined: May 11, 2003

Total Topics: 64
Total Comments: 199
Jenny
Posted Aug 15, 2005 - 1:25 PM:

starting this evening I am no longer able to access my gallery (http://www.nicole-media.com/images/index.php) I don't know if it works for you, but I get this error:

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


Cookie: wsnuser=1; wsnpass=04710be4a203489d6c22268f20969dc9; votes=++++++[...]; linksread=%5BEND%5D7337%5B%2C%5D1123928524%5BEND%5D7443%5B%2C%5D1123930469%5BEND%5D7463%5B%[...]; wsnuser=1; wsnpass=04710be4a203489d6c22268f20969dc9; votes=+++++[...]; linksread=%5BEND%5D7337%5B%2C%5D1123928524%5BEND%5D7443%5B%2C%5D1123930469%5BEND%5D7463%5B%2C%[...]

the whole thing is a looooot longer
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Aug 15, 2005 - 5:32 PM:

That means there's too much cookie data, usually caused by the linksread cookie (which tracks all the images you've viewed). It looks like the problem that was in older versions of WSN but was fixed maybe 6 to 10 months ago. Yet you're using 2.14 there and I've never seen it happen in a version that recent. Maybe you have multiple installs sharing a cookie path contibuting cookies? That'd make the allowed bytes (I think it's 9000 or something) fill up faster.

Open commonfuncs.php. You should have a function like this (may differ a little since this is 2.24):

function makecookie($name, $value, $duration = '')
{
// in order to prevent apache errors, don't allow any cookie to exceed 3000 bytes. kill it if it does.
global $settings, $thismember, $cookienames, $debug;
if ($name == $cookienames['id'] || $name == $cookienames['password']) $duration = $thismember->cookieduration;
if (!$duration) $duration = time() + $settings->cookieduration;
if (!$duration) $duration = time() + 86400; // if setting is myteriously blank, make it a day
if ($duration == 'session') $duration = 0; // let expire with session if desired
if ($debug == 1) echo "<p>Setting cookie with name $name, value $value and duration $duration</p>";
// fix IE 6 default requirement of privacy policy for cookies
header("P3P: CP=\"CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE\" policyref=\"". $settings->cookiepolicy ."\"");
if ($settings->cookiepath != '' || $settings->cookiedomain != '')
{
if (strlen($value) > 3000) setcookie($name, " ", 1, $settings->cookiepath, $settings->cookiedomain);
else setcookie($name, "$value", $duration, $settings->cookiepath, $settings->cookiedomain);
}
else
{
if (strlen($value) > 3000) setcookie($name, " ", 1);
else setcookie($name, "$value", $duration);
}
return true;
}


Change the instances of "if (strlen($value) > 3000)" to "if (strlen($value) > 500)" and see if that helps.
Jenny
Forum Regular

Usergroup: Customer
Joined: May 11, 2003

Total Topics: 64
Total Comments: 199
Jenny
Posted Aug 17, 2005 - 2:25 AM:

I did that, but there's no change so far. I even checked to manually delete all related cookies, but there are none.

I'm using WSN Gallery at /images and WSN Links at /downloads using the same member database. Maybe that's the problem?

BTW, is that error visitor specific or is everyone seeing it?
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Aug 17, 2005 - 6:18 PM:

It's visitor specific, I'm seeing the page fine. It has to be cookies, based on that and the error. So you must not have deleted all of the cookies.

The function above would only help if you get to a page where it tries to add cookies, so I suppose when you can't reach the site at all it doesn't help.
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



This thread is closed, so you cannot post a reply.