Commit 914aa3d6 authored by jaubourg's avatar jaubourg

Makes it so a prefilter can change the type of a request.

parent 21143c3b
...@@ -584,12 +584,6 @@ jQuery.extend({ ...@@ -584,12 +584,6 @@ jQuery.extend({
// Remove hash character (#7531: and string promotion) // Remove hash character (#7531: and string promotion)
s.url = ( "" + s.url ).replace( rhash , "" ); s.url = ( "" + s.url ).replace( rhash , "" );
// Uppercase the type
s.type = s.type.toUpperCase();
// Determine if request has content
s.hasContent = ! rnoContent.test( s.type );
// Extract dataTypes list // Extract dataTypes list
s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().split( /\s+/ ); s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().split( /\s+/ );
...@@ -605,13 +599,19 @@ jQuery.extend({ ...@@ -605,13 +599,19 @@ jQuery.extend({
} }
// Convert data if not already a string // Convert data if not already a string
if ( s.data && s.processData && typeof s.data != "string" ) { if ( s.data && s.processData && typeof s.data !== "string" ) {
s.data = jQuery.param( s.data , s.traditional ); s.data = jQuery.param( s.data , s.traditional );
} }
// Apply prefilters // Apply prefilters
jQuery.ajaxPrefilter( s , options ); jQuery.ajaxPrefilter( s , options );
// Uppercase the type
s.type = s.type.toUpperCase();
// Determine if request has content
s.hasContent = ! rnoContent.test( s.type );
// Watch for a new set of requests // Watch for a new set of requests
if ( s.global && jQuery.active++ === 0 ) { if ( s.global && jQuery.active++ === 0 ) {
jQuery.event.trigger( "ajaxStart" ); jQuery.event.trigger( "ajaxStart" );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment