Re: setRequestHeader / Accept

Maciej Stachowiak wrote:
> Treating null as empty string here may be sensible (no strong opinion 
> either way) but removing the header when set to empty seems wrong. If 
> header removal is really essential we should add a method for it.

In HTTP, absence of a header is different from having an empty value.

I can understand the argument that set(..., null) is the wrong way to 
remove a value. But if it doesn't, it shouldn't do anything that a 
non-null argument would do.

So yes, an explicit way to remove an header would be good. Otherwise 
we'll see broken requests on the wire (as just seen in the example I 
cited a few days ago).

BR, Julian

Received on Monday, 26 May 2008 06:07:07 UTC