Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

entry.bodySize should never be < -1 #123

Open
UppaJung opened this issue Sep 28, 2024 · 0 comments
Open

entry.bodySize should never be < -1 #123

UppaJung opened this issue Sep 28, 2024 · 0 comments

Comments

@UppaJung
Copy link

Running the test suite of JSON files and adding checks to expect bodySize to be >= -1 will reveal many instances in which bodySize is < -1. While -1 is a valid value for this field if one does not know the correct body size, the a document never has a body of negative size.

I discovered this issue while experimenting with porting/re-writing chrome-har in typescript and trying to replicate chrome-har's current behavior. Please feel free to compare against the typescript implementation to test the fix, or to adopt the code from it, which is also MIT license. (You're free to take the whole thing, but it's a very big change of coding style to adapt to if you don't like typescript.) Sorry that the first you are hearing from me is me filing bugs, but leaving them unreported seemed worse than the alternative.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant