![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Re: XMLHTTP and POST and keepalive timeouts >Thread Next - Re: XMLHTTP and POST and keepalive timeouts Re: XMLHTTP and POST and keepalive timeoutsTo: NULL Date: 2/6/2007 10:19:00 AM
>> So:
>>
>> Is this a known problem?
>> Has anybody seen it before?
>> Any good ideas on how to avoid it? (current plan is to simply issue a GET
>> if
>> the time since the last request was about 10 seconds - the GET will
>> either
>> force the new connection or keep the old one alive).
Not known, no.
>> Oh yes - this is using the XMLHTTP which you get with IE 6, on either
>> Win2K
>> or WinXP. Code is running in javascript on a normal html page. Server is
>> apache, but I don't think that's relevant. Code is this simple:
>> var httpObj = new ActiveXObject('Microsoft.XMLHTTP');
>> httpObj.open( "POST", url, false );
>> httpObj.setRequestHeader( "Content-Type", "text/plain" );
>> httpObj.send( postData );
>>
> Try MSXML2.XMLHTTP.3.0 and make sure the machine is fully patched.
In general using the version-dependent progIDs is smart, because at least
then there is no ambuguity (for you, the developer) as to which version of
MSXML you are targetting. In this case Microsoft.XMLHTTP really does map to
MSXML2.XMLHTTP.3.0, so you're using the same object under the covers (for
supported OS configs).
My first question would be...you are using XMLHTTP to send text/plain data?
Why? Just use the much-lighter-weight-and-still-safe-for-scripting
WinHTTP.WinHTTPRequest.5.1. If all you are doing is sending some text data
over the wire, and you are not doing XML processing with the HTTP response,
then don't use XMLHTTP!
Try this:
var httpObj = new ActiveXObject(winhttp.winhttprequest.5.1');
httpObj.open( "POST", url, false );
httpObj.setRequestHeader( "Content-Type", "text/plain" );
httpObj.send( postData );
Since WINHTTP uses a different HTTP stack in Windows altogether than what
XMLHTTP uses, it may solve your problem too.
| ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
