-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
hyper: root cause of curl test 265 failure #8853
Comments
@pmk21 test case changes look correct, question is if this is a hyper bug. |
Not sure. I guess hyper is very strict about the HTTP version. Is a change in HTTP version during a transaction valid? |
Possibly? I suggest filing a Hyper ticket. |
@seanmonstar any comment on this? Does Hyper not like when the proxy is a HTTP/1.0 one and returns that in the response? Test 265 works with hyper for me when I apply this patch: diff --git a/tests/data/test265 b/tests/data/test265
index c6db8964e..56e89ba53 100644
--- a/tests/data/test265
+++ b/tests/data/test265
@@ -13,11 +13,11 @@ NTLM
# Server-side
<reply>
# this is returned first since we get no proxy-auth
<connect1001>
-HTTP/1.0 407 Authorization Required to proxy me my dear
+HTTP/1.1 407 Authorization Required to proxy me my dear^M
Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
Content-Length: 1033
And you should ignore this data.
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ
@@ -51,11 +51,11 @@ Server: no
Nice proxy auth sir!
</data1000>
<datacheck>
-HTTP/1.0 407 Authorization Required to proxy me my dear
+HTTP/1.1 407 Authorization Required to proxy me my dear^M
Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
Content-Length: 1033
HTTP/1.1 200 Things are fine in proxy land
Server: Microsoft-IIS/5.0 |
I was a little confused, so I set up a Rust example doing the same thing, logs to max, and now I know what the deal is: hyper sees a 1.0 response without a |
Aha, I think we can live with that and just make the test server return that header. The way I recall things this test originates from 2005 and is more or less a copy of a real world case of a proxy doing NTLM with HTTP/1.0 like this. It might not be terribly important. When I fix this, I get another issue that looks a curl bug in the hyper related adaptions. I'll work on it. |
I did this
Ran curl test 265, analyzed the debug trace and generated logs, concluded that hyper is probably closing the connection on receiving a HTTP/1.0 response.
I switched HTTP/1.0 with HTTP/1.1 at these locations -
curl/tests/data/test265
Line 17 in bda0d5f
curl/tests/data/test265
Line 55 in bda0d5f
The test seems to be passing, though there are a few small differences in the output -
I expected the following
After switching to HTTP/1.1, I expected the test case to pass, but there are a few small differences.
curl/libcurl version
operating system
The text was updated successfully, but these errors were encountered: