Removes now unnecessary regexp and companion function. Fixes some spacing issues. Shortens field names.
This commit is contained in:
parent
4d3cb7d7ee
commit
a519129e99
2 changed files with 8 additions and 12 deletions
|
@ -15,10 +15,6 @@ var r20 = /%20/g,
|
||||||
rselectTextarea = /^(?:select|textarea)/i,
|
rselectTextarea = /^(?:select|textarea)/i,
|
||||||
rspacesAjax = /\s+/,
|
rspacesAjax = /\s+/,
|
||||||
rts = /([?&])_=[^&]*/,
|
rts = /([?&])_=[^&]*/,
|
||||||
rucHeaders = /(^|\-)([a-z])/g,
|
|
||||||
rucHeadersFunc = function( _, $1, $2 ) {
|
|
||||||
return $1 + $2.toUpperCase();
|
|
||||||
},
|
|
||||||
rurl = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,
|
rurl = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,
|
||||||
|
|
||||||
// Keep a copy of the old load method
|
// Keep a copy of the old load method
|
||||||
|
@ -416,7 +412,7 @@ jQuery.extend({
|
||||||
// Caches the header
|
// Caches the header
|
||||||
setRequestHeader: function( name, value ) {
|
setRequestHeader: function( name, value ) {
|
||||||
if ( !state ) {
|
if ( !state ) {
|
||||||
requestHeaders[ name.toUpperCase().replace( rucHeaders, rucHeadersFunc ) ] = { name: name, value: value };
|
requestHeaders[ name.toLowerCase() ] = { n: name, v: value };
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
|
|
@ -104,7 +104,7 @@ if ( jQuery.support.ajax ) {
|
||||||
// Need an extra try/catch for cross domain requests in Firefox 3
|
// Need an extra try/catch for cross domain requests in Firefox 3
|
||||||
try {
|
try {
|
||||||
for ( i in headers ) {
|
for ( i in headers ) {
|
||||||
xhr.setRequestHeader( headers[ i ].name, headers[ i ].value );
|
xhr.setRequestHeader( headers[ i ].n, headers[ i ].v );
|
||||||
}
|
}
|
||||||
} catch( _ ) {}
|
} catch( _ ) {}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue