correction, the title of this should say

  $.ajax() WITH null data property in config object results in missing
Content-Length header in FF3

On Apr 14, 10:34 am, Rebecca <rmurp...@gmail.com> wrote:
> Just experienced this in Firefox 3, not sure whether it is desired
> behavior, but discussed it with a fellow dev and we think it is not.
>
> I had an ajax request as follows:
>
> var myData = null;
>
> $.ajax({
>   'url' : 'foo.php',
>   'data' : myData,
>   'type' : 'POST',
>   'dataType' : 'json',
>   'success' : function(j) {
>     // whatever
>   }
>
> });
>
> Client was reporting a 411 HTTP response code on the request -- their
> proxy was expecting a Content-Length header on the request, and wasn't
> getting one. This also occurred if myData was undefined. It did *not*
> occur when myData was {}.
>
> We hadn't detected this error internally because our requests weren't
> proxy'd. It seems Content-Length "should" always be there
>
> http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.13
>
> and should be 0 if myData is null or undefined.
>
> I'm not sure whether this is just a Firefox issue, or something that
> jQuery should address in the spirit of abstracting away browser
> differences?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to jquery-dev@googlegroups.com
To unsubscribe from this group, send email to 
jquery-dev+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to