net: fix 0 length file if Content-Header is missing or corrupt (#10464)
parent
9bfec97a6d
commit
12bb0c236a
|
@ -68,5 +68,9 @@ 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
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue