- From: Henrik Frystyk Nielsen <frystyk@w3.org>
- Date: Tue, 22 Dec 1998 12:14:41 -0500
- To: www-lib@w3.org
- To: olga <olga@goliath.eai.com>
olga wrote: > I found the problem. In HTLoadToFile the file pointer was closed earlier than > anything was written to file. Then writing to the file failed. So I just > commented out the closing of the file pointer in HTLoadToFile (HTAccess.c) and > took care of that in the application. > > Why it wrote the cache twice I have no idea - it doens't do it after it writes > in file normally. Great - I am wondering what the problem is so that we can fix it. I think the code in HTAccess.c HTLoadToFile(...) may cause the file to be closed twice (the handling of closing streams were changed some time ago). However, what I don't understand is why using non blocking sockets and the event loop would change that /* Set the output stream and start the request */ HTRequest_setOutputFormat(request, WWW_SOURCE); HTRequest_setOutputStream(request, HTFWriter_new(request, fp, NO)); if (HTLoadAbsolute(url, request) == NO) { fclose(fp); <---- here return NO; } else return YES; What part did you uncomment? Thanks, Henrik
Received on Tuesday, 22 December 1998 12:14:44 UTC