Safari Timeouts, Status Codes 302, 200, and 400 Bad Request

J

JThomas

Hello!

I'm having trouble with a page apparently causing my client's Safari
browser to time out. I don't actually have access to a Mac & Safari,
and haven't been able to physically see this duplicated, but this is
the descrip of the problem:
From Client's Point of View:
1. Client, using Safari, fills out a form on one page, submits (POST).
2. Timeout - never sent to next page (submit button is working, but
browser never retrieves next page).

This is what's happening behind the scenes:

Program:
1. Page with a form on it (part 1 of 4 pages of forms).
2. On form submit, PostBack occurs, data is validated, and if all good,
added to a DataTable stored in Session.
4. Response.Redirect to next page.
5. Next page has another form (part 2) - some values may be
prepopulated as suggestions based upon some entries from the form on
page 1 (which are stored in DataTable in Session). Any fields filled
out here and submitted are validated and added to the DataTable stored
in Session, and then a Response.Redirect to the next page (and so on).

The timeout appears to be happening at step 4, above. I've got a global
errorhandler set up that emails me every detail I can get when an error
occurs, but I haven't received any at the times my client is
experiencing his timeouts.

Now I've gone and looked at some of our server error logs, which turned
out to be particularly interesting. I've now learned that what
Response.Redirect seems to do is send a status code 302 (Found -
temporary redirect) to the browser, plus the location of the page to
redirect to. Generally this means the browser redirects, and the next
status code is 200 (OK) at the new page. This is what happens with
Windows browsers (IE, Firefox, etc), at least.

Safari seems to not get the 302 correctly. It registers a 400 (Bad
Request), and never redirects - so I end up seeing a string of 400s
where I assume my client has tried multiple times to submit the form
and ends up timing out.

For example - with a windows browser:
-----------------------------
GET /mypage1.aspx 200 (arrives at page)
POST /mypage1.aspx 302 (submits form, is told to redirect to
mypage2.aspx)
GET /mypage2.aspx 200 (arrives at next page)
-----------------------------

But with Safari:
-------------------------------
GET /mypage1.aspx 200 (arrives at page)
POST /mypage1.aspx 200 (not a 302?)
POST /mypage1.aspx 400 (ack!)
POST /mypage1.aspx 400 (ack! Must have refreshed or tried again?)
GET /mypage1.aspx 200 (start over?)
POST /mypage1.aspx 400
POST /mypage1.aspx 200
GET /mypage1.aspx 200
POST /mypage1.aspx 400
POST /mypage1.aspx 302 (finally!!?!)
GET /mypage2.aspx 200 (page2!)
POST /mypage1.aspx 400 (why back here?)
POST /mypage2.aspx 200 (ok, back to page 2, but with POST, not GET)
POST /mypage2.aspx 200
POST /mypage2.aspx 200 (several POST 200s in a row... noted that
sc-bytes seems to be increasing by about 16000 with each)
POST /mypage2.aspx 400 (this looks familiar!)
POST /mypage2.aspx 400
POST /mypage2.aspx 400
POST /mypage2.aspx 400
--------------------------

Anyway, it seems the client was able to get to page 2 of the form after
some difficulty, but never quite made it to pages 3 and 4. ;)

In any case, I haven't been able to duplicate the problem myself, and
don't have access to a Mac with Safari to do much testing. If anyone
has any ideas, please feel free to pass them on! I may be barking up
entirely the wrong tree with the Server Logs, but it's about the only
place I can find actual evidence of this problem occuring.

Cheers,

John
 
J

JThomas

Update:
The client says that after he had this trouble on his Mac Safari, he
tried Firefox 1.5 on a PC and also had the same problem. He's not
terribly descriptive of what happens on his end when the timeout
occurs, but the server log looked something like this:

GET /mypage1.aspx 200
POST /mypage1.aspx 302
GET /mypage2.aspx 200
POST /mypage2.aspx 200
--gave up, goes to another page on the site and exits--

Now... this looks a bit to me like he made it to page 2 just fine, and
then possibly submitted invalid data on page 2, or something, and just
didn't notice the red text that might have said 'please enter a valid
email address' or something.. and instead thought this was a timeout.
But he says it was a timeout, which I haven't been able to reproduce,
so I thought I'd mention it. Maybe a caching issue? ;o

Anyway, any ideas would be greatly appreciated.

Cheers,

John
 
J

JThomas

Update:
Ok, client says it's definitely not validation tripping him up on the
Windows/Firefox combination. Considering we've tried all Windows +
Modern Browser configurations without error, it's got to be something
particular to his connection or configurations, as far as we can tell.

We're going to attempt to kill caching as much as possible (although
Cacheability's already set to No-Cache?) to see if that makes any
difference, and will also remove clientside Javascript doing validation
(it's all doubled up serverside anyway), just in case.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top