tool_cb_hdr: Fix etag warning output and return code

- Return 'failure' on failure, to follow the existing style.

- Put Warning: and the warning message on the same line.

Ref: https://github.com/curl/curl/issues/5610

Closes https://github.com/curl/curl/pull/5612
This commit is contained in:
Jay Satiro 2020-06-26 02:26:41 -04:00
parent 43f7ffb6c4
commit cb85275377
1 changed files with 4 additions and 4 deletions

View File

@ -119,8 +119,8 @@ size_t tool_header_cb(char *ptr, size_t size, size_t nmemb, void *userdata)
if(!first) {
warnf(per->config->global,
"\nReceived header etag is missing double quote/s\n");
return 1;
"Received header etag is missing double quote/s\n");
return failure;
}
else {
/* discard first double quote */
@ -132,8 +132,8 @@ size_t tool_header_cb(char *ptr, size_t size, size_t nmemb, void *userdata)
if(!last) {
warnf(per->config->global,
"\nReceived header etag is missing double quote/s\n");
return 1;
"Received header etag is missing double quote/s\n");
return failure;
}
/* get length of desired etag */