diff options
| author | 2023-01-12 09:28:02 +0100 | |
|---|---|---|
| committer | 2023-01-12 09:28:02 +0100 | |
| commit | bb0d8f2a2755af5e11b46d32be84155ba71ea534 (patch) | |
| tree | 86eb998f66c875dc7d2d40ba3021a3e69ffe9400 /xs_curl.h | |
| parent | Show the More... link above the 'About this site'. (diff) | |
| download | snac2-bb0d8f2a2755af5e11b46d32be84155ba71ea534.tar.gz snac2-bb0d8f2a2755af5e11b46d32be84155ba71ea534.tar.xz snac2-bb0d8f2a2755af5e11b46d32be84155ba71ea534.zip | |
Backport from xs.
Diffstat (limited to 'xs_curl.h')
| -rw-r--r-- | xs_curl.h | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -21,13 +21,13 @@ static size_t _header_callback(char *buffer, size_t size, | |||
| 21 | /* get the line */ | 21 | /* get the line */ |
| 22 | l = xs_str_new(NULL); | 22 | l = xs_str_new(NULL); |
| 23 | l = xs_append_m(l, buffer, size * nitems); | 23 | l = xs_append_m(l, buffer, size * nitems); |
| 24 | l = xs_strip(l); | 24 | l = xs_strip_i(l); |
| 25 | 25 | ||
| 26 | /* only the HTTP/x 200 line and the last one doesn't have ': ' */ | 26 | /* only the HTTP/x 200 line and the last one doesn't have ': ' */ |
| 27 | if (xs_str_in(l, ": ") != -1) { | 27 | if (xs_str_in(l, ": ") != -1) { |
| 28 | xs *knv = xs_split_n(l, ": ", 1); | 28 | xs *knv = xs_split_n(l, ": ", 1); |
| 29 | 29 | ||
| 30 | xs_tolower(xs_list_get(knv, 0)); | 30 | xs_tolower_i(xs_list_get(knv, 0)); |
| 31 | 31 | ||
| 32 | headers = xs_dict_set(headers, xs_list_get(knv, 0), xs_list_get(knv, 1)); | 32 | headers = xs_dict_set(headers, xs_list_get(knv, 0), xs_list_get(knv, 1)); |
| 33 | } | 33 | } |