Bug Tracker

Opened 13 years ago

Closed 12 years ago

Last modified 11 years ago

#6873 closed bug (duplicate)

Incorrect cross-site XHR detecting

Reported by: oryol Owned by:
Priority: undecided Milestone: 1.4.3
Component: ajax Version: 1.4.2
Keywords: Cc:
Blocked by: Blocking:


Following code may work incorrect for default (80) http port: var parts = rurl.exec( s.url ),

remote = parts && (parts[1] && parts[1] !== location.protocol
parts[2] !== location.host);

For example IE9 (Preview 4) returns default port in window.location.host (for example - 'localhost:80'). Even more - if we send XHR to 'http://some-host:80/some-path', then jQuery will detect it as remote query (which is wrong).

We need to check for both hosts (parts[2] and location.host) that them contains (or not) port. If not - add default 80.

Change History (2)

comment:1 Changed 12 years ago by snover

Priority: undecided
Resolution: duplicate
Status: newclosed

comment:2 Changed 12 years ago by snover

Duplicate of #6908.

Note: See TracTickets for help on using tickets.