Skip to content

fix(node-http-handler): Write request body if 100 Continue response takes more than 1 second #1505

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

Merged
merged 2 commits into from
Jan 15, 2025

Conversation

Nevon
Copy link
Contributor

@Nevon Nevon commented Jan 15, 2025

Fixes the issue reported here: aws/aws-sdk-js-v3#6805

Description of changes:

When the client makes a request with the Expect: 100-continue header, it will wait for 1000ms to get either a 100 Continue response or an error. If it does not receive any response within the 1000ms, the intention seems to be that the client should write the body anyway. This behavior broke in #1459 because in the timeout case resolve is called with no arguments, which means that sendBody becomes undefined and the body is never sent. Even if the server returns a 100 Continue after 1001ms, the client is no longer waiting for that response and instead just idles until eventually the server returns an error.

This change restores the previous behavior, where the client will send the body after waiting 1000ms.


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@Nevon Nevon requested a review from a team as a code owner January 15, 2025 13:34
@Nevon Nevon force-pushed the fix/expect-continue-timeout branch 2 times, most recently from 2bc5862 to 688784e Compare January 15, 2025 13:42
@kuhe kuhe force-pushed the fix/expect-continue-timeout branch from 688784e to 93ea173 Compare January 15, 2025 18:42
@kuhe
Copy link
Contributor

kuhe commented Jan 15, 2025

the client will send the body after waiting 1000ms.

I changed this to 6000ms, explained inline comments.

@kuhe kuhe merged commit fbd06eb into smithy-lang:main Jan 15, 2025
10 checks passed
@Nevon Nevon deleted the fix/expect-continue-timeout branch January 16, 2025 06:57
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.

2 participants