Skip to content

Commit

Permalink
Ensure we set zero sized content length for empty strings
Browse files Browse the repository at this point in the history
  • Loading branch information
Keith Duncan committed Jan 6, 2015
1 parent 7f32e34 commit f9b5471
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.coffee
Expand Up @@ -31,7 +31,7 @@ class ScopedClient
#
# There is no way to conveniently assert in an else clause because the
# transfer encoding could be chunked or using a newer framing mechanism.
if sendingData and callback is undefined
if callback is undefined
headers['Content-Length'] = if sendingData then Buffer.byteLength(reqBody, @options.encoding) else 0

if @options.auth
Expand Down

0 comments on commit f9b5471

Please sign in to comment.