Bug Tracker

Opened 12 years ago

Closed 12 years ago

Last modified 11 years ago

#8152 closed bug (fixed)

Local ajax requests through chrome-extension:// protocol are not working

Reported by: anonymous Owned by: jaubourg
Priority: low Milestone: 1.5.1
Component: ajax Version: 1.5
Keywords: Cc:
Blocked by: Blocking:

Description

Ajax calls to local files inside Chrome extension are not working. I think this is related to #8125 bug.

When making local ajax calls from a Chrome extension they are mapped through chrome-extension:// protocol. I think you need to apply the same treatment to it as to file://

Change History (4)

comment:1 Changed 12 years ago by jaubourg

Component: unfiledajax
Milestone: 1.next1.5.1
Owner: set to jaubourg
Priority: undecidedlow
Status: newassigned

comment:2 Changed 12 years ago by jaubourg

Resolution: fixed
Status: assignedclosed

Fixes #8152 by applying the same special cases for protocol "chrome-extension:" as were for "file:" (needs tests). Re-organizes and fixes the handling of special cases for HTTP status code in the xhr transport. Also re-organizes the handling of document.location in ajax.js.

Changeset: d77a2a2274d34033da8609a26c9cc1f2bd14c879

comment:3 Changed 12 years ago by jaubourg

I marked this as fixed seeing as I applied the same tricks for the chrome-extension protocol as was in place for file. However, I cannot test it so I'd very much appreciate if somebody could confirm or infirm the fix, in which case I'll set up a test environment to look a little further.

comment:4 Changed 12 years ago by anonymous

I met a similar problem today. My browser is firefox 4.0pre11. I run the following code in "chrome://helloworld/content/index/index.html"

$.ajax({

type:"GET", url: "kkkmhDatabase.xml", dataType: "xml", success: function(xmlResponse){

alert("success");

}, error: function(jqxhr){

alert("error");

}

});

Both 1.4.4 and 1.5 will alert error.

Note: See TracTickets for help on using tickets.