our front-end proxy+cache cannot handle streaming of large data sets very well
This commit is contained in:
parent
11880a0b1d
commit
874f1e0d85
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=52982
1 changed files with 6 additions and 0 deletions
|
@ -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";
|
||||
|
||||
|
|
Loading…
Reference in a new issue