aboutsummaryrefslogtreecommitdiffstats
path: root/src/ajax.js
diff options
context:
space:
mode:
authorjeresig <jeresig@gmail.com>2011-04-10 15:41:51 -0400
committerjeresig <jeresig@gmail.com>2011-04-10 15:41:51 -0400
commitb92d2f0bc96d65c83252fa3033c37b92eb32d442 (patch)
treeac8545d23de62865406703eb3eb7ff3bd7401d75 /src/ajax.js
parentd4e4414451e15d23d7174e8eeddaa952ed0e4d73 (diff)
parent3a1b4661f5b8249ce7a741084824ec5445c75719 (diff)
downloadjquery-b92d2f0bc96d65c83252fa3033c37b92eb32d442.tar.gz
jquery-b92d2f0bc96d65c83252fa3033c37b92eb32d442.zip
Merge branch 'attrhooks.1.6v2' of https://github.com/timmywil/jquery into timmywil-attrhooks.1.6v2
Conflicts: src/attributes.js
Diffstat (limited to 'src/ajax.js')
-rw-r--r--src/ajax.js9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/ajax.js b/src/ajax.js
index 4714afdae..d94abd6fc 100644
--- a/src/ajax.js
+++ b/src/ajax.js
@@ -7,7 +7,7 @@ var r20 = /%20/g,
rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL
rinput = /^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,
// #7653, #8125, #8152: local protocol detection
- rlocalProtocol = /(?:^file|^widget|\-extension):$/,
+ rlocalProtocol = /^(?:about|app|app\-storage|.+\-extension|file|widget):$/,
rnoContent = /^(?:GET|HEAD)$/,
rprotocol = /^\/\//,
rquery = /\?/,
@@ -19,7 +19,7 @@ var r20 = /%20/g,
rucHeadersFunc = function( _, $1, $2 ) {
return $1 + $2.toUpperCase();
},
- rurl = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?|\/[^\/])/,
+ rurl = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,
// Keep a copy of the old load method
_load = jQuery.fn.load,
@@ -61,7 +61,7 @@ try {
}
// Segment location into parts
-ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() );
+ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || [];
// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
function addToPrefiltersOrTransports( structure ) {
@@ -319,7 +319,6 @@ jQuery.extend({
cache: null,
traditional: false,
headers: {},
- crossDomain: null,
*/
accepts: {
@@ -604,7 +603,7 @@ jQuery.extend({
s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().split( rspacesAjax );
// Determine if a cross-domain request is in order
- if ( !s.crossDomain ) {
+ if ( s.crossDomain == null ) {
parts = rurl.exec( s.url.toLowerCase() );
s.crossDomain = !!( parts &&
( parts[ 1 ] != ajaxLocParts[ 1 ] || parts[ 2 ] != ajaxLocParts[ 2 ] ||