Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

FixHost header (#650)#652

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
MihaelIsaev wants to merge4 commits intoswift-server:main
base:main
Choose a base branch
Loading
fromMihaelIsaev:imike-host-fix

Conversation

@MihaelIsaev
Copy link
Contributor

Added check to add host only if needed, and also building host the right way.

@swift-server-bot
Copy link

Can one of the admins verify this patch?

5 similar comments
@swift-server-bot
Copy link

Can one of the admins verify this patch?

@swift-server-bot
Copy link

Can one of the admins verify this patch?

@swift-server-bot
Copy link

Can one of the admins verify this patch?

@swift-server-bot
Copy link

Can one of the admins verify this patch?

@swift-server-bot
Copy link

Can one of the admins verify this patch?

@MihaelIsaevMihaelIsaev mentioned this pull requestDec 6, 2022
Copy link
Collaborator

@dnadobadnadoba left a comment

Choose a reason for hiding this comment

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

Thanks! This is almost good to go.

uri:"\(self.targetHost):\(self.targetPort)"
)
head.headers.replaceOrAdd(name:"host", value:"\(self.targetHost)")
if !head.headers.contains(name:"host"){
Copy link
Collaborator

Choose a reason for hiding this comment

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

TheHTTPRequestHead is created in the lines above and we can therefore say for sure we will never have ahost set. This makes sense because we don't need to look into the headers we have created here but from the original HTTP request from the user. This will require plumping theHTTPHeaders from the original request through the stack.

FYI:@rnro is currently working on movingHTTP1ProxyConnectHandler toswift-nio-extrasin this PR. In this new version theHTTPHeaders are passed into theHTTP1ProxyConnectHandler.init which makes this a bit easier. We still need to get the original request headers to where we create theHTTP1ProxyConnectHandler in AHC.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@dnadobadnadobadnadoba requested changes

Requested changes must be addressed to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@MihaelIsaev@swift-server-bot@dnadoba

[8]ページ先頭

©2009-2025 Movatter.jp