elixir-mint / mint

Functional HTTP client for Elixir with support for HTTP/1 and HTTP/2 🌱
Apache License 2.0
1.36k stars 106 forks source link

Fix handling of frames of an unknown type #345

Closed DunyaKokoschka closed 2 years ago

DunyaKokoschka commented 2 years ago

See: https://datatracker.ietf.org/doc/html/rfc7540#section-4.1

Implementations MUST ignore and discard any frame that has a type that is unknown

DunyaKokoschka commented 2 years ago

So I had a real site that was sending back these frames but this site no longer sends back these frames so I'm not 100% sure that it fixes the issue. But I do have a conn_test that sends a bad frame and it crashes the test without the fix and doesn't crash with the fix.

whatyouhide commented 2 years ago

Awesome, thanks @DunyaKokoschka! ❤️

Would love a follow-up PR that adds those sweet @tag :skips if you're feeling like it 😄