mirror of
https://github.com/curl/curl.git
synced 2026-04-11 12:01:42 +08:00
tool_operate: remove 'else' for VMS
It seems malplaced as it then avoids the following logic when invoked
from a VMS shell and that seems unlikely to be desired.
Based on code review. I have no system to try this on.
Follow-up to f1261bcdd7
Closes #20221
This commit is contained in:
parent
2aba8f613c
commit
8a25cf3d7c
@ -633,28 +633,27 @@ static CURLcode post_per_transfer(struct per_transfer *per,
|
||||
if(global->silent && !global->showerror)
|
||||
vms_show = VMSSTS_HIDE;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
if(!config->synthetic_error && result &&
|
||||
(!global->silent || global->showerror)) {
|
||||
const char *msg = per->errorbuffer;
|
||||
curl_mfprintf(tool_stderr, "curl: (%d) %s\n", result,
|
||||
msg[0] ? msg : curl_easy_strerror(result));
|
||||
if(result == CURLE_PEER_FAILED_VERIFICATION)
|
||||
fputs(CURL_CA_CERT_ERRORMSG, tool_stderr);
|
||||
}
|
||||
else if(config->fail == FAIL_WITH_BODY) {
|
||||
/* if HTTP response >= 400, return error */
|
||||
long code = 0;
|
||||
curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &code);
|
||||
if(code >= 400) {
|
||||
if(!global->silent || global->showerror)
|
||||
curl_mfprintf(tool_stderr,
|
||||
"curl: (%d) The requested URL returned error: %ld\n",
|
||||
CURLE_HTTP_RETURNED_ERROR, code);
|
||||
result = CURLE_HTTP_RETURNED_ERROR;
|
||||
}
|
||||
if(!config->synthetic_error && result &&
|
||||
(!global->silent || global->showerror)) {
|
||||
const char *msg = per->errorbuffer;
|
||||
curl_mfprintf(tool_stderr, "curl: (%d) %s\n", result,
|
||||
msg[0] ? msg : curl_easy_strerror(result));
|
||||
if(result == CURLE_PEER_FAILED_VERIFICATION)
|
||||
fputs(CURL_CA_CERT_ERRORMSG, tool_stderr);
|
||||
}
|
||||
else if(config->fail == FAIL_WITH_BODY) {
|
||||
/* if HTTP response >= 400, return error */
|
||||
long code = 0;
|
||||
curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &code);
|
||||
if(code >= 400) {
|
||||
if(!global->silent || global->showerror)
|
||||
curl_mfprintf(tool_stderr,
|
||||
"curl: (%d) The requested URL returned error: %ld\n",
|
||||
CURLE_HTTP_RETURNED_ERROR, code);
|
||||
result = CURLE_HTTP_RETURNED_ERROR;
|
||||
}
|
||||
}
|
||||
/* Set file extended attributes */
|
||||
if(!result && config->xattr && outs->fopened && outs->stream) {
|
||||
rc = fwrite_xattr(curl, per->url, fileno(outs->stream));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user