browserify / browserify/http-browserify

Default protocol is inconsistent with Node's.

オープン
#96 コメント 2 件 リアクション 1 件 担当者 0 名 GitHub で見る
主要言語
JavaScript
スター
245
フォーク
104
PR マージ指標
30日以内にマージされた PR はありません

説明

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.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

まず、プロトコルが指定されていない場合にプロトコルを選択するリクエストオプションのパスを特定し、その動作を Node's http.request のドキュメントと比較します。ローカルの file:// ページから問題を再現し、指定されていないプロトコルが file: ではなく http: をデフォルトにすることを確認します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
javascript
領域
api, web-dev
issue の種類
バグ
難易度
2/5
見積もり時間
1〜3時間
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
38/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。