Closed Bug 1177403 Opened 10 years ago Closed 10 years ago

Unable to load http package resources with fetch() or xhr

Categories

(Core :: Networking: HTTP, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla42
Tracking Status
firefox41 --- affected
firefox42 --- fixed

People

(Reporter: fabrice, Assigned: valentin)

References

Details

Attachments

(1 file)

In a chrome js context, both: fetch("http://foo.com/package.apk!//data.json") and using @mozilla.org/xmlextras/xmlhttprequest;1 fail to load the resource with a networking error.
Blocks: 1170823
Comment on attachment 8626409 [details] [diff] [review] Unable to load http package resources with fetch() or xhr Review of attachment 8626409 [details] [diff] [review]: ----------------------------------------------------------------- ::: netwerk/protocol/http/PackagedAppService.cpp @@ +555,2 @@ > nsCOMPtr<nsIChannel> channel; > rv = NS_NewChannel( maybe use NS_NewChannel2() and pass aInfo? (if I'm not wrong)
(In reply to Honza Bambas (:mayhemer) from comment #2) > Comment on attachment 8626409 [details] [diff] [review] > Unable to load http package resources with fetch() or xhr > > Review of attachment 8626409 [details] [diff] [review]: > ----------------------------------------------------------------- > > ::: netwerk/protocol/http/PackagedAppService.cpp > @@ +555,2 @@ > > nsCOMPtr<nsIChannel> channel; > > rv = NS_NewChannel( > > maybe use NS_NewChannel2() and pass aInfo? (if I'm not wrong) NewChannel2 doesn't take a LoadContextInfo, and I'd still need to pass the LOAD_ANONYMOUS flag when needed.
(In reply to Valentin Gosu [:valentin] from comment #3) > (In reply to Honza Bambas (:mayhemer) from comment #2) > > Comment on attachment 8626409 [details] [diff] [review] > > Unable to load http package resources with fetch() or xhr > > > > Review of attachment 8626409 [details] [diff] [review]: > > ----------------------------------------------------------------- > > > > ::: netwerk/protocol/http/PackagedAppService.cpp > > @@ +555,2 @@ > > > nsCOMPtr<nsIChannel> channel; > > > rv = NS_NewChannel( > > > > maybe use NS_NewChannel2() and pass aInfo? (if I'm not wrong) > > NewChannel2 doesn't take a LoadContextInfo, and I'd still need to pass the > LOAD_ANONYMOUS flag when needed. Ah! This is nsILoadContextInfo (should rename this interface probably..) which is the necko/cache specific stuff. Not nsILoadInfo. I was wrong :)
Attachment #8626409 - Flags: review?(mcmanus) → review+
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: