diff --git a/vlib/net/http/chunked/dechunk.v b/vlib/net/http/chunked/dechunk.v index 446eaeb07a..0e82586e4c 100644 --- a/vlib/net/http/chunked/dechunk.v +++ b/vlib/net/http/chunked/dechunk.v @@ -68,9 +68,5 @@ pub fn decode(text string) string { cscanner.skip_crlf() } cscanner.skip_crlf() - if sb.len > 0 { - return sb.str() - } else { - return text - } + return sb.str() } diff --git a/vlib/net/http/response.v b/vlib/net/http/response.v index 7a021e077f..5f4b794165 100644 --- a/vlib/net/http/response.v +++ b/vlib/net/http/response.v @@ -66,9 +66,7 @@ pub fn parse_response(resp string) Response { parts := cookie.split_nth('=', 2) cookies[parts[0]] = parts[1] } - if header.get(.transfer_encoding) or { '' } == 'chunked' || header.get(.content_length) or { - '' - } == '' { + if header.get(.transfer_encoding) or { '' } == 'chunked' { text = chunked.decode(text) } return Response{