Uncapitalize cURL errors

This commit is contained in:
Přemysl Eric Janouch 2017-06-05 13:05:33 +02:00
parent 99f2117d4c
commit 0541b7e179
Signed by: p
GPG Key ID: B715679E3A361BE6
1 changed files with 8 additions and 0 deletions

View File

@ -149,6 +149,13 @@ latin1_to_utf8 (const char *latin1)
return str_steal (&converted); return str_steal (&converted);
} }
static void
cstr_uncapitalize (char *s)
{
if (isupper (s[0]) && islower (s[1]))
s[0] = tolower_ascii (s[0]);
}
static int static int
print_curl_debug (CURL *easy, curl_infotype type, char *data, size_t len, print_curl_debug (CURL *easy, curl_infotype type, char *data, size_t len,
void *ud) void *ud)
@ -2366,6 +2373,7 @@ streams_tab_on_downloaded (CURLMsg *msg, struct poller_curl_task *task)
if (msg->data.result if (msg->data.result
&& msg->data.result != CURLE_WRITE_ERROR) && msg->data.result != CURLE_WRITE_ERROR)
{ {
cstr_uncapitalize (self->curl.curl_error);
print_error ("%s", self->curl.curl_error); print_error ("%s", self->curl.curl_error);
return; return;
} }