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

WebClient has odd behavior with the host header. #1668

Closed
lscoughlin opened this issue Apr 21, 2020 · 4 comments
Closed

WebClient has odd behavior with the host header. #1668

lscoughlin opened this issue Apr 21, 2020 · 4 comments
Assignees
Labels
2.x Issues for 2.x version branch bug Something isn't working P2 webclient
Milestone

Comments

@lscoughlin
Copy link

Environment Details

  • Helidon Version: 2.0.0-M2
  • Helidon SE or Helidon MP
  • JDK version: 11.0.6
  • OS: Mac OS X 10.14.6
  • Docker version (if applicable): N/A

If you set the host header like this:

            webclient.method("GET")
                    .headers((h) -> {
                        h.put(HttpHeaderNames.HOST.toString(), "some.virtual.host");
                        return h;
                    })

it spits out two host headers like this:
host : localhost
host : some.virtual.host

If you set the host header like this:

            webclient.method("GET")
                    .headers((h) -> {
                        h.put("Host", "some.virtual.host");
                        return h;
                    })

it spits out only 1 ( correct ) host header.

@lscoughlin
Copy link
Author

Gist showing the issue here:

@romain-grecourt romain-grecourt added 2.x Issues for 2.x version branch webclient labels Apr 30, 2020
@Verdent
Copy link
Member

Verdent commented Apr 30, 2020

@lscoughlin Hi, thank you for this find :-) Actually I made fix for that and it is currently under review with some of my other changes. It should be fixed in the new release.

@m0mus m0mus added the bug Something isn't working label Apr 30, 2020
@m0mus m0mus added this to the 2.0.0 milestone Apr 30, 2020
@m0mus m0mus added the P2 label Apr 30, 2020
@danielkec danielkec linked a pull request Apr 30, 2020 that will close this issue
@Verdent
Copy link
Member

Verdent commented May 7, 2020

Fixed in master

@Verdent Verdent closed this as completed May 7, 2020
@romain-grecourt
Copy link
Contributor

This will be available in the next version (2.0.0-M3)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.x Issues for 2.x version branch bug Something isn't working P2 webclient
Projects
Archived in project
Development

No branches or pull requests

4 participants