Bug Tracker

Opened 8 years ago

Closed 8 years ago

Last modified 7 years ago

#11003 closed bug (invalid)

Authorization $.ajax issue (maybe with CORS)

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

Description

$.ajax({
  url: "http://www.google.com.ua",
  dataType: "json",
  username: "admin",
  password: "123"
});

try this code, and you will find an error, and no call to server at all:

[Exception... "Access to restricted URI denied" code: "1012" nsresult: "0x805303f4 (NS_ERROR_DOM_BAD_URI)"

but comment authorization lines, and it works (assume we have CORS enabled)

$.ajax({
  url: "http://www.google.com.ua",
  dataType: "json"
});

and we can see, that jquery sends a call to server.

Change History (5)

comment:1 Changed 8 years ago by timmywil

Component: unfiledajax
Owner: set to siegerstein
Priority: undecidedlow
Status: newpending

Thanks for taking the time to contribute to the jQuery project! Please provide a complete reduced test case to help us assess your ticket.

Additionally, be sure to test against the jQuery Git version to ensure the issue still exists.

comment:2 Changed 8 years ago by anonymous

FB issue. Please close it.

comment:3 Changed 8 years ago by ajpiano

Resolution: invalid
Status: pendingclosed

Closing per OP's request

comment:4 in reply to:  3 ; Changed 7 years ago by m.shumov@…

Replying to ajpiano:

Closing per OP's request

What is the resolution if you don't mind me asking? I'm having the same issue and the most right place where the answer can be get says "FB issue, resolution: invalid" Can you please explain what is causing this issue?

comment:5 in reply to:  4 Changed 7 years ago by m.shumov@…

Replying to m.shumov@…:

Replying to ajpiano:

Closing per OP's request

What is the resolution if you don't mind me asking? I'm having the same issue and the most right place where the answer can be get says "FB issue, resolution: invalid" Can you please explain what is causing this issue?

Issue explanation: http://jquery-howto.blogspot.ca/2009/04/cross-domain-ajax-querying-with-jquery.html

Note: See TracTickets for help on using tickets.