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

missing response.setEncoding('utf8') #119

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jackyz
Copy link

@jackyz jackyz commented Nov 28, 2012

I thought oauth2.js missed one line response.setEncoding('utf8'), the oauh.js has this line.

But missing the line, the chunk is a buffer, and result+= chunk will cause encoding problem. Because one char in utf8 (one char in may bytes) maybe separated into two buffers. and result+=chunk implies chunk convert to string first, so one good char becomes two broken char.

This is the same problem as issues #118, and I think pull request #80 is a good idea, but it should be applied to oauth2.js as well.

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.

1 participant