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

Add HTTP2Frame.FramePayload codecs #222

Merged
merged 1 commit into from
Jul 31, 2020

Conversation

glbrntt
Copy link
Contributor

@glbrntt glbrntt commented Jul 30, 2020

Motivation:

As part of the work for #214 we need new codecs which transform
HTTP2Frame.FramePayload to and from the appropriate request and
response parts.

Modifications:

  • Add HTTP2FramePayloadToHTTP1ClientCodec
  • Add HTTP2FramePayloadToHTTP1ServerCodec
  • Duplicate the HTTP2ToHTTP1CodecTests and update the relevant parts to
    use payloads instead of frames.
  • Add relevant test helpers.
  • Note: the HTTP2 to HTTP1 (frame based) codecs haven't been deprecated:
    doing so without warnings depends on Allow payload-based stream channels to be created. #221.

Result:

  • We can transform HTTP2Frame.FramePayload types to the relevant HTTP
    client and server request and response types.

@glbrntt glbrntt added the 🔼 needs-minor-version-bump For PRs that when merged cause a bump of the minor version, ie. 1.x.0 -> 1.(x+1).0 label Jul 30, 2020
@glbrntt glbrntt requested a review from Lukasa July 30, 2020 09:56
Copy link
Contributor

@Lukasa Lukasa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love it, looks really good.

@Lukasa
Copy link
Contributor

Lukasa commented Jul 31, 2020

@glbrntt has some conflicts in LinuxMain.swift.

Motivation:

As part of the work for apple#214 we need new codecs which transform
`HTTP2Frame.FramePayload` to and from the appropriate request and
response parts.

Modifications:

- Add `HTTP2FramePayloadToHTTP1ClientCodec`
- Add `HTTP2FramePayloadToHTTP1ServerCodec`
- Duplicate the HTTP2ToHTTP1CodecTests and update the relevant parts to
  use payloads instead of frames.
- Add relevant test helpers.
- Note: the HTTP2 to HTTP1 (frame based) codecs haven't been deprecated:
  doing so without warnings depends on apple#221.

Result:

- We can transform `HTTP2Frame.FramePayload` types to the relevant HTTP
  client and server request and response types.
@glbrntt glbrntt merged commit 3c668f5 into apple:master Jul 31, 2020
@glbrntt glbrntt deleted the gb-frame-payload-codecs branch July 31, 2020 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔼 needs-minor-version-bump For PRs that when merged cause a bump of the minor version, ie. 1.x.0 -> 1.(x+1).0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants