tool_operate: bail if set CURLOPT_HTTP09_ALLOWED returns error

Closes #6727
This commit is contained in:
Daniel Stenberg 2021-03-11 15:37:52 +01:00
parent 32a71333d4
commit 985c184d5b
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2
1 changed files with 4 additions and 0 deletions

View File

@ -1460,6 +1460,10 @@ static CURLcode single_transfer(struct GlobalConfig *global,
/* new in libcurl 7.64.0 */
my_setopt(curl, CURLOPT_HTTP09_ALLOWED,
config->http09_allowed ? 1L : 0L);
if(result) {
errorf(global, "HTTP/0.9 is not supported in this build!\n");
return result;
}
} /* (built_in_protos & CURLPROTO_HTTP) */