- From: Wayne Davison <wayne@clari.net>
 - Date: Wed, 9 Aug 2000 18:13:57 -0700 (PDT)
 - To: www-lib@w3.org
 
Even with the latest cvs source, I continue to experience a problem
with lib-www hanging when fetching nested local files.  If you want
to see the hang in action, run webbot with a depth of at least 2.
For example:
% cd ~/src/libwww
% webbot -depth 2 -prefix file:$PWD file:$PWD/Library/src/HTCache.html
It should fetch 23 documents, however it stops after about 7 (with 6
outstanding requests) and infinite loops.
If I apply the age-old fix from Kinuko Yasuda, however, it works
fine.  I have not attempted to look into the details of what is
going on here, though, so is there a reason that this fix has not
been committed?  Is it not quite right somehow?
..wayne..
---8<------8<------8<------8<---cut here--->8------>8------>8------>8---
Index: Library/src/HTFile.c
@@ -436,12 +436,12 @@
 		HTHost * host = NULL;
 		if ((host = HTHost_new("localhost", 0)) == NULL) return HT_ERROR;
 		HTNet_setHost(net, host);
-		file->state = FS_DO_CN;
 		if (HTHost_addNet(host, net) == HT_PENDING) {
 		    HTTRACE(PROT_TRACE, "HTLoadFile.. Pending...\n");
-		    return HT_PENDING;
+		    return HT_OK;
 		}
 	    }
+	    file->state = FS_DO_CN;
 	    break;
 
 	case FS_DO_CN:
---8<------8<------8<------8<---cut here--->8------>8------>8------>8---
Received on Wednesday, 9 August 2000 21:13:59 UTC