mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1221754 - Set bodySize to 0 in case of 304 responses; r=jryans
This commit is contained in:
parent
9ea31c76e9
commit
91f91182b3
@ -298,7 +298,15 @@ HarBuilder.prototype = {
|
||||
|
||||
response.redirectURL = findValue(headers, "Location");
|
||||
response.headersSize = headersSize;
|
||||
response.bodySize = file.transferredSize || -1;
|
||||
|
||||
// 'bodySize' is size of the received response body in bytes.
|
||||
// Set to zero in case of responses coming from the cache (304).
|
||||
// Set to -1 if the info is not available.
|
||||
if (typeof file.transferredSize != "number") {
|
||||
response.bodySize = (response.status == 304) ? 0 : -1;
|
||||
} else {
|
||||
response.bodySize = file.transferredSize;
|
||||
}
|
||||
|
||||
return response;
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user