473,396 Members | 2,011 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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

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

Jan 24 '06 #1
2 3354
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

Jan 24 '06 #2
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.

Jan 24 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: yb | last post by:
Hi, In Mozilla and IE, setting an event handler for "onmouseover" for a link, (i.e. 'a' element) and return false will prevent the status message from showing the links href value. Safari...
1
by: chris fink | last post by:
Hi, What are the appropriate HTTP Status Codes for the following: 1. XML is not well-formed (structure problem).... 2. XML is not valid (as per DTD/XSD/XDR).....missing req'd field, etc I...
5
by: Nathan | last post by:
This is a copy of a message at microsoft.public.dotnet.framework.clr: THE CODE: I'm using an HttpWebResponse object to send an HTTP POST to a Java server I have written and are running on the...
1
by: gerry | last post by:
Hi, although this is not strictly asp.net related, I was hoping that someone could confirm or debunk what appears to be a major problem with safari POSTs. with the following html : <!DOCTYPE...
1
by: chen | last post by:
We're having an internal debate about the merits & demerits of returning status codes in the output message vs exceptions to signify errors in handling a Web method. The status code camp is...
2
by: Ian Hannah | last post by:
I am running the following code (using VS 2005) with the appropriate username and password and the request always timeouts: FtpWebRequest request =...
2
by: Bob | last post by:
I'm running sql server ver 7.0 SP4. I have an access project (.adp) that runs a view which is nothing more than a select statement. Access locks up solid when I try to run this query - with NO...
2
by: JDeats | last post by:
>From my development envrionment (i.e. a single WinXP notebook PC) I have a basic AJAX application that is making the call to a Windows Form page that just returns the request back to the AJAX...
4
by: Miha V | last post by:
Hi! We are using ASMX web service with WSE (we're using WS-Addressing) and IIS returns HTTP status code 200 even if XML is malformed (it can contain illegal characters in it). The request...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.