Bug Tracker

Ticket #4044: jQuery-1.3.1-xhr-proxy.patch

File jQuery-1.3.1-xhr-proxy.patch, 820 bytes (added by garrett, 3 years ago)

fix for jQuery 1.3.1

  • jquery/src/ajax.js

    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({ 
    404404 
    405405                // Send the data 
    406406                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                        } 
    407414                        xhr.send(s.data); 
    408415                } catch(e) { 
    409416                        jQuery.handleError(s, xhr, null, e);