Response inherits from Stream instead of Stream.Readable (requiring request module browserify workaround)
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 38/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- javascript, node.js
- 領域
- web-dev
調査の方向性
http-browserify の Response の定義とその util.inherits 呼び出しから始め、issue に示されている Node の IncomingMessage の継承と比較してください。request.js の回避策を確認し、Response を Streams2 に変換するために継承以外の変更が必要かどうかを判断してください。ブラウザーのレスポンスが resume() を含む期待される Readable API を、この互換性回避策なしで公開すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
On node.js, the HTTP response object (which is named IncomingMessage in node.js) inherits from Stream.Readable:
util.inherits(IncomingMessage, Stream.Readable);
but in http-browserify, it only inherits from Stream:
util.inherits(Response, Stream);
This means the full stream API is not available as it is in Node, including the .resume() method. I believe this is the reason for this hack in the request module:
} else if (response.resume) {
// response.resume should be defined, but check anyway before calling.
// Workaround for browserify.
response.resume()
}
to improve compatibility would it be possible for http-browserify Response to inherit from Stream.Readable? (are there any other changes needed than changing the utils.inherits call?)
edit: Stream is old-style (pre-0.10); this amounts to converting http-browserify to Streams2
- 主要言語
- JavaScript
- スター
- 245
- フォーク
- 104
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
browserify/http-browserify のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 52/100
browserify/http-browserify#107 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 42/100
browserify/http-browserify#104 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 48/100
browserify/http-browserify#102 ·
-
Needs Maintainer オープン
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
browserify/http-browserify#99 · リアクション 2 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 38/100
browserify/http-browserify#96 · コメント 2 件 · リアクション 1 件 ·
browserify/http-browserify の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
mksglu/context-mode#1200 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
neondatabase/website#5944 ·
-
module: core
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
bigbluebutton/bigbluebutton#25849 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
jaegertracing/jaeger-ui#4506 ·