Skip to main content

Bug Tracker

Side navigation

#11304 closed bug (invalid)

Opened February 07, 2012 10:48PM UTC

Closed February 08, 2012 10:41AM UTC

Last modified February 08, 2012 03:15PM UTC

Excess code in script.js?

Reported by: dcherman Owned by:
Priority: low Milestone: None
Component: ajax Version: 1.7.1
Keywords: Cc:
Blocked by: Blocking:

I didn't want to file a PR since I might be wrong, but I don't think the following line actually does anything:

If s.crossDomain is true, the corresponding script ajaxTransport doesn't even use the s.type property, so why set it?

Attachments (0)
Change History (4)

Changed February 08, 2012 03:17AM UTC by jaubourg comment:1

Consistency: the request automagically became a GET request because it was cross domain, callbacks can inspect the options object and control/use it.

Changed February 08, 2012 04:09AM UTC by dcherman comment:2

Gotcha. Would you entertain a PR to add a comment above that line explaining exactly what you just described in case anyone has the same question in the future?

Changed February 08, 2012 10:41AM UTC by addyosmani comment:3

component: unfiledajax
priority: undecidedlow
resolution: → invalid
status: newclosed

@dcherman jaubourg may reply to this himself, but it's probably a good idea to go ahead and make the PR to add the comment and continue the discussion about whether it's worth adding on GH. That said, I imagine someone that has the same question in the future might try doing search of tickets on the tracker for further info.. :)

Changed February 08, 2012 03:15PM UTC by jaubourg comment:4

I honestly dunno if a comment would benefit much. Code is pretty straight-forward in stating that cross-domain script requests are handled as GET requests.