From: Bob M. <mce...@dr...> - 2002-04-29 20:38:06
|
I noticed your bug report about FilterProxy: > I just noticed that filterproxy doesn't actually seem to cope with > aborted downloads, but instead continues to merrily download away. >=20 > At this point the only way to stop the download is to actually restart > filterproxy. >=20 > This was tested on both Mozilla 1.0rc1 and Navigator 4.76, downloading > the OpenOffice binaries from > http://www.openoffice.org/dev_docs/source/build_641d/index.html#binaries, > simply by initiating a download, and shortly thereafter cancelling it. This has been in my TODO file for some time: Implement close of connection to server when client closes connection. Patches would be happily accepted. ;) It looks like the way to do this is to call die() inside sub data_handler() in FilterProxy.pl. the LWP::UserAgent man page says: =20 The request can be aborted by calling die() in the callback routine. The die message will be available as the "X-Died" special response header field. Try adding this somewhere inside data_handler in FilterProxy.pl: if(!defined $client->connected()) { die("Client aborted download"); } And let me know if it works. I'll add it to the main distro. BTW, for you Debian folks...I am now a Debian convert. ;) I converted my running RedHat system to Debian, successfully. For the rest of you, 'apt-get install filterproxy' is the coolest thing in the world. :) Cheers, -- Bob Bob McElrath (rsm...@st...)=20 Univ. of Wisconsin at Madison, Department of Physics |