XMLHttpRequest POST sometimes fails when server is using keep-aliv

Back in 2004 there was a bug in Internet Explorer 6 which caused the body 
from POST requests to go missing if the server reset the connection 
(http://support.microsoft.com/kb/831167/en-us). The same bug is apparently 
present in XMLHttpRequest in (at least) Internet Explorer 6, 7 and 8. 

The problem can be simply reproduced by doing a POST with an XMLHttpRequest 
to a server which is using a small keep-alive timeout, say 10s. If the POST 
request is made right before the keep-alive timeout expires and there is a 
slight network latency the web server will reset the connection and force IE 
to resend the request. This time IE will "forget" to send the body but will 
still send the old Content-Length header, resulting in the server waiting for 
the body to arrive until a read timeout occurs. 

The "right before" and "slight network latency" make it sound like this bug 
is hard to reproduce but experiences have shown that this bug is not hard at 
all to run in to while using a modern web application through e.g. a mobile 
connection.

I have put a demo of this problem at 
http://artur.virtuallypreinstalled.com/apache2-default/ie-xhr.php
The keep-alive timeout is 15s so wait 14-15s and click the button. An alert 
should popup when the response arrives and the button is re-enabled. At least 
for me using a mobile connection it does not take more than 2-3 attempts in 
IE8 to reproduce the problem. 

The only solution seems to be to turn off keep-alive on the server (or maybe 
set it to more than 60s). Has anyone else run into this and are there any 
other ways to solve this problem? Has this been reported/discussed here 
before? 



----------------
This post is a suggestion for Microsoft, and Microsoft responds to the 
suggestions with the most votes. To vote for this suggestion, click the "I 
Agree" button in the message pane. If you do not see the button, follow this 
link to open the suggestion in the Microsoft Web-based Newsreader and then 
click "I Agree" in the message pane.

http://www.microsoft.com/communities/newsgroups/list/en-us/default.aspx?mid=9430c5e6-977e-41e8-9654-13584958f24a&dg=microsoft.public.internetexplorer.general
0
Utf
3/9/2010 1:41:01 PM
internetexplorer.general 1684 articles. 0 followers. Follow

3 Replies
5948 Views

Similar Articles

[PageSpeed] 44

I was very happy to finally come across this post. I have been banging my head against a problem with our web site that manifests itself only on high-latency connections (read: mobile) and only on a couple of pages that do lots of Ajax POSTs. I think I have come to the same conclusion as you.

Other suggestions than turning off Keep-Alive on the server-side would be greatly appreciated.

Thanks
Daniel




Artur S wrote:

XMLHttpRequest POST sometimes fails when server is using keep-aliv
09-Mar-10

Back in 2004 there was a bug in Internet Explorer 6 which caused the body
from POST requests to go missing if the server reset the connection
(http://support.microsoft.com/kb/831167/en-us). The same bug is apparently
present in XMLHttpRequest in (at least) Internet Explorer 6, 7 and 8.

The problem can be simply reproduced by doing a POST with an XMLHttpRequest
to a server which is using a small keep-alive timeout, say 10s. If the POST
request is made right before the keep-alive timeout expires and there is a
slight network latency the web server will reset the connection and force IE
to resend the request. This time IE will "forget" to send the body but will
still send the old Content-Length header, resulting in the server waiting for
the body to arrive until a read timeout occurs.

The "right before" and "slight network latency" make it sound like this bug
is hard to reproduce but experiences have shown that this bug is not hard at
all to run in to while using a modern web application through e.g. a mobile
connection.

I have put a demo of this problem at
http://artur.virtuallypreinstalled.com/apache2-default/ie-xhr.php
The keep-alive timeout is 15s so wait 14-15s and click the button. An alert
should popup when the response arrives and the button is re-enabled. At least
for me using a mobile connection it does not take more than 2-3 attempts in
IE8 to reproduce the problem.

The only solution seems to be to turn off keep-alive on the server (or maybe
set it to more than 60s). Has anyone else run into this and are there any
other ways to solve this problem? Has this been reported/discussed here
before?



----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/communities/newsgroups/list/en-us/default.aspx?mid=9430c5e6-977e-41e8-9654-13584958f24a&dg=microsoft.public.internetexplorer.general

Previous Posts In This Thread:


Submitted via EggHeadCafe - Software Developer Portal of Choice 
SharePoint Video Library Template Available For Download
http://www.eggheadcafe.com/tutorials/aspnet/223c6e57-f81f-44b3-ab05-5995f2b0ab63/sharepoint-video-library.aspx
0
Daniel
3/16/2010 1:47:11 PM
"Daniel H" wrote in message news:201031694711danielherlitz@gmail.com...
> I was very happy to finally come across this post.

Please note:
This is NOT a chat room and You are NOT posting to a forum run by 
Eggheadcafe - you are actually posting to a global Usenet Newsgroup. You 
will get a far better experience if you use a newsreader and subscribe to 
these groups directly, rather than through Eggheadcafe.

Setting up Outlook Express/Windows Mail to access Microsoft newsgroups
http://www.michaelstevenstech.com/outlookexpressnewreader.htm

Accessing the MS newsgroups in Outlook Express/Windows Mail Newsreader
http://www.microsoft.com/windowsxp/expertzone/newsgroupsetup.mspx

If you must stay with Egghheadcafe then please follow Usenet custom by NOT 
changing the subject line.

Thank you.

http://66.39.69.143/goodpost.htm 

0
Gordon
3/16/2010 1:50:58 PM
I just came across this, as well.  Very difficult to track down until I found 
this post.  Note that with an HTTP proxy sniffer application such as Charles 
Proxy, you can simulate increased latency via connection throttling (doesn't 
resolve anything, just makes it easier to hit the test case).

Is there an official Microsoft bug related to this specific behavior in 
XmlHttpRequest?  I can't find one.  There should be.
0
Utf
3/18/2010 11:08:01 PM
Reply:

Similar Artilces:

failed to read attribute msExchUserAccountControl
I created some new users today and have waited 2 1/2 hours and they havent come up. I get the above msg in the event viewer. I have tried updating and rebuilding Recipient Update Service in exchange system manager, but it hasnt worked I am running exchange 2003 enterprise on a win2003 DC. The new users have email addresses listed, and if i send an email to the address, i dont get a response or ND I have tried restarting the information store and MT Please help TIA Any help from http://support.microsoft.com/default.aspx?scid=kb;en-us;281607 el wrote: > I created some new users today a...

How to transfer Outlook files to new user installation or file server?
I have created a new Windows XP account and I want to transfer the the Outlook email files from the old logins to the new login. I have copied the Outlook pst files from the old accounts folder to the new accounts folder, but when I open Outlook the mail contents are there but it seems that Outlook does not remember the old email account details. Is there a way to transfer the email accounts details as well? The previous email accounts are still there with the original mailboxes in the old logins, only the email account details not coming over. It appears that they are not stored with the...

second post of same problem
I have outlook 2003 sort my email into folders. It has all of a sudden decided to send a number of Emails I mark as not junk to the Junk Email folder even if I am the only one on the email header. How can I get it to accept the emails into the inbox rather than the Junk Email folder? When I find an Email that is in the Junk Email Folder that I do not want marked s Junk I slelect Not Junk from my tool bar and it sends it to the inbox. Yet the next time I get an email from the same sender, It goes to Junk again. HELP!!!! Check your junk senders rules to see if there is something in th...

2004 vs 2006 handling of "Server price update problem"
You know when the server doesn't update the prices in your copy of Money, but the prices ARE available elsewhere/ the next day at MSN ? ( Like last night) NORMALLY , in M2004 that night I can see the "price change column" is correct but the price was not updated, and I do it manually ( like I just did) So for Fidelity Low Priced Stock I change see that it went up by $0.07 and since it WAS 41.74, I know the new price is $41.81 so I update it and all the other funds too. ( BTW when I need to do this, prior to starting Money, I change the date on my PC back to "yesterd...

Used to Word Perfect, Do I need Pub?
Hi, I've been creating flyers in WP and wonder if I'd be better off in Publisher. I paste, size, position, border graphics. I write text and play with fonts. I need to be able to email my flyers to a computer illiterate group, who can barely download a file and don't have WP, can't download Reader for PDFs. Ideally, I need to send the flyers in Word, but trying to manipulate graphics in Word is miserable. Any suggestions would be much appreciated. After managing to set up OE-QuoteFix on his new PC, Ed reads a message from Mather <anonymous@discussions.microsoft.com>....

How do I set up a financial planner using Microsoft excel?
How do I set up a financial planner using Microsoft excel? What have you done so far? Is there a specific problem that you need help with? R1_4Life wrote: > How do I set up a financial planner using Microsoft excel? -- Debra Dalgleish Excel FAQ, Tips & Book List http://www.contextures.com/tiptech.html ...

Business Portal connecting to Terminal server with unusual port nu
Hi. I am trying to connect my Business Portal to our terminal server. For security reasons we are using an unusual port number (54903). When we put in just the Terminal server name in the Business Portal area in the site setting, general area for Terminal server we get a 516 error (winsock socket connection failure). if I put in the name of a different server, it works ok (opens a terminal server window). how do I have it redirect to the proper Terminal server with the unusual port number? ...

Scheduled Tasks Not Working after Server 2003 Upgrade
Last week, I upgraded our Exchange 2003 server to Windows Server 2003. After the upgrade, I started getting DCOM errors (Event ID 10021). According to an article I found, I modified the permissions in DCOM Config/IIS WAMREG admin service to give the Network Service permissions under Launch and Activation. I have a scheduled task to back up my Information Store daily. Since I made this change, the Task Scheduler is not running. I can manually back up the Information Store successfully. Are there other permissions I need to change? Thank you in advance for any help. Kate Townsend ...

GP 9.0 - Analytical Accounting Options - Post through to GL
Hello, One of the options in the Analytical Accounting Options window (Tools >> Setup >> Company >> Analytical Accounting >> Options) is 'Post through to GL for Trx posting'. I'm not clear of the purpose of this option. 1. Does this override the checkbox 'Post to GL' in the Posting setup? 2. To what transactions this option apply? Thanks in advance...Murali ...

OWA keeps prompting credential window
I am currently using MS Exchange 2000 SP3. IE version 6.0.2800.1106 Office 2000 (9.0.6926 SP3) It started quite some time back. Everytime I try to load something on my OWA it prompts me to key in my username and password. I've check Article-317901. It didn't help much since I am using the updated versions. It seems to me that most of my colleague in the organisation has this problem. Those back in the head office does not. (they have a faster link but how does a slower link create this problem?) ...

Server Error in '\' Application
I mayhave "fubar"ed by CRM 1.2 installation. I am installed on Windows 2003 server with Exchange 2003. I had CRM up an running and was looking at with my sales folks putting together a customization and rollout plan. I added some business units subservent to our "root" organinzation and was assigning users to these units and adding managers. I then assigned the user (me) who is the only system admin. At that point I started getting a dialog in the web interface giving an "authorization error" message (unforunately I didn't write down the exact text...

HTML Emails
This is for my job, so I cannot change software packages. It's Outlook or it's nothing. I need to create a newsletter that will be distributed quarterly. To spice it up, we decided to create a nice looking HTML formatted email with images, etc. (just like the everyday spam we get). The only way I was able to figure out how to get the HTML into an Outlook email is by... 1) Create the HTML in another program (namely, I use Dreamweaver) 2) Preview the HTML in a browser (I use Internet Explorer) 3) 'Select All' on the page, 'Copy' it and 'Paste' it into t...

Syntax error using dlookup
Hi All, I have the following piece of code ChkProv = DLookup("[Province_Cde]", "Provinces", "[Province_Cde]= ' " & Left(Nat_Reg, 2)) which I want to use as part of validating that the 1st 2 left chrs of Nat_Reg correspond with a record in field Province_Cde However it gives me the following error when executed Syntax error in string in query expression '[Province_Cde]='GU' GU is valid in the record I was trying to add as a test & it exists in the table Provinces.Province_Cde Any suggestions on what to try to corr...

Using both Landscape and Portrait page formats in the same sheet.
Hello, Would anyone happen to know how to change the formatting of pages in a worksheet to allow the printing of both landscape and portrait pages without having to cut and paste pieces of the data into another sheet. Any help would be greatly appreciated. Ps. I know that Word does this task. So is there something available in Excel. I think what you're trying to do is print several different sections i the same sheet, some portrait, some landscape. The easiest way to do this is, for each page or section that you wan to print, create a "Custom view" All printing information...

All spreadsheets keep hiding first few columns
I have a load of excel spreadsheets. They used to open fine. Now, whenever I open any of the them they always hide the first fe columns and I have to unhide them. Any idea why? I am using a mac powerbook and office '98. Cheers Jame -- Message posted from http://www.ExcelForum.com Two possiblities that I can think of: 1) You have an Auto_Open or Workbook_Open macro in your workbooks that hide the columns. Unlikely since you have many of them. 2) You saved the workbooks as a workspace in which the columns are hidden. If neither of these are the problem, feel free to send one of ...

Posting on Intranet
I have created a Microsoft Word form. I would like this form to be posted on my Intranet page. When you click on this link, I would like it to automatically go into a Microsoft Outlook email message with a specific address already in the "To" field. In the message body of the email, I would like the Word form to appear there. Alternatively, I could also have the link provide the same functionality to appear but it could also just be a shortcut on a desktop for users. Any ideas on how to do this? Thanks! Chad ...

Please Consult Before Posting: Unofficial FAQ Available #105
An unofficial FAQ for this newsgroup is available at http://umpmfaq.info. The source FAQ was last updated Saturday, August 19, 2006. You may save yourself and those willing to spend their time helping you both time and hassle by consulting this resource before posting what may already be a FAQ. The unofficial FAQ answers 172 of the most frequently asked questions in this newsgroup. The FAQ cannot hope to be comprehensive. Please see limitations, disclaimers, and disclosures at http://umpmfaq.info/fineprint.htm. Likewise, a comprehensive archive of this newsgroup is available at http://groups....

HTTP_300 error when useing Active Sync, any clues would help
First I was recieveing an HTTP_500 certificate problem, but I got that straightened out by following this article http://support.microsoft.com/kb/817379/en-us, the option # 2. Now I get an HTTP_300 error. Any thoughts?? Hi Joe, What version of the server are you running? What platform are you running the server on? "Joe" wrote: > First I was recieveing an HTTP_500 certificate problem, but I got that > straightened out by following this article > http://support.microsoft.com/kb/817379/en-us, the option # 2. Now I get > an HTTP_300 error. Any thoughts?? > > ...

Using COUNTIF but blank cell if zero
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) Processor: Intel I'd like to count how many times &quot;x&quot; appears in a column but leave the cell blank if the count comes to zero. <br><br>I've had a go with =IF(COUNTIF(J3:J37,&quot;x&quot;)>0,(COUNTIF(J3:J37,&quot;x&quot;),&quot;&quot;)) but am getting an error message. <br><br>What am I doing wrong? <br><br>Thanks in anticipation On 3/3/10 5:27 PM, Ross_Langmead@officeformac.com wrote: > Version: 2008 Operating System: Mac OS X 10.6 (Sn...

Using FindFirstChangeNotification() problem
I am new to the win32 C++ language and is having a problem with inplementing the above structure, below is the code that i'm using to monitor a folder/file exclusively for renaming action: HANDLE ret=FindFirstChangeNotification(dir,true,FILE_NOTIFY_CHANGE_FILE_NAME); //change notification is set now start monitoring while(1){ //start wait proccess DWORD wp = WaitForSingleObject(ret, INFINITE); switch(wp) { case WAIT_OBJECT_0 : HANDLE hDir = CreateFile( dir,FILE_LIST_DIRECTORY,FILE_SHARE_READ|FILE_SHARE_DELETE, NULL, /* security descriptor */ OPEN_EXISTING, ...

Multiple batches posted as one entry
Through sales order processing, we generate several batches during the day. Each batch represents a different division within the company. The separate batches are posted the next day, which creates several general journal entries. Each journal entry has a debit to cash. Each of these cash accounts has to be added together in order to reconcile with the one amount showing on the bank statement for that day. Is there a way to post these multiple daily batches, and have them all come across as a single journal entry? Mike You could not have multiple batches posting to a same journal ...

Address Book from an LDAP server on Exchange 2000
I have an EX2K server on which I need to have an address book from an LDAP openmail server. Through the Exchange System Manager under Recipients\All Address Lists I've created another address book, but could not make heads or tails of how the LDAP query should be. For the openmail server I got the following details: server: 192.168.8.10 c=openmail I'm sure that the LDAP server is working fine as I managed to query the server via the Outlook 2000 client directly. Can somebody help with this ? Thanks Ian Briffa Malta ...

Using the VS .Net .msi setup
Hi, Based on Newcomer's latest recommendation I investigated using the built-in installer package .msi generator for deployment, so that I can use dynamic MFC dll. I added a setup project to my solution, that was ok, it detected dependencies OK. But while compiling it warns that two dll's should be excluded becuase they are under windows protection. MSVFW32.dll and AVIFIL32.dll. If I exclude them, how will it then work? Will that force it to include them in the executable, or is it always certain that any windows o/s already has them? Michael Archon Sequoia Nielsen wrote: &g...

Compilator C++ freeware for commercial use
Is there a freeware compilator C++ for commercial use? On Tue, 22 May 2007 09:40:42 +0200, karol1208 <karol1208(Cut this)@gazeta.pl> wrote: >Is there a freeware compilator C++ for commercial use? Microsoft Visual C++ 2005 Express Edition? MrAsm GNU C++. joe On Tue, 22 May 2007 09:40:42 +0200, karol1208 <karol1208(Cut this)@gazeta.pl> wrote: >Is there a freeware compilator C++ for commercial use? Joseph M. Newcomer [MVP] email: newcomer@flounder.com Web: http://www.flounder.com MVP Tips: http://www.flounder.com/mvp_tips.htm I think, as MrAsm suggested, you can use th...

Daily Importing of External Data using Web Query
Every month I create a spreadsheet from a template by creating one ta for each day of the month named after day of the month/year (010104). then maually enter a Web Query on each tab which downloads dail weather information for an insect life cycle model. This is a very time consuming and tedious task because the onl difference in the links is the expression "20040101" (for January 01 2004) to "20040102" (for January 02,2004) INCLUDED IN THE LINK. Is it possible to use a macro (VBA code) to enter the Web Query addres in cell A1 on each tab when the workbook is created an...