elixir-mint / mint

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

Don't send RST_STREAM when not needed #434

Closed v0idpwn closed 4 months ago

v0idpwn commented 5 months ago

When the stream state is local_half_closed and an end_stream flag is received, the stream can be terminated normally without RST_STREAM.

Closes #433.

I still didn't work on integration tests, and while current tests kind of cover this feature, I'll add a specific test for it.

coveralls commented 5 months ago

Pull Request Test Coverage Report for Build e6a3aac052f01725352df867c357cb80818e034f-PR-434

Details


Changes Missing Coverage Covered Lines Changed/Added Lines %
lib/mint/http2.ex 9 12 75.0%
<!-- Total: 9 12 75.0% -->
Totals Coverage Status
Change from base Build cb43462e784e1d34215bc9da44bd4a25d0a9a5c1: -0.1%
Covered Lines: 1277
Relevant Lines: 1455

đź’› - Coveralls
v0idpwn commented 5 months ago

This is a WIP, I'm opening for reference. I need to double check some corner cases and maybe my implementation can be simplified.

v0idpwn commented 4 months ago

Also it looks like CI is failing for totally unrelated reasons™️

whatyouhide commented 4 months ago

Also it looks like CI is failing for totally unrelated reasons™️

Yes Totally Unrelated™, no worries

I'm not 100% happy with the implementation because I think it's a bit dirty, but it solves the problem and is pretty small, so I'm opening the PR.

@v0idpwn is this ready to review?

v0idpwn commented 4 months ago

Yes!

whatyouhide commented 4 months ago

Woot woot!