T
Thomas 'PointedEars' Lahn
Hello,
I do not know if this is really news to you, but since I have encountered
it not before today in one of my commercial projects (XHR had not been a
priority there), and a Google Groups search here for "1223" returned it only
once in a rather long posting of Conrad Lender that advocates browser
sniffing to deal with this kind of problem[1], I thought I could as well
tell you about it.
In a nutshell:
As described e.g. in [2], contrary to the MSDN Library documentation[3], the
IXMLHTTPRequest implementation in MSXML HTTP (at least in IE 8.0 on Windows
XP SP3+) does not handle HTTP responses with status code 204 (No Content)
properly; the `status' property has the value 1223 then (which I found out
thanks to IE 8.0's built-in debugger). The used ActiveX/COM ProgID to
reproduce the bug was "Microsoft.XMLHTTP" which should select MSXML 3.0 or
earlier (AFAIK).[4]
As a result, I have changed
status: {
OK_EXPR: /\b(0|2\d\d)\b/,
// ...
}
into
status: {
/*
* NOTE: MSXML translates 204 to 1223, see
* https://prototype.lighthouseapp.com/projects/[...]
*/
OK_EXPR: /\b(0|2\d\d|1223)\b/,
// ...
}
in my httprequest.js (yet to be officially released). (See, no browser
sniffing! )
HTH
PointedEars
___________
[1] <[2]
<http://forumsblogswikis.com/2008/07/02/ie7-xmlhttprequest-and-1223-status-code/>,
[3] <http://msdn.microsoft.com/en-us/library/ms767625(VS.85).aspx>
[4] <http://msdn.microsoft.com/en-us/library/6958xykx(VS.80).aspx>
I do not know if this is really news to you, but since I have encountered
it not before today in one of my commercial projects (XHR had not been a
priority there), and a Google Groups search here for "1223" returned it only
once in a rather long posting of Conrad Lender that advocates browser
sniffing to deal with this kind of problem[1], I thought I could as well
tell you about it.
In a nutshell:
As described e.g. in [2], contrary to the MSDN Library documentation[3], the
IXMLHTTPRequest implementation in MSXML HTTP (at least in IE 8.0 on Windows
XP SP3+) does not handle HTTP responses with status code 204 (No Content)
properly; the `status' property has the value 1223 then (which I found out
thanks to IE 8.0's built-in debugger). The used ActiveX/COM ProgID to
reproduce the bug was "Microsoft.XMLHTTP" which should select MSXML 3.0 or
earlier (AFAIK).[4]
As a result, I have changed
status: {
OK_EXPR: /\b(0|2\d\d)\b/,
// ...
}
into
status: {
/*
* NOTE: MSXML translates 204 to 1223, see
* https://prototype.lighthouseapp.com/projects/[...]
*/
OK_EXPR: /\b(0|2\d\d|1223)\b/,
// ...
}
in my httprequest.js (yet to be officially released). (See, no browser
sniffing! )
HTH
PointedEars
___________
[1] <[2]
<http://forumsblogswikis.com/2008/07/02/ie7-xmlhttprequest-and-1223-status-code/>,
[3] <http://msdn.microsoft.com/en-us/library/ms767625(VS.85).aspx>
[4] <http://msdn.microsoft.com/en-us/library/6958xykx(VS.80).aspx>