diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/data/test2032 | 40 | ||||
-rw-r--r-- | tests/libtest/libntlmconnect.c | 10 |
2 files changed, 30 insertions, 20 deletions
diff --git a/tests/data/test2032 b/tests/data/test2032 index 4e1f230d9..5a9e4a2fd 100644 --- a/tests/data/test2032 +++ b/tests/data/test2032 @@ -118,26 +118,26 @@ chkhostname curlhost ^User-Agent:.* </strip> <protocol> -GET /20320100 HTTP/1.1 -Authorization: Basic dGVzdHVzZXI6dGVzdHBhc3M= -Host: 127.0.0.1:8990 -Accept: */* - -GET /20320100 HTTP/1.1 -Authorization: Basic dGVzdHVzZXI6dGVzdHBhc3M= -Host: 127.0.0.1:8990 -Accept: */* - -GET /20320200 HTTP/1.1 -Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA= -Host: 127.0.0.1:8990 -Accept: */* - -GET /20320200 HTTP/1.1 -Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoIBAI+/Fp9IERAQ74OsdNPbBpg7o8CVwLSO4DtFyIcZHUMKVktWIu92s2892OVpd2JzqnRlc3R1c2VyY3VybGhvc3Q= -Host: 127.0.0.1:8990 -Accept: */* - +GET /20320100 HTTP/1.1
+Authorization: Basic dGVzdHVzZXI6dGVzdHBhc3M=
+Host: 127.0.0.1:8990
+Accept: */*
+
+GET /20320100 HTTP/1.1
+Authorization: Basic dGVzdHVzZXI6dGVzdHBhc3M=
+Host: 127.0.0.1:8990
+Accept: */*
+
+GET /20320200 HTTP/1.1
+Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
+Host: 127.0.0.1:8990
+Accept: */*
+
+GET /20320200 HTTP/1.1
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoIBAI+/Fp9IERAQ74OsdNPbBpg7o8CVwLSO4DtFyIcZHUMKVktWIu92s2892OVpd2JzqnRlc3R1c2VyY3VybGhvc3Q=
+Host: 127.0.0.1:8990
+Accept: */*
+
</protocol> </verify> </testcase> diff --git a/tests/libtest/libntlmconnect.c b/tests/libtest/libntlmconnect.c index 8486f3c31..0ef8fc03f 100644 --- a/tests/libtest/libntlmconnect.c +++ b/tests/libtest/libntlmconnect.c @@ -207,6 +207,9 @@ int test(char *url) /* At this point, timeout is guaranteed to be greater or equal than -1. */ + fprintf(stderr, "%s:%d num_handles %d timeout %ld\n", + __FILE__, __LINE__, num_handles, timeout); + if(timeout != -1L) { interval.tv_sec = timeout/1000; interval.tv_usec = (timeout%1000)*1000; @@ -214,6 +217,13 @@ int test(char *url) else { interval.tv_sec = TEST_HANG_TIMEOUT/1000+1; interval.tv_usec = 0; + + /* if there's no timeout and we get here on the last handle, we may + already have read the last part of the stream so waiting makes no + sense */ + if(num_handles == 3) { + break; + } } select_test(maxfd+1, &fdread, &fdwrite, &fdexcep, &interval); |