kazu-yamamoto / http2

HTTP/2.0 library including HPACK
BSD 3-Clause "New" or "Revised" License
86 stars 23 forks source link

Using http-semantics #114

Closed kazu-yamamoto closed 7 months ago

kazu-yamamoto commented 7 months ago

This implements #113. Backward compatibility will lost for some functions of HPACK but I guess it's a minor issue. warp can be built with this branch without modification.

@edsko Could you try to use this branch? If this breaks your projects, I should provide more deprecated functions or types.

edsko commented 7 months ago

@kazu-yamamoto I had to make a few small adjustments, but only minor, and tests pass just fine.

Two of the changes I had to make were because there two places where I could have imported from .Client or .Server previously, but instead imported from .Internal because the things I needed were not client or server specific, and I did not want to make an arbitrary choice). So that's on me.

One small comment is that There is a downside to re-exporting entire modules (as in re-exporting Semantics.Server from HTTP2.Server): the haddocks for HTTP2.Server will just show that the other module is re-exported, but not what is in that module (until you click on it). This makes browsing the documentation a little more cumbersome. But it's very minor.

kazu-yamamoto commented 7 months ago

Thank you for your review. Merged. I agree that the haddock behavior is a little bit inconvenient.