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

feat: Node.js HTTP/2 Handler #317

Closed
wants to merge 19 commits into from
Closed

Conversation

trivikr
Copy link
Member

@trivikr trivikr commented Aug 8, 2019

Issue #, if available:
N/A

Description of changes:
Work in Progress, posting a Draft Pull Request for early look

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@codecov-io
Copy link

codecov-io commented Aug 8, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@2ae365c). Click here to learn what that means.
The diff coverage is 15.38%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #317   +/-   ##
=========================================
  Coverage          ?   89.75%           
=========================================
  Files             ?      239           
  Lines             ?     5545           
  Branches          ?     1136           
=========================================
  Hits              ?     4977           
  Misses            ?      568           
  Partials          ?        0
Impacted Files Coverage Δ
packages/node-http-handler/src/index.ts 100% <100%> (ø)
...ckages/node-http-handler/src/node-http2-handler.ts 13.72% <13.72%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2ae365c...05f0ca1. Read the comment docs.

@trivikr trivikr force-pushed the http2-handler branch 2 times, most recently from 2bf48be to c062481 Compare August 21, 2019 23:21
@trivikr trivikr marked this pull request as ready for review August 22, 2019 17:07
@trivikr
Copy link
Member Author

trivikr commented Aug 22, 2019

The code in this PR is ready for review, unit tests are pending

@trivikr trivikr changed the title [WIP] feat: Node.js HTTP/2 Handler feat: Node.js HTTP/2 Handler Aug 22, 2019
@trivikr trivikr force-pushed the http2-handler branch 3 times, most recently from 28d5099 to 320d4b3 Compare August 23, 2019 18:00

req.on("error", reject);

const { connectionTimeout } = this.httpOptions;
Copy link
Contributor

@AllanZhengYP AllanZhengYP Aug 23, 2019

Choose a reason for hiding this comment

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

Maybe it's out of the scope of the PR but maybe you have answer to this: we support a per request httpOptions setting like here. Where does it supplied to http handlers?

resolve(httpResponse);
});

req.on("error", reject);
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Added listeners for aborted and frameError events in c49ce80

[constants.HTTP2_HEADER_PATH]: queryString
? `${path}?${queryString}`
: path,
[constants.HTTP2_HEADER_METHOD]: method
Copy link
Contributor

@AllanZhengYP AllanZhengYP Aug 23, 2019

Choose a reason for hiding this comment

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

According to the doc, there are other headers available(:authority, :scheme). These information should have been specified when you create a connection. So what are they used for? What if these headers are conflict with then endpoint you used to create a connection?

UPDATE: I believe they are only useful in response headers. But we should confirm

@trivikr
Copy link
Member Author

trivikr commented Aug 26, 2019

As TravisCI times out for this PR as described in #346, here's coverage report of @aws-sdk/node-http-handler

Copy link
Contributor

@AllanZhengYP AllanZhengYP left a comment

Choose a reason for hiding this comment

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

Can you also add a test suite around the streaming response and 100-continue header? Otherwise it looks good to me. Btw, we have a bunch of commented tests in http1 handler test because of Jest issue.

@trivikr
Copy link
Member Author

trivikr commented Oct 21, 2019

Followed up in PR #414 for smithy-codegen

@trivikr trivikr closed this Oct 21, 2019
trivikr referenced this pull request in trivikr/aws-sdk-js-v3 Oct 21, 2019
@lock
Copy link

lock bot commented Oct 28, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.

@lock lock bot locked as resolved and limited conversation to collaborators Oct 28, 2019
@trivikr trivikr deleted the http2-handler branch January 10, 2020 19:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants