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

Return empty buffer (instead of empty string) when an empty response body is received and encoding is set to null #1286

Closed
wants to merge 1 commit into from

Conversation

ramonsnir
Copy link

I manually set encoding: null, and indeed receive the body as a Buffer. However, if the response body is empty (Content-Length: 0), then the body is returned as an empty string (and of course type errors are thrown everywhere).

…body is received and encoding is set to null
@nylen
Copy link
Member

nylen commented Nov 28, 2014

Looks good, but:

  1. can you fix the code style issues (see travis build output)
  2. can we get a test for this

@seanstrom
Copy link
Contributor

I created another PR to finish the work done here. I just added tests.
Thank you @ramonsnir

@nylen
Copy link
Member

nylen commented Dec 31, 2014

Merged #1330.

@nylen nylen closed this Dec 31, 2014
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.

None yet

3 participants