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

net: fix 0 length file if Content-Header is missing or corrupt (#10464)

This commit is contained in:
JalonSolov 2021-06-15 00:29:02 -04:00 committed by GitHub
parent 9bfec97a6d
commit 12bb0c236a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -68,5 +68,9 @@ pub fn decode(text string) string {
cscanner.skip_crlf()
}
cscanner.skip_crlf()
return sb.str()
if sb.len > 0 {
return sb.str()
} else {
return text
}
}