Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't reply with stream returned by node core http client methods #2301

Closed
nlf opened this issue Dec 18, 2014 · 3 comments
Closed

can't reply with stream returned by node core http client methods #2301

nlf opened this issue Dec 18, 2014 · 3 comments
Assignees
Labels
Milestone

Comments

@nlf
Copy link
Member

@nlf nlf commented Dec 18, 2014

For example

server.route({
  method: 'GET',
  path: '/',
  handler: function (request, reply) {
    reply(Http.get('http://google.com'));
  }
});

Will throw TypeError: Cannot read property 'objectMode' of undefined due to the fact that the http module has _readableState hidden behind a property. This also impacts request and wreck.

@nlf nlf added the bug label Dec 18, 2014
@nlf nlf self-assigned this Dec 18, 2014
@hueniverse hueniverse added this to the 8.1.0 milestone Jan 5, 2015
kanongil added a commit to kanongil/hapi that referenced this issue Jan 30, 2015
This replaces "TypeError: Cannot read property 'objectMode' of undefined" error response

Fixes hapijs#2368 & hapijs#2301
@kanongil
Copy link
Contributor

@kanongil kanongil commented Jan 30, 2015

@nlf You're using Http.get wrong. Actual fix can be found in #2382.

@hueniverse
Copy link
Contributor

@hueniverse hueniverse commented Feb 9, 2015

@kanongil Why is @nlf using it wrong?

@kanongil
Copy link
Contributor

@kanongil kanongil commented Feb 9, 2015

@hueniverse Http.get creates a Writablestream for POSTing stuff, etc. You only read from the response.

kanongil added a commit to kanongil/hapi that referenced this issue Feb 20, 2015
This replaces "TypeError: Cannot read property 'objectMode' of undefined" error response

Fixes hapijs#2368 & hapijs#2301
kanongil added a commit to kanongil/hapi that referenced this issue Feb 20, 2015
This replaces "TypeError: Cannot read property 'objectMode' of undefined" error response

Fixes hapijs#2368 & hapijs#2301
@lock lock bot locked as resolved and limited conversation to collaborators Jan 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

3 participants