-
Notifications
You must be signed in to change notification settings - Fork 324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support for fs: URIs without redirecting to http: #70
Conversation
Idk why the tests fail on travis. Running |
Thank you! I'll do my best to review and merge it this weekend. For now I did a quick check and tests pass for me too. It is probably a long shot, but maybe nodejs at Travis is too old? node_js:
- - "0.12"
+ - "4.1" and let's see if it helps. |
added that. Another thing of note, to make jpm happy locally I had to change the |
url: testpage, | ||
onReady: (tab) => { | ||
|
||
// first load somehow doesn't have protocol handlers registered. so load resource:// first, then redirect to fs:/ page |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, this is the same bug as in #33 (comment)
We probably need to do this workaround for now, hopefully it will be fixed in WebExtensions.
|
That seems to be latest stable. Is there no nightly? |
No nightly. Currently tests are run against latest |
Well, tests pass for me now. I blame whatever doesn't work on travis |
I did some manual tests locally under Indeed super weird: automated tests pass for me too, but when I tried to actually use it (enabled Interestingly, it seems to work fine if redirect is disabled AND gateway is offline: Could you please check if |
It displays the fs:/ uri for me in nightly and loads the cat. Works both with local and ipfs.io gateway. I have had some issues with jpm/npm modules though, maybe you're experiencing the same? Clearing it the generated folders and doing an npm update solved them for me. |
Removed My versions:
I run local version via Are you running clear profile without any auto-reloading addons? |
node v5.5.0 I have a dev profile which I use together with |
Just to be sure it is something on my end, |
Ok, yeah, now I'm seeing it too sigh Will fix. |
should work now. |
support for fs: URIs without redirecting to http: - disabled by default - implements #48
Merged – thank you! Let's follow this in related issues: |
catman.addCategoryEntry(in string aCategory, in string aEntry, in string aValue, in boolean aPersist, in boolean aReplace) | ||
*/ | ||
|
||
function fixupRequest (e) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@the8472 I am going over the backlog and trying to have a better understanding of this part of code. I see this is related to protocols.js#L121-L131 but can't infer full picture from code alone.
Could you elaborate what is the purpose of this fixup?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not entirely sure if it's still necessary.
There were some cases with redirects coming from the server which needed the LOAD_REPLACE flag to be removed. If it is not removed the new channel's URI overrides originalURI which leads to a http URI in the address bar.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works with and without e10s for basic resource loading and I also tested it against the case in #3. But it most likely needs some further testing to weed out edge-cases, so i've marked it as default-off and experimental.
Basically, from firefox's view this all runs under CORS policy because we're running the HTTP requests with the principals of the fs:/ document instead of implementing our own channels which then delegate to a privileged HTTP channel
Getting the URLs a tiny bit wrong causes redirects from the gateways which then can then void the CORS permissions under circumstances.
Implementing as a custom channel wrapper around http channels might be more robust wrt. CORS but currently is way too troublesome under e10s until the FF devs improve support (or documentation) there.