Skip to content
This repository has been archived by the owner on Mar 10, 2020. It is now read-only.

Fix support for /https multiaddrs passed to constructor #965

Merged
merged 1 commit into from
Apr 9, 2019

Conversation

lidel
Copy link
Contributor

@lidel lidel commented Apr 8, 2019

Bug

Pointing Web UI at /https multiaddr did not work: it was not able to connect to API over HTTPS, always tried HTTP (ipfs/ipfs-webui#989):

I tracked the bug up to ipfs-http-client constructor: only host and port were read from multiaddr, protocol was ignored and unencrypted HTTP was used for all multiaddrs:
https://github.com/ipfs/js-ipfs-http-client/blob/21cdcc5100b32e3ac1e75ec70022b9b28b0aede1/src/index.js#L27-L28

Fix

This PR:

  • improves parsing of multiaddr constructor parameter
  • adds tests to ensure HTTPS is respected in all scenarios
  • updates iso-stream-http to v0.1.2 which includes unrelated fix for "https does not exist" error

@ghost ghost assigned lidel Apr 8, 2019
@ghost ghost added the in progress label Apr 8, 2019
Passing HTTPS multiaddr as a string to constructor did not work,
protocol was ignored and unencrypted HTTP was used.

This commit improves parsing of multiaddr constructor parameter
and adds tests to ensure HTTPS is respected in all scenarios.

It also updates iso-stream-http to v0.1.2
which includes fix for "https does not exist"

License: MIT
Signed-off-by: Marcin Rataj <lidel@lidel.org>
@lidel lidel force-pushed the fix/https-multiaddr-support branch from 170235b to 2876d32 Compare April 8, 2019 21:29
@alanshaw alanshaw merged commit 5da0bcd into master Apr 9, 2019
@alanshaw alanshaw deleted the fix/https-multiaddr-support branch April 9, 2019 15:38
@ghost ghost removed the in progress label Apr 9, 2019
lidel added a commit to ipfs-inactive/ipfs-redux-bundle that referenced this pull request Apr 9, 2019
- updates js-ipfs-http-client to 30.1.2
  ipfs-inactive/js-ipfs-http-client#965
- adds tests for implicit http vs explicit https
olizilla pushed a commit to ipfs-inactive/ipfs-redux-bundle that referenced this pull request Apr 10, 2019
- updates js-ipfs-http-client to 30.1.2
  ipfs-inactive/js-ipfs-http-client#965
- adds tests for implicit http vs explicit https
olizilla added a commit to ipfs/ipfs-webui that referenced this pull request Apr 10, 2019
- Update to ipfs-redux-bundle@5.1.1 to get fixes for ipfs-inactive/js-ipfs-http-client#965

License: MIT
Signed-off-by: Oli Evans <oli@tableflip.io>
olizilla added a commit to ipfs/ipfs-webui that referenced this pull request Apr 10, 2019
- Update to ipfs-redux-bundle@5.1.1 to get fixes for ipfs-inactive/js-ipfs-http-client#965

License: MIT
Signed-off-by: Oli Evans <oli@tableflip.io>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants