-
Notifications
You must be signed in to change notification settings - Fork 237
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add an option to set the expect 100 timeout (#376)
For larger request bodies, `curl` will use an `Expect` header to first validate the request headers before sending the actual body. However, if the server does not reply within `CURLOPT_EXPECT_100_TIMEOUT_MS` then the server will send the request anyways. This behaviour can sometimes lead to higher total latency since in the best case, an additional server roundtrip is required and in the worst case, the request is delayed by `CURLOPT_EXPECT_100_TIMEOUT_MS`. The best-case scenario is where the request is invalid and the server replies with a `417 Expectation Failed` without having to wait for or process the request body at all. This commit adds the ability to define a custom timeout or override it by setting it to zero.
- Loading branch information
Showing
3 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
Cargo.lock | ||
target/ | ||
.idea/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters