Set response.bodySize to 0 if it's negative (#466)

This commit is contained in:
M. Mert Yıldıran 2021-11-16 01:58:22 +03:00 committed by GitHub
parent ad574956df
commit 58a1eac247
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -143,6 +143,10 @@ func (d dissecting) Analyze(item *api.OutputChannelItem, resolvedSource string,
}
}
if resDetails["bodySize"].(float64) < 0 {
resDetails["bodySize"] = 0
}
if item.Protocol.Version == "2.0" {
service = fmt.Sprintf("%s://%s", scheme, authority)
} else {