-
Notifications
You must be signed in to change notification settings - Fork 1k
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
CIO engine no longer sends port in "Host" header #1295
Conversation
I looked through the tests before I submitted to see if this change would cause anything to fail. I did not see anything. I would be happy to fix any broken tests, but I can't access the test failure results. Is there a way that I can access them? |
Oh nevermind, I figured it out. sorry. looking at test results now. |
fixed the two tests that were broken. I have no idea why this one would be failing.. ktor/ktor-client/ktor-client-tests/common/test/io/ktor/client/tests/ContentTest.kt Lines 86 to 95 in 2296583
Flakey test maybe? not sure. |
See ietf on the Host header :
Port is optional, but part of the spec. It follows the http URI scheme, defined in section 2.7.1 :
Maybe we can just have it not specify default ports ? |
@Bluexin Good idea. that seems to align with this ietf spec for host headers https://tools.ietf.org/html/rfc2616#section-14.23
I updated this PR to reflect that policy. |
Hi @Evyy, thanks for the PR. Merged in |
* CIO engine no longer sends port in "Host" header Fixes #1294 * only add port to Host header if it is non-standard for the protocol
* CIO engine no longer sends port in "Host" header Fixes #1294 * only add port to Host header if it is non-standard for the protocol
* CIO engine no longer sends port in "Host" header Fixes #1294 * only add port to Host header if it is non-standard for the protocol
* CIO engine no longer sends port in "Host" header Fixes #1294 * only add port to Host header if it is non-standard for the protocol
* CIO engine no longer sends port in "Host" header Fixes ktorio#1294 * only add port to Host header if it is non-standard for the protocol
Fixes #1294
see #1294 for details