Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Bad Request in safari on mac


mortal

Recommended Posts

Hi. we get this error when we use safari on mac to browser the webpage

 

 

Bad Request Your browser sent a request that this server could not understand. Size of a request header field exceeds server limit. Cookie: __utma=237072066.1612165039.1260349373.1260349373.1260349373.1; __utmz=237072066.1260349373.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); vbulletin_collapse=forumbit_1%0Afunction%20%28iterator%2C%20context%29%20%7B%0A%20%20%20%20var%20index%20%3D%200%3B%0A%20%20%20%20iterator%20%3D%20iterator.bind%28context%29%3B%0A%20%20%20%20try%20%7B%0A%20%20%20%20%20%20this._each%28function%28value%29%20%7B%0A%20%20%20%20%20%20%20%20iterator%28value%2C%20index++%29%3B%0A%20%20%20%20%20%20%7D%29%3B%0A%20%20%20%20%7D%20catch%20%28e%29%20%7B%0A%20%20%20%20%20%20if%20%28e%20%21%3D%20%24break%29%20throw%20e%3B%0A%20%20%20%20%7D%0A%20%20%20%20return%20this%3B%0A%20%20%7D%0Afunction%20%28number%2C%20iterator%2C%20context%29%20%7B%0A%20%20%20%20iterator%20%3D%20iterator%20%3F%20iterator.bind%28context%29%20%3A%20Prototype.K%3B%0A%20%20%20%20var%20index%20%3D%20-number%2C%20slices%20%3D%20%5B%5D%2C%20array%20%3D%20this.toArray%28%29%3B%0A%20%20%20%20while%20%28%28index%20+%3D%20number%29%20%3C%20array.length%29%0A%20%20%20%20%20%20slices.push%28array.slice%28index%2C%20index+number%29%29%3B%0A%20%20%20%20return%20slices.collect%28iterator%2C%20context%29%3B%0A%20%20%7D%0Afunction%2........

it goes on 6 times as much

 

 

does anyone have a solution for this ?

Link to comment
Share on other sites

Hi. we get this error when we use safari on mac to browser the webpage

 

 

Bad Request Your browser sent a request that this server could not understand. Size of a request header field exceeds server limit. Cookie: __utma=237072066.1612165039.1260349373.1260349373.1260349373.1; __utmz=237072066.1260349373.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); vbulletin_collapse=forumbit_1%0Afunction%20%28iterator%2C%20context%29%20%7B%0A%20%20%20%20var%20index%20%3D%200%3B%0A%20%20%20%20iterator%20%3D%20iterator.bind%28context%29%3B%0A%20%20%20%20try%20%7B%0A%20%20%20%20%20%20this._each%28function%28value%29%20%7B%0A%20%20%20%20%20%20%20%20iterator%28value%2C%20index++%29%3B%0A%20%20%20%20%20%20%7D%29%3B%0A%20%20%20%20%7D%20catch%20%28e%29%20%7B%0A%20%20%20%20%20%20if%20%28e%20%21%3D%20%24break%29%20throw%20e%3B%0A%20%20%20%20%7D%0A%20%20%20%20return%20this%3B%0A%20%20%7D%0Afunction%20%28number%2C%20iterator%2C%20context%29%20%7B%0A%20%20%20%20iterator%20%3D%20iterator%20%3F%20iterator.bind%28context%29%20%3A%20Prototype.K%3B%0A%20%20%20%20var%20index%20%3D%20-number%2C%20slices%20%3D%20%5B%5D%2C%20array%20%3D%20this.toArray%28%29%3B%0A%20%20%20%20while%20%28%28index%20+%3D%20number%29%20%3C%20array.length%29%0A%20%20%20%20%20%20slices.push%28array.slice%28index%2C%20index+number%29%29%3B%0A%20%20%20%20return%20slices.collect%28iterator%2C%20context%29%3B%0A%20%20%7D%0Afunction%2........

it goes on 6 times as much

 

 

does anyone have a solution for this ?

Hi Turn off force cookies in admin?configuration>sessions, see if that helps

 

Steve

Link to comment
Share on other sites

Hi Turn off force cookies in admin?configuration>sessions, see if that helps

 

Steve

 

 

Hi Steve. thank you for the fast reply. gotta love opensource and osc :)

 

force cookies was already off. wich from digging the code means cookies are not used at all.. am i right ?

 

now i tried to set a cookie with a minus date. in app top. and will try to see what impact that has on normal use. another problem is that i cannot test this on a mac. only customers complaint about the problem.

Link to comment
Share on other sites

The cookie contents decodes to

vbulletin_collapse=forumbit_1
function (iterator, context) {
   var index = 0;
   iterator = iterator.bind(context);
   try {
     this._each(function(value) {
       iterator(value, index++);
     });
   } catch (e) {
     if (e != $break) throw e;
   }
   return this;
 }
function (number, iterator, context) {
   iterator = iterator ? iterator.bind(context) : Prototype.K;
   var index = -number, slices = [], array = this.toArray();
   while ((index += number) < array.length)
     slices.push(array.slice(index, index+number));
   return slices.collect(iterator, context);
 }
function ........

What in the world is Java (or more likely, Javascript) code doing in a cookie? Something must have gone quite wrong in the code for this stuff to be written into a cookie. This is happening to all users, or just Safari users? What version of osC, and what add-ons or custom modifications? If this doesn't produce an error on other browsers, can you look inside your osC cookies and see if any have content like this? If they don't, something odd is going on only with the Safari browser (perhaps the way it handles cookies is nonstandard?). If other browsers do have this content, maybe they're a bit more lenient on maximum cookie size (but the content is still a problem).

Link to comment
Share on other sites

mr. phil. how the heck did you decode that cookie ?

 

i have been digging into this. and its a safari issue only. its something about that it collects alot of cookies into one i think.

 

well. here is what solution i have found so far

 

AndreTheGeek wrote: I have blown away the cookies.plist file, and so far, so good.

Source : http://discussions.apple.com/thread.jspa?threadID=2201782&start=15&tstart=0 (near bottom)

(i think its a little funny that even apple homepages have this issue. thats bad. very bad)

 

furthermore i have configured the following

LimitRequestBody 102400

LimitRequestFields 40

LimitRequestFieldsize 1000

LimitRequestLine 1000

 

but as of now im not sure if this means that som features will render useless for safari users.

and i cannot test it because i dont have mac.

 

i dont think it will help. but if you like i can send you the full cookie error.

but it seems like its got som leftovers from vbulletin forum.

 

i actually think that this issue is universal. and should be fixed somehow

 

PS. its a highly modefied osc 2.2 but i dont think the code is the issue as mentioned above. certainly i dont have any vbulletinb code.

Link to comment
Share on other sites

mr. phil. how the heck did you decode that cookie ?

Simple. I cut and pasted the message you gave (vbulletin_collapse=forumbit_1%0Afunction%20%28iterator%....) into a text editor (ViM). Each %0A is a "line end", so split the line there and remove %0A. For each %XX, do a global replace %20 --> space, %7B --> { etc. The hex codes for ASCII characters are listed in any HTML book. You end up with what I showed in my post. For use in a cookie, evidently all special characters got cooked into %XX codes.

 

That still doesn't explain what this Java or Javascript (I'm not sure which it is) code is doing in a cookie. I guess the amount of code overflowed the cookie and led to the error.

 

i dont think it will help. but if you like i can send you the full cookie error.

Sorry, I don't know what I would do with that code. It's not found in any file in vanilla osC 2.2 RC2a, so it must be something a customizer added for you. Does your customized code download Java applets? For some reason (server configuration? browser security settings?) it may be stuck in a cookie instead of being executed.

Link to comment
Share on other sites

Hey phil. not. it does not originate from code on the page. as mentioned i think it is safari that somehow collects cookies in a wierd way that triggers this error.

 

i hope that the above solutions solves the problem. perhaps someone else have fixed this problem

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...