> Ns_SockSendBufs() is not supposed to send all at once, that is the
> problem. That's why small change i sent to Bernd should fix it, i just
> do not want to commit it before the test.

Looks good, I changed the driver.c line, replaced nsd and libnsd.so and 
changed writerbufsize in config to 8192:

[-conn:server1:6] Notice: starting download
[-conn:server1:6] Notice: Writer: 4: started sock=5, fd=7: size=24445108, 
flags=10: /download/
[-conn:server1:6] Notice: finished download in 0 seconds
[-writer4-] Notice: Writer: closed sock=5, fd=7, error=0/0, sent=24445108, 
flags=10

I can stop the download and resume/restart it without errors.

One note: I tested older code that does not make use of ns_writer commands, it 
still runs ns_returnfile. I set outputheaders to prepare for a PDF download, 
computed and logged duration and success or failure (both obsolete with 
writerthreads).
When I naively replace the ns_returnfile line with a
ns_writer submitfile $download_path
I immediately receive an empty page (no log statements indicating some error, 
btw). Not that I feel the urge to replace ns_returnfile if it works...

Bernd.



Reply via email to