hurl | Simple gopher and http(s) client. |
| download: http://git.y1.nz/archives/hurl.tar.gz | |
| README | Files | Log | Refs | LICENSE |
commit 266933a3410be837c5dbd4a03b5a618acc0199b4 parent 59def2c4c0c35c5a6fd38fe209343232f510d903 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Wed, 11 Aug 2021 12:14:46 +0200 fix received content-length counting for binary data Reported by adc, thanks! Diffstat:
| M | hurl.c | 4 | ++-- |
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hurl.c b/hurl.c @@ -336,7 +336,7 @@ https_request(void) *p = '\0'; /* NUL terminate header part */ cs = parse_content_length(buf, &expectedlen); p += strlen("\r\n\r\n"); - bodylen = strlen(p); /* (partial) body after header */ + bodylen = len - (p - buf); /* (partial) body after header */ if (httpok) { n = len - (p - buf); @@ -462,7 +462,7 @@ http_request(void) *p = '\0'; /* NUL terminate header part */ cs = parse_content_length(buf, &expectedlen); p += strlen("\r\n\r\n"); - bodylen = strlen(p); /* (partial) body after header */ + bodylen = len - (p - buf); /* (partial) body after header */ if (httpok) { n = len - (p - buf);
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.