our front-end proxy+cache cannot handle streaming of large data sets very well

This commit is contained in:
Wolfram Schneider 2019-05-04 18:31:19 +00:00
parent 11880a0b1d
commit 874f1e0d85
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=52982

View file

@ -55,6 +55,9 @@ $www{'title'} = 'FreeBSD Manual Pages';
$www{'home'} = 'https://www.FreeBSD.org';
$www{'head'} = $www{'title'};
# set to zero if your front-end cache has low memory
my $download_streaming_caching = 0;
#$command{'man'} = '/usr/bin/man'; # 8Bit clean man
$command{'man'} = '/usr/local/www/bin/man.wrapper'; # set CPU limits
@ -1148,6 +1151,9 @@ sub download {
$filename = &encode_url($filename);
$filename .= '.tgz';
# bypass caching proxies which cannot handle streaming of large data very well
print qq{Cache-Control: no-cache, no-store, private, max-age=0\n} if $download_streaming_caching == 0;
print qq{Content-type: application/x-tgz\n}
. qq{Content-disposition: attachment; filename="$filename"\n} . "\n";