1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

net.http.chunked: return !string on decode (#18928)

This commit is contained in:
l-m
2023-07-21 13:37:55 +00:00
committed by GitHub
parent 8b4c3fa1d1
commit 36d45c6d14
3 changed files with 24 additions and 4 deletions

View File

@ -42,7 +42,7 @@ pub fn parse_response(resp string) !Response {
header := parse_headers(resp.substr(start_idx, end_idx))!
mut body := resp.substr(end_idx, resp.len)
if header.get(.transfer_encoding) or { '' } == 'chunked' {
body = chunked.decode(body)
body = chunked.decode(body)!
}
return Response{
http_version: version