March 09, 2005

Bad GET after POST

There are bugs that keep you up at night. This was one of them. Our web site at Avery.com has been getting a flood of error reports in the JRun log. There were no bug reports from users, though, and nothing that I did on my test machine could duplicate the error reports i was seeing on the production site.

Coworker Brad found the problem before I logged in this morning. It was specific to the Firefox browser. It seems that under certain conditions, Firefox will fire off a GET request with no parameters following a valid POST. The users got their response from the POST request, and the GET fell into the error log.

I rewrote the code to ignore the bad GET requests if the UserAgent is Firefox. That should fix it.

2 comments:

Martin OConnor said...

For anyone that finds this via the google, this problem is caused by the page in the response to the POST message containing an img tag with an empty src attribute.

b0b said...

Wow! I did not know that. Thanks, Martin!