square / okhttp

Square’s meticulous HTTP client for the JVM, Android, and GraalVM.
https://square.github.io/okhttp/
Apache License 2.0
45.91k stars 9.16k forks source link

Tests for inflator failure. #8582

Open Fischiii opened 6 days ago

Fischiii commented 6 days ago

#8551

Added tests to reproduce the issue.

Added one test with the broken deflated message: "inflater left with deflated bytes"

Added another test with a similar, but working message: "inflater left with deflated bytes working message"

The first test results in the exact same behaviour as we see within okhttp when we discovered the issue: #8551

yschimke commented 6 days ago

@Fischiii a big thanks for doing this.

yschimke commented 1 day ago

OK, thanks for the repro. See https://github.com/Fischiii/okhttp/pull/1 that you can merge into your PR.

But

Context takeover discussed here https://websockets.readthedocs.io/en/stable/topics/compression.html#compression-parameters

Final block discussed here https://datatracker.ietf.org/doc/html/rfc7692#section-7.2.1

@swankjesse do you remember the algorithm here?