Re: [XHR] (Late) LC Comments

On 12 Jun 2008, at 14:33, Anne van Kesteren wrote:

>> status and statusText currently MUST throw INVALID_STATE_ERR when  
>> there isn't any status code or text respectively sent by the  
>> server. HTTP/0.9 includes neither: Saf, Fx, and IE all return 200  
>> and "OK", and Op returns 0 and "". There isn't actually any issue  
>> with the state, so throwing an INVALID_STATE_ERR makes little  
>> sense. Also, a fair number of servers manage to omit the  
>> statusText, and that should just return "OK" (per Saf, Fx, and IE).  
>> I'd say that it should only throw if the state is UNSENT or OPENED.
>
> I think it would be better if HTTP defined what clients should  
> assume (200 and OK most likely) in case the response data does not  
> include it. Your HTTP parsing specification could do this for  
> instance.

I think that we should have this in XHR. Basic summary is that Firefox  
and Safari default to 200/OK; Opera defaults to 0/"" (but does not  
throw INVALID_STATE_ERR); IE is inconsistent and sometimes gives 200/ 
OK or -1/some-random-value-from-the-HTTP-response. I think we should  
probably just spec in XHR that 200/OK should be returned when there is  
no status-code/reason-phrase.

We're fairly close to interoperability (as IE already sometimes does  
it), and nothing matches the spec currently at all, I think it should  
be put in XHR and not wait until my HTTP parsing spec, and waiting to  
see if anyone will actually implement that.

--
Geoffrey Sneddon
<http://gsnedders.com/>

Received on Monday, 20 October 2008 14:12:27 UTC