Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 "400 Bad Request" Error when logging in...
Index -> Off Topic
Goto page 1, 2  Next
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
ZeroPaladn




PostPosted: Wed Dec 13, 2006 10:44 am   Post subject: "400 Bad Request" Error when logging in...

when I log into Compsci.ca, i get this huge ass error...
Basicaly it says that my computer sent a request that the server could not understand, and that the server request exceeded header limit. I would post it, if it didnt take up about 2 screens, but heres a little chunk of it.
code:
Cookie: CompSci_data=a%3A2%3A%7Bs%3A11%3A%22autologinid%22%3Bs%3A0%3A%22%22%3Bs%3A6%3A%22userid%22%3Bs%3A6%3A%22100673%22%3B%7D; CompSci_v3_data=a%3A2%3A%7Bs%3A11%3A%22autologinid%22%3Bs%3A32%3A%2275885848745745fa1a7f7f8.67552558%22%3Bs%3A6%3A%22userid%22%3Bs%3A2%3A%2235%22%3B%7D; CompSci_v3___u=a%3A0%3A%7B%7D; CompSci_v3_35_uf=0; CompSci_v3_35_u=a%3A0%3A%7B%7D; CompSci___uf=0; CompSci___u=a%3A0%3A%7B%7D; CompSci_100673_uf=1158599573; CompSci_100673_u=a%3A194%3A%7Bi%3A13539%3Bi%3A0%3Bi%3A13529%3Bi%3A0%3Bi%3A13345%3Bi%3A0%3Bi%3A13533%3Bi%...

And thats about 1/10th of it. It's about 7000 characters long (MS Word word count)

This also appears when i try to go to half of the forums in the site. Refreshing the page, opening up a new browser, restarting the computer, does nothing. This has been happening to me for about 2 weeks now, so ive ruled out random error as a cause.
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Wed Dec 13, 2006 11:40 am   Post subject: (No subject)

hmm... yeah, compsci's cookies are inappropriatly long.

Dan - do you know if they just store all the "posts viewed / not" data, and if so, isn't there a better approach?
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
md




PostPosted: Wed Dec 13, 2006 11:41 am   Post subject: (No subject)

Delete any compsci.ca cookies you have and try again.
Dan




PostPosted: Wed Dec 13, 2006 1:24 pm   Post subject: (No subject)

Tony wrote:

Dan - do you know if they just store all the "posts viewed / not" data, and if so, isn't there a better approach?


Well we could dump it all in the database and have it take up a masive amount of space.

What is interesting about that cookie he posted is that it looks like parts of it are from V3. I will deftaly have to look in to this but deleting your cookies should be a quick fix.

Also i highly recommend not posting your cookie files as they can have an encoded verson of your password in them.
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
Tony




PostPosted: Wed Dec 13, 2006 1:52 pm   Post subject: (No subject)

good call, there are clearly v3 parts in there.

Personally I don't even rely on "viewed posts" anymore. I access compsci from 3 different computers throughout the day, so naturally cookie information is very inaccurate. I just go to "View posts from previous 1 day" (top right from index page) and scan threads from there.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Dan




PostPosted: Wed Dec 13, 2006 3:24 pm   Post subject: (No subject)

I have been trying to come up with a good or better way to do it. Cookies are the best i have found yet. The default phpbb is to make them go all unread when you leave the page, storing them in the database used to be bad idea due to space issues but since we have alot of that now it whould only be a cpu issue.
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
Tony




PostPosted: Wed Dec 13, 2006 4:22 pm   Post subject: (No subject)

128 217 "read" posts * 4 231 registered users? There has got to be a flaw in that logic.

I suppose cookies are fine.. though perhaps their length should be capped to avoid such errors?
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
[Gandalf]




PostPosted: Wed Dec 13, 2006 5:30 pm   Post subject: (No subject)

Do you really have to store all the posts read? Why not just assume that after a while even unread posts can be labelled read since they've been unchecked for so long. That cuts down on about 100000 posts, no?
Sponsor
Sponsor
Sponsor
sponsor
Dan




PostPosted: Wed Dec 13, 2006 8:11 pm   Post subject: (No subject)

I forget the algorithms in use exctaly but it dose not store every unread post.

Also the space issues where back when we only had 1gb storage space.

In therms of cpu it would add more sql querys per page load, witch v3 is allready a bit high on.
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
Clayton




PostPosted: Wed Dec 13, 2006 8:57 pm   Post subject: (No subject)

about the actual error, are you using IE? I've had the same problem before, and it seems that any link prefixed with "www." will result with that error sometimes. I don't know why, but if you just delete the "www." off of the link, it works fine, just a pain in the ass though...
ZeroPaladn




PostPosted: Thu Dec 14, 2006 12:49 pm   Post subject: (No subject)

Yeah, I'm using IE (school's defaul and only browser). As for deleting the cookies, my school stores all the cookies in a folder specificall for each student, so I'll delete those. The "www" extension on the web address is not displayed, i got "http://compsci.ca/v2/posting.php?mode=reply&t=14475", which is basicaly the posting page.

thanks guys.

EDIT:

It worked! Sadly, all the posts that I see are tagged as read Hit Wall
BenLi




PostPosted: Thu Dec 14, 2006 4:50 pm   Post subject: (No subject)

yeah, that problem never happened to me after I switched to firefox
md




PostPosted: Thu Dec 14, 2006 4:58 pm   Post subject: (No subject)

/me points to punbb's method: store the last visit time in the cookie; and if any threads have posts newer then that time they are new threads, anything else is either read or you don't care. adding a smallish delay, so that anything within 10 minutes of your last visit might be a good idea too.
Dan




PostPosted: Thu Dec 14, 2006 5:33 pm   Post subject: (No subject)

The problem with that is what if i login for a few seconds to check somthing like my PMs and then come back latter that day? Then everything is read.....
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
md




PostPosted: Thu Dec 14, 2006 7:34 pm   Post subject: (No subject)

only update the tiemstamp in the cookie that marks visits if you actually read a forum or thread. That way you have to actually look at say GD; or search AND read a thread.
Display posts from previous:   
   Index -> Off Topic
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 2  [ 16 Posts ]
Goto page 1, 2  Next
Jump to:   


Style:  
Search: