Bug Tracker

Modify

Ticket #8152 (closed bug: fixed)

Opened 3 years ago

Last modified 2 years ago

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:
Blocking: Blocked by:

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

comment:1 Changed 3 years ago by jaubourg

  • Owner set to jaubourg
  • Priority changed from undecided to low
  • Status changed from new to assigned
  • Component changed from unfiled to ajax
  • Milestone changed from 1.next to 1.5.1

comment:2 Changed 3 years ago by jaubourg

  • Status changed from assigned to closed
  • Resolution set to fixed

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 3 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 3 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.

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.