browserify / browserify/http-browserify
http browserify broken when sending a full node url object
- 主要言語
- JavaScript
- スター
- 245
- フォーク
- 104
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
```
var url = {
host: "localhost:8081",
hostname: "localhost",
href: "http://localhost:8081/api/foo?bar=baz",
method: "GET",
path: "/api/foo?bar=baz",
pathname: "/api/foo",
port: "8081",
protocol: "http:",
query: "bar=baz",
search: "?bar=baz",
slashes: true
};
var request = http.get(url, noop);
```
```
expected: "http://localhost:8081/api/foo?bar=baz"
actual: "http://localhost:8081:8081/api/foo?bar=baz"
```
The url that is requested has the port in it 2 times. This is because of this line.
https://github.com/substack/http-browserify/blob/master/index.js#L7
I am finishing up a pull request to fix this where it will try host first, then hostname+port.
Please let me know if you have any input.
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
index.js の 7 行目から始めます。ここでは、渡された Node URL object からリクエスト URL が組み立てられます。http.get を使って例を再現し、生成された URL が http://localhost:8081/api/foo?bar=baz となり、ポートが 1 回だけ含まれていることを確認してください。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript
- 領域
- web-dev
- issue の種類
- バグ
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 活発さ
- 停滞
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 48/100