mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
net: fix chunked check, remove length workaround (#10472)
This commit is contained in:
parent
b0caadae31
commit
aaa59ac770
@ -68,9 +68,5 @@ pub fn decode(text string) string {
|
|||||||
cscanner.skip_crlf()
|
cscanner.skip_crlf()
|
||||||
}
|
}
|
||||||
cscanner.skip_crlf()
|
cscanner.skip_crlf()
|
||||||
if sb.len > 0 {
|
return sb.str()
|
||||||
return sb.str()
|
|
||||||
} else {
|
|
||||||
return text
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -66,9 +66,7 @@ pub fn parse_response(resp string) Response {
|
|||||||
parts := cookie.split_nth('=', 2)
|
parts := cookie.split_nth('=', 2)
|
||||||
cookies[parts[0]] = parts[1]
|
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)
|
text = chunked.decode(text)
|
||||||
}
|
}
|
||||||
return Response{
|
return Response{
|
||||||
|
Loading…
Reference in New Issue
Block a user