Default protocol is inconsistent with Node's.
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 38/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- javascript
Research direction
Start by locating the request-option path that chooses a protocol when none is supplied, and compare its behavior with Node's http.request documentation. Reproduce the issue from a local file:// page and verify that an unspecified protocol defaults to http: rather than file:.
Written by the indexing model from the issue text.
Description
If not specified, http-browserify sets the protocol to window.location.protocol. This differs from the behavior of Node (see https://nodejs.org/api/http.html#http_http_request_options_callback ). I assume the reasoning was to make https requests if the current location is also https (but I could be wrong here).
Does it make sense to mimic Node's behavior exactly, and just default to http: ?
The issue I'm running into is when running a script locally in the browser, so the protocol is "file:". http-browserify then tries to make file:// requests, which obviously fail.
- Dominant language
- JavaScript
- Stars
- 245
- Forks
- 104
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from browserify/http-browserify
-
Difficulty 2/5 1-3 hours Newbie friendliness 52/100
browserify/http-browserify#107 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 42/100
browserify/http-browserify#104 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 48/100
browserify/http-browserify#102 ·
-
Needs Maintainer Open
Difficulty 5/5 Over a week Newbie friendliness 15/100
browserify/http-browserify#99 · 2 reactions ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
All issues in browserify/http-browserify
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
palladius/rails8-app-on-gcp#145 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
dotenvx/dotenv-vscode#139 ·
-
test-change-proposal
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
web-platform-tests/interop#1455 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
corsairdev/corsair#1764 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100