commit 423ffe1063d62e8f48e6641f7238b6fa0ee5c107
Author: Garrett LeSage <garrett@novell.com>
Date: Mon Feb 2 20:43:35 2009 +0100
adding proxy workaround for Firefox not sending a Content-Length header for empty-bodied POSTs
diff --git a/jquery/src/ajax.js b/jquery/src/ajax.js
index 8262bc7..c719670 100644
|
a
|
b
|
jQuery.extend({ |
| 404 | 404 | |
| 405 | 405 | // Send the data |
| 406 | 406 | try { |
| | 407 | if (jQuery.browser.mozilla && type == "POST" && s.data === null) { |
| | 408 | // Firefox fails to send the Content-Length header on |
| | 409 | // POST requests with null passed to send, |
| | 410 | // causing an issue with Squid proxies. |
| | 411 | // (Setting a "Content-Length: 0" header does not work.) |
| | 412 | s.data = ''; |
| | 413 | } |
| 407 | 414 | xhr.send(s.data); |
| 408 | 415 | } catch(e) { |
| 409 | 416 | jQuery.handleError(s, xhr, null, e); |