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: add a middleware inserting right host header #567

Merged
merged 2 commits into from
Dec 19, 2019

Conversation

AllanZhengYP
Copy link
Contributor

  1. Add a metadata property to RequestHandler interface that contains self-describing information of the handler. In this case, Node H1 handler and Node H2 handler can identify themselves as for H1 request or H2 request.
  2. Add a middleware adding host header or :authority header respectively, according to RequestHandler's metadata for H1 or H2. Separating this functionality from SignatureV4 signer because Node H2 doesn't allow sending host header in H2 request specificly, so the signer shouldn't add the host header blindly.

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

@aws-sdk-js-automation
Copy link

AWS CodeBuild CI Report

  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@AllanZhengYP AllanZhengYP requested a review from trivikr December 19, 2019 17:49
@AllanZhengYP AllanZhengYP added the smithy-codegen Changes regarding supporting smithy model. Will be merged to smithy-codegen branch label Dec 19, 2019
Copy link
Member

@trivikr trivikr left a comment

Choose a reason for hiding this comment

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

LGTM, just a suggestion to change metadata from an array to object

packages/node-http-handler/src/node-http-handler.ts Outdated Show resolved Hide resolved
packages/types/src/transfer.ts Outdated Show resolved Hide resolved
@AllanZhengYP AllanZhengYP requested a review from trivikr December 19, 2019 23:21
@aws-sdk-js-automation
Copy link

AWS CodeBuild CI Report

  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@aws-sdk-js-automation
Copy link

AWS CodeBuild CI Report

  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@trivikr trivikr merged commit b36357e into aws:smithy-codegen Dec 19, 2019
@lock
Copy link

lock bot commented Dec 27, 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 Dec 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
smithy-codegen Changes regarding supporting smithy model. Will be merged to smithy-codegen branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants