Skip to content

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

Merged
merged 1 commit into from Jan 6, 2014

2 participants

@joshisa
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 fzaninotto merged commit 1f32cef into fzaninotto:master Jan 6, 2014

1 check passed

Details default Scrutinizer: 103 new/changed issues
@fzaninotto
Owner

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.