X-Git-Url: http://git.asbjorn.biz/?p=jquery.git;a=blobdiff_plain;f=src%2Fajax.js;h=f33bd49afff22de0edb78486369c37809a92bfd4;hp=2c61cf27607551e552a767c56b4587f928879d42;hb=d66cc553167c6b00d19aa62a4dd1e9affb20d395;hpb=ee22a59129e082a2bb9f5bc0b085191ab6faafc8 diff --git a/src/ajax.js b/src/ajax.js index 2c61cf2..f33bd49 100644 --- a/src/ajax.js +++ b/src/ajax.js @@ -7,7 +7,7 @@ var r20 = /%20/g, rheaders = /^(.*?):\s*(.*?)\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|\-extension):$/, + rlocalProtocol = /(?:^file|^widget|\-extension):$/, rnoContent = /^(?:GET|HEAD)$/, rprotocol = /^\/\//, rquery = /\?/, @@ -15,7 +15,7 @@ var r20 = /%20/g, rselectTextarea = /^(?:select|textarea)/i, rspacesAjax = /\s+/, rts = /([?&])_=[^&]*/, - rurl = /^(\w+:)\/\/([^\/?#:]*)(?::(\d+))?/, + rurl = /^([\w\+\.\-]+:)\/\/([^\/?#:]*)(?::(\d+))?/, // Keep a copy of the old load method _load = jQuery.fn.load, @@ -113,9 +113,9 @@ function inspectPrefiltersOrTransports( structure, options, originalOptions, jqX for(; i < length && ( executeOnly || !selection ); i++ ) { selection = list[ i ]( options, originalOptions, jqXHR ); // If we got redirected to another dataType - // we try there if not done already + // we try there if executing only and not done already if ( typeof selection === "string" ) { - if ( inspected[ selection ] ) { + if ( !executeOnly || inspected[ selection ] ) { selection = undefined; } else { options.dataTypes.unshift( selection );