vibe-d / vibe-http

Future vibe.d HTTP implementation
15 stars 9 forks source link

HPACK sources and HTTP/2 Frame Headers #8

Closed GallaFrancesco closed 6 years ago

GallaFrancesco commented 6 years ago

The proposed changes to vibe-http are the following:

s-ludwig commented 6 years ago

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

GallaFrancesco commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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

GallaFrancesco commented 6 years ago

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!