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

HPACK sources and HTTP/2 Frame Headers #8

Merged
merged 10 commits into from
Nov 21, 2018

Conversation

GallaFrancesco
Copy link
Contributor

@GallaFrancesco GallaFrancesco commented Nov 11, 2018

The proposed changes to vibe-http are the following:

  • All the code which implements HTTP/2 has now been moved in vibe-http/source/vibe/http/internal/http2
  • The HPACK sources from vibe-hpack can be found in vibe-http/source/vibe/http/internal/http2/hpack
  • A frame.d module has been added, containing the implementation of a struct HTTP2FrameHeader which can be accessed through 3 utility functions (createHTTP2FrameHeader, serializeHTTP2FrameHeader, unpackHTTP2FrameHeader). This module is fully nogc compatible and can be used to serialize / deserialize an HTTP/2 Frame Header. The next PR will contain the implementation of specific frame types (all of them are defined in RFC 7540).
    This, once completed, should allow for serialization and deserialization of frame headers and frame payloads, after which we could move on to stream implementation.

@s-ludwig
Copy link
Member

The HPACK sources still need a vibe.http.internal.http. prefix in their module names and imports.

@GallaFrancesco
Copy link
Contributor Author

Of course, sorry I got a bit caught up. Should be done, I'll commit the changes for the rest of frame.d tomorrow.

@GallaFrancesco
Copy link
Contributor Author

I added the missing parts of frame.d which are mainly two methos, one for building frames (buildHTTP2Frame) and the other to parse them (unpackHTTP2Frame). All the methods in the module are nogc compatible.

I decided to include these changes too so that the frame.d module should be complete, for now. The functions buildHTTP2Frame and unpackHTTP2Frame, along with the ones useful to create headers, are meant to be the access points to the module, so that a possible HTTP2RequestHandler can use them to retrieve the payload of each frame and manage it according to the frame type.

To complete the module I still have to finish the unittest for unpackHTTP2Frame, they should be done by tomorrow.

@s-ludwig
Copy link
Member

Anything still missing from your side? Otherwise I'd pull the trigger and merge.

@GallaFrancesco
Copy link
Contributor Author

No, I'd say it's all here. I've almost completed a first draft for Streams, I'll submit a PR so that we can discuss that. Thanks!

@s-ludwig s-ludwig merged commit afba3fd into vibe-d:master Nov 21, 2018
GallaFrancesco pushed a commit to GallaFrancesco/vibe-http that referenced this pull request Dec 7, 2018
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

Successfully merging this pull request may close these issues.

None yet

2 participants