jhiesey / stream-http

Streaming node http in the browser
MIT License
354 stars 62 forks source link

http.IncomingMessage is undefined #81

Closed De-Lac closed 6 years ago

De-Lac commented 7 years ago

Even using stream-http with browserify, I still got undefined error on http.IncoingMessage.

This is my code:

var http = require('stream-http');
var req = Object.create(http.IncomingMessage.prototype)

TypeError: undefined is not an object (evaluating 'http.IncomingMessage.prototype')

jhiesey commented 6 years ago

Thanks for reporting this. Fixed version coming in version 2.8.0

jhiesey commented 6 years ago

Fixed in https://github.com/jhiesey/stream-http/commit/bf580d32ddf792c568b2b80daa3080f37bfa9ada

EricRabil commented 6 years ago

This does not appear to be resolved. http.IncomingMessage.prototype is still undefined in v2.8.0

jhiesey commented 6 years ago

Whoops, sorry about that. I'll take a look tomorrow.

jhiesey commented 6 years ago

This time I added some tests so hopefully it's right! Will publish as soon as Travis tests run.

jhiesey commented 6 years ago

Published as v2.8.1