browserify / browserify/http-browserify
Default protocol is inconsistent with Node's.
- Vorherrschende Sprache
- JavaScript
- Sterne
- 245
- Forks
- 104
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
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.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
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:.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript
- Bereich
- api, web-dev
- Issue-Typ
- Bug
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 38/100