Skip to content

Commit

Permalink
handle 'continue' event only once
Browse files Browse the repository at this point in the history
Linode Object Storage sends multiple '100 continue' lines as a response
to 'Expect: 100-continue'. This causes node.js to parse the response
correctly and fire the 'continue' event twice.

See also aws#3404
  • Loading branch information
gramakri committed Mar 24, 2021
1 parent 307e826 commit ab34454
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/http/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ AWS.NodeHttpClient = AWS.util.inherit({

var expect = httpRequest.headers.Expect || httpRequest.headers.expect;
if (expect === '100-continue') {
stream.on('continue', function() {
stream.once('continue', function() {
self.writeBody(stream, httpRequest);
});
} else {
Expand Down

0 comments on commit ab34454

Please sign in to comment.