Re: Recent spec change to XMLHttpRequest default Content-Type

Jim Ley wrote:
> 
> "Julian Reschke" <julian.reschke@gmx.de>
>> I have to agree here. If a recipient decides to do content-type 
>> guessing, the fact that the type is not what was tested is not an 
>> error. One more reason not to guess in the first place.
> 
> But it might be what's tested just invalid - if the user expected the 
> sniffing behaviour he'd then be wondering why it wasn't getting a 
> document, or any errors, in situations that rely on guesswork of 
> content, it should be left to the browser what that guesswork is.

Well, yet another reason not to rely on guessing. If it hurts, don't do it.

>> However, IMHO the right thing to do here is to attach a proper 
>> content-type header in the first place.
> 
> Yes, it's not an error that developers should ever be seeing, just 
> ensure there's a content type appropriate to the content, so I think 
> it's a pretty artificial problem.

+1

Best regards, Julian

Received on Friday, 15 June 2007 08:39:34 UTC