Bug Tracker

Opened 15 years ago

Closed 15 years ago

Last modified 14 years ago

#1579 closed bug (duplicate)

1.2 Ajax method strips query string from URI

Reported by: buzz27 Owned by:
Priority: major Milestone: 1.2.1
Component: core Version: 1.2
Keywords: Cc:
Blocked by: Blocking:

Description (last modified by john)

The ajax method will not POST to URI's with a query string. So if I need to POST to app.com/script.php?ajax I'm losing the ajax. I think using a query string to tell your scripts you are making an ajax request is a common pattern. If there is no workaround, farily substantial changes to applications could be needed.

Awesome work on 1.2 BTW.

Change History (2)

comment:1 Changed 15 years ago by stosh1985

The code which causes this problem is (lines 2180-2184):

var q = s.url.indexOf("?");
if ( q > -1 ) {
	s.data = (s.data ? s.data + "&" : "") + s.url.slice(q + 1);
	s.url = s.url.slice(0, q);

While I don't think this "feature" is entirely a bad idea, it has caused a number of problems for me, and I have subsequently commented out this section in my local copies. I would suggest maybe implementing an additional option, something like "parseURI" which could be a boolean value by default set to true?

I don't see anything to implement this functionality in 1.1.4 and I don't see it marked in a change log so I'm somewhat surprised.

Can this be fixed for those of us who need to be able to utilize post's to url's with query strings?

BTW, I concur with buzz27, excellent work on 1.2! Thanks for all your efforts.


  • Stan

comment:2 Changed 15 years ago by john

Description: modified (diff)
Resolution: duplicate
Status: newclosed

Fixed in SVN rev [3295]. Duplicate of bug #1580.

Note: See TracTickets for help on using tickets.