Use Buffer.byteLength instead of string length for Content-Length header #213

Merged
merged 1 commit into from Jan 6, 2014

Conversation

Projects
None yet
2 participants
@joshisa
Contributor

joshisa commented Dec 23, 2013

This prevents Content-Length mismatches when sending multi-byte characters and potential socket hang ups.

See https://groups.google.com/forum/?fromgroups=#!topic/nodejs/LAxACfj5_KI.

http://stackoverflow.com/questions/18692580/node-js-post-causes-error-socket-hang-up-code-econnreset

fzaninotto added a commit that referenced this pull request Jan 6, 2014

Merge pull request #213 from joshisa/master
Use Buffer.byteLength instead of string length for Content-Length header

@fzaninotto fzaninotto merged commit 1f32cef into fzaninotto:master Jan 6, 2014

1 check passed

default Scrutinizer: 103 new/changed issues
Details
@fzaninotto

This comment has been minimized.

Show comment
Hide comment
@fzaninotto

fzaninotto Jan 6, 2014

Owner

Thanks!

Owner

fzaninotto commented Jan 6, 2014

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment