-
Notifications
You must be signed in to change notification settings - Fork 123
100 Continue is not handled correctly in all cases #461
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
Comments
From what I can see this is not actually an issue of AHC, but of SwiftNIO. We should keep the issue open here though. |
This issue hasn't been fully fixed yet. |
@MFranceschi6 We will release a new version of AHC shortly. Once you have updated, you will not need any special handling for your request anymore. It should just work, without any retries whatsoever. Thanks for reporting the issue. If you run into any further issues please reach out! |
Released in 1.6.4 |
Thank you very much I will let you know ASAP if the release has fixed the issue. |
Issue related to:
AsyncHttpClient Version 1.6.0 onward
Context:
We interact with a server that always responds first with a 100 continue status code. Before version 1.6 we were able to handle this case with something like this:
After version 1.6 the client started to throw the new
httpEndReceivedAfterHeadWith1xx
error thown hereasync-http-client/Sources/AsyncHTTPClient/ConnectionPool/HTTPRequestStateMachine.swift
Lines 531 to 538 in 1361ecc
Now we are exactly in this situation and we changed the code above with:
But this doesn't work anymore.
As a quirk fix for our case, we found that modifying the handling of the error at line 538 with
return .failRequest(error, .none)
The
handleContinueStatusCode
start to work again. But we don't know what other impacts this change has.For an additional Insight I add here the curl of the request that fails:
Swift version:
Swift version 5.5 (swift-5.5-RELEASE)
Target: x86_64-unknown-linux-gnu
The text was updated successfully, but these errors were encountered: