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

Added support to override host header.#9092

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
nilo85 wants to merge1 commit intoesp8266:master
base:master
Choose a base branch
Loading
fromnilo85:httpclient-override-host-header

Conversation

@nilo85
Copy link

Asdns is not working on my network I decided to workaround the issue for now and figured this might actually be a feature we want here =)

@nilo85
Copy link
Author

I no longer need this hack, however, there might be situations you need to override host header (proxy use etc) so might still make sense to support

@mcspr
Copy link
Collaborator

Perhaps the client should allowaddHeader to overrideHost:?
Meaning, when headers are prepared it would check whether it was added or not; and if not, use the default_host. Right now it is restricted, don't see why it should be tbh

@nilo85
Copy link
Author

@mcspr I suppose, however to be completely http compliant, you can pass multiple values for same header, most other http implementations do setHeader and addHeader, where setHeader sets a single header and replaces whatever would have been there before, and addHeader would send multiple values.

However in this case, judging by the code I suspect the restriction here is to kep the code simple as the host header is hardcoded in the request call.

I would be fine rejecting this PR as I no longer need it, but possible it could make sense to consider adopting more http client features in the future, if needed... I suspect for most applications using these microchips, explicit proxy settings etc is overkill so I personally would consider it a corner case

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

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@nilo85@mcspr

[8]ページ先頭

©2009-2025 Movatter.jp