-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Http client Type of JDK gives "empty headers are not allowed" #3525
Comments
If you'd like us to spend some time investigating, please take the time to provide a complete, minimal, verifiable sample (something that we can unzip attached to this issue or git clone, build, and deploy) that reproduces the problem. |
I have created a project that shows the issue: |
I downloaded and ran your project and
I'm using httpie. curl works as well. Maybe it's the client? |
I can reproduce the behaviour with httpie if I remove the default headers:
Not sure what IntelliJ's Http Client does exactly. |
Seems with httpie, I get the same 400 Bad Request if I set |
If I remove gateway completely and just use webmvc.fn the error persists. So, I don't think this has anything to do with gateway. |
I you can provide me with that project and let me know where I can file an issue for webmvc.fn, I can open a new issue for it if you want. |
Describe the bug
I started out with Spring Cloud Gateway today and I had trouble to even try the simplest example. It seems that the default http client type (which is
jdk
) is not working. I had to set it toautodetect
to get it working.Sample
Try the request ( I used IntelliJ's http client):
It returns:
When I update
application.properties
with this property:Things work and I get a proper response:
The text was updated successfully, but these errors were encountered: