Bug Tracker

Modify

Ticket #11003 (closed bug: invalid)

Opened 18 months ago

Last modified 4 months ago

Authorization $.ajax issue (maybe with CORS)

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

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

comment:1 Changed 18 months ago by timmywil

  • Owner set to siegerstein
  • Priority changed from undecided to low
  • Status changed from new to pending
  • Component changed from unfiled to ajax

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 18 months ago by anonymous

FB issue. Please close it.

comment:3 follow-up: ↓ 4 Changed 18 months ago by ajpiano

  • Status changed from pending to closed
  • Resolution set to invalid

Closing per OP's request

comment:4 in reply to: ↑ 3 ; follow-up: ↓ 5 Changed 4 months 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 4 months 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

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.