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

fix Buffer.byteLength(req._header) throwing error #490

Merged
merged 1 commit into from
Jul 3, 2018
Merged

fix Buffer.byteLength(req._header) throwing error #490

merged 1 commit into from
Jul 3, 2018

Conversation

egorovli
Copy link
Contributor

@egorovli egorovli commented Jun 2, 2018

according to #458, got throws error in some cases when trying to pipe one got.stream into another one:

buffer.js:514
    throw new ERR_INVALID_ARG_TYPE(
    ^

TypeError [ERR_INVALID_ARG_TYPE]: The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type object
    at Function.byteLength (buffer.js:514:11)
    at Timeout.setInterval [as _onTimeout] (/Users/egorovli/Dev/project/api/node_modules/got/index.js:207:35)
    at ontimeout (timers.js:427:11)
    at tryOnTimeout (timers.js:289:5)
    at listOnTimeout (timers.js:252:5)
    at Timer.processTimers (timers.js:212:10)

this commit should fix this behavior, according to #458 (comment)

@rainder
Copy link

rainder commented Jun 7, 2018

any update on this?

@aoberoi
Copy link

aoberoi commented Jul 3, 2018

@sindresorhus @floatdrop @alextes @lukechilds any intention to merge this?

@lukechilds
Copy link
Contributor

@aoberoi Woops, this slipped under the radar, looks good to me.

@egorovli Thanks for tracking down the issue! Apologies for the delay.

@lukechilds lukechilds merged commit d7641e5 into sindresorhus:master Jul 3, 2018
@sindresorhus
Copy link
Owner

Released as 8.3.2

@egorovli egorovli deleted the egorovli-fix-req-headers-length branch July 13, 2018 07:41
This was referenced Aug 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants