1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-22 16:18:48 -05:00

test2032: bail out after last transfer

The test would hang and get aborted with a "ABORTING TEST, since it
seems that it would have run forever." until I prevented that from
happening.

I also fixed the data file which got broken CRLF line endings when I
sucked down the path from Joe's repo == my fault.

Removed #37 from KNOWN_BUGS as this fix and test case verifies exactly
this.
This commit is contained in:
Daniel Stenberg 2012-08-31 23:23:40 +02:00
parent 5ede86ae51
commit 7735141e73
3 changed files with 30 additions and 27 deletions

View File

@ -134,13 +134,6 @@ may have been fixed since this was written!
38. Kumar Swamy Bhatt's problem in ftp/ssl "LIST" operation: 38. Kumar Swamy Bhatt's problem in ftp/ssl "LIST" operation:
http://curl.haxx.se/mail/lib-2007-01/0103.html http://curl.haxx.se/mail/lib-2007-01/0103.html
37. Having more than one connection to the same host when doing NTLM
authentication (with performs multiple "passes" and authenticates a
connection rather than a HTTP request), and particularly when using the
multi interface, there's a risk that libcurl will re-use a wrong connection
when doing the different passes in the NTLM negotiation and thus fail to
negotiate (in seemingly mysterious ways).
35. Both SOCKS5 and SOCKS4 proxy connections are done blocking, which is very 35. Both SOCKS5 and SOCKS4 proxy connections are done blocking, which is very
bad when used with the multi interface. bad when used with the multi interface.

View File

@ -207,6 +207,9 @@ int test(char *url)
/* At this point, timeout is guaranteed to be greater or equal than -1. */ /* 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) { if(timeout != -1L) {
interval.tv_sec = timeout/1000; interval.tv_sec = timeout/1000;
interval.tv_usec = (timeout%1000)*1000; interval.tv_usec = (timeout%1000)*1000;
@ -214,6 +217,13 @@ int test(char *url)
else { else {
interval.tv_sec = TEST_HANG_TIMEOUT/1000+1; interval.tv_sec = TEST_HANG_TIMEOUT/1000+1;
interval.tv_usec = 0; 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); select_test(maxfd+1, &fdread, &fdwrite, &fdexcep, &interval);