Re: [XHR] XMLHttpRequest.send()

2012-04-11 Thread Anne van Kesteren
On Wed, 11 Apr 2012 02:03:30 +0200, Boris Zbarsky bzbar...@mit.edu wrote: On 4/10/12 7:15 PM, Jonas Sicking wrote: If I'm the only one who prefer the other behavior then we should stick to what the spec already says. I'll make sure Gecko maintains that behavior as we implement our new WebIDL

Re: [XHR] XMLHttpRequest.send()

2012-04-11 Thread Boris Zbarsky
On 4/11/12 3:01 AM, Anne van Kesteren wrote: How about send(optional (ArrayBuffer or Blob or Document or DOMString or FormData)? data = null) I think that should be fine too, yes. I don't have a strong preference for that over the overload version or vice versa. -Boris

[XHR] XMLHttpRequest.send()

2012-04-10 Thread Jonas Sicking
Hi All, Our understanding of the current spec is that if someone calls the send function and pass as the body to be sent, this is almost equivalent to not passing a body at all. However, it still changes which Content-Type header is set. Consider the following code: xhr = new XMLHttpRequest;

Re: [XHR] XMLHttpRequest.send()

2012-04-10 Thread Anne van Kesteren
On Wed, 11 Apr 2012 00:08:47 +0200, Jonas Sicking jo...@sicking.cc wrote: Is this intentional? This does match what Gecko does, but we are willing to change this if others agree that it's a better behavior. Yes, the idea is that you can transmit both the empty entity body and no entity

Re: [XHR] XMLHttpRequest.send()

2012-04-10 Thread Glenn Maynard
On Tue, Apr 10, 2012 at 5:21 PM, Anne van Kesteren ann...@opera.com wrote: On Wed, 11 Apr 2012 00:08:47 +0200, Jonas Sicking jo...@sicking.cc wrote: Is this intentional? This does match what Gecko does, but we are willing to change this if others agree that it's a better behavior. Yes,

Re: [XHR] XMLHttpRequest.send()

2012-04-10 Thread Jonas Sicking
On Tue, Apr 10, 2012 at 3:37 PM, Glenn Maynard gl...@zewt.org wrote: On Tue, Apr 10, 2012 at 5:21 PM, Anne van Kesteren ann...@opera.com wrote: On Wed, 11 Apr 2012 00:08:47 +0200, Jonas Sicking jo...@sicking.cc wrote: Is this intentional? This does match what Gecko does, but we are willing

Re: [XHR] XMLHttpRequest.send()

2012-04-10 Thread Jonas Sicking
On Tue, Apr 10, 2012 at 3:42 PM, Jonas Sicking jo...@sicking.cc wrote: On Tue, Apr 10, 2012 at 3:37 PM, Glenn Maynard gl...@zewt.org wrote: On Tue, Apr 10, 2012 at 5:21 PM, Anne van Kesteren ann...@opera.com wrote: On Wed, 11 Apr 2012 00:08:47 +0200, Jonas Sicking jo...@sicking.cc wrote: Is

Re: [XHR] XMLHttpRequest.send()

2012-04-10 Thread Glenn Maynard
On Tue, Apr 10, 2012 at 5:50 PM, Jonas Sicking jo...@sicking.cc wrote: Is it more surprising than that xhr.send(hasSomethingToSend() ? getTheThingToSend() : ); sets the Content-Type header even when no body is submitted? That's exactly what I would expect. A body that happens to have a

Re: [XHR] XMLHttpRequest.send()

2012-04-10 Thread Tab Atkins Jr.
On Tue, Apr 10, 2012 at 3:58 PM, Glenn Maynard gl...@zewt.org wrote: On Tue, Apr 10, 2012 at 5:50 PM, Jonas Sicking jo...@sicking.cc wrote: Is it more surprising than that xhr.send(hasSomethingToSend() ? getTheThingToSend() : ); sets the Content-Type header even when no body is submitted?

Re: [XHR] XMLHttpRequest.send()

2012-04-10 Thread Jonas Sicking
On Tue, Apr 10, 2012 at 4:11 PM, Tab Atkins Jr. jackalm...@gmail.com wrote: On Tue, Apr 10, 2012 at 3:58 PM, Glenn Maynard gl...@zewt.org wrote: On Tue, Apr 10, 2012 at 5:50 PM, Jonas Sicking jo...@sicking.cc wrote: Is it more surprising than that xhr.send(hasSomethingToSend() ?

Re: [XHR] XMLHttpRequest.send()

2012-04-10 Thread Jonas Sicking
On Tue, Apr 10, 2012 at 4:15 PM, Jonas Sicking jo...@sicking.cc wrote: On Tue, Apr 10, 2012 at 4:11 PM, Tab Atkins Jr. jackalm...@gmail.com wrote: On Tue, Apr 10, 2012 at 3:58 PM, Glenn Maynard gl...@zewt.org wrote: On Tue, Apr 10, 2012 at 5:50 PM, Jonas Sicking jo...@sicking.cc wrote: Is it

Re: [XHR] XMLHttpRequest.send()

2012-04-10 Thread Jarred Nicholls
On Tue, Apr 10, 2012 at 9:00 PM, Jonas Sicking jo...@sicking.cc wrote: On Tue, Apr 10, 2012 at 4:15 PM, Jonas Sicking jo...@sicking.cc wrote: On Tue, Apr 10, 2012 at 4:11 PM, Tab Atkins Jr. jackalm...@gmail.com wrote: On Tue, Apr 10, 2012 at 3:58 PM, Glenn Maynard gl...@zewt.org wrote: On