-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1690b26
commit 3c8f52a
Showing
1 changed file
with
7 additions
and
6 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,16 +1,17 @@ | ||
diff --git a/src/tool_operate.c b/src/tool_operate.c | ||
index e6ca575..4f3e65f 100644 | ||
index a1212c9..16334d3 100644 | ||
--- a/src/tool_operate.c | ||
+++ b/src/tool_operate.c | ||
@@ -622,6 +622,11 @@ static CURLcode post_per_transfer(struct GlobalConfig *global, | ||
free(per->outfile); | ||
free(per->uploadfile); | ||
|
||
@@ -772,6 +772,12 @@ skip: | ||
free(per->errorbuffer); | ||
curl_slist_free_all(per->hdrcbdata.headlist); | ||
per->hdrcbdata.headlist = NULL; | ||
+ | ||
+ /* return exit code 1 when flag --fail is used */ | ||
+ if (config->failonerror && (CURLE_HTTP_RETURNED_ERROR == result)) { | ||
+ result = CURLE_UNSUPPORTED_PROTOCOL; | ||
+ } | ||
+ | ||
return result; | ||
} | ||
|
||