cvs: pear /HTTP_Download Download.php

From: Date: Mon, 18 Jul 2005 09:38:37 +0000
Subject: cvs: pear /HTTP_Download Download.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-33103@lists.php.net to get a copy of this message
mike Mon Jul 18 05:38:37 2005 EDT Modified files: /pear/HTTP_Download Download.php Log: - sort of implement Request #4754; possibility to define max-age cache control parameter http://cvs.php.net/diff.php/pear/HTTP_Download/Download.php?r1=1.68&r2=1.69&ty=u Index: pear/HTTP_Download/Download.php diff -u pear/HTTP_Download/Download.php:1.68 pear/HTTP_Download/Download.php:1.69 --- pear/HTTP_Download/Download.php:1.68 Mon Jun 13 04:45:18 2005 +++ pear/HTTP_Download/Download.php Mon Jul 18 05:38:36 2005 @@ -17,7 +17,7 @@ * @author Michael Wallner <mike@php.net> * @copyright 2003-2005 Michael Wallner * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Download.php,v 1.68 2005/06/13 08:45:18 mike Exp $ + * @version CVS: $Id: Download.php,v 1.69 2005/07/18 09:38:36 mike Exp $ * @link http://pear.php.net/package/HTTP_Download */ @@ -92,7 +92,7 @@ * if you want to send already gzipped data! * * @access public - * @version $Revision: 1.68 $ + * @version $Revision: 1.69 $ */ class HTTP_Download { @@ -410,15 +410,16 @@ * @access public * @return bool * @param string $cache private or public + * @param int $maxage maximum age of the client cache entry */ - function setCacheControl($cache = 'public') + function setCacheControl($cache = 'public', $maxage = 0) { switch ($cache = strToLower($cache)) { case 'private': case 'public': $this->headers['Cache-Control'] = - $cache .', must-revalidate, max-age=0'; + $cache .', must-revalidate, max-age='. $maxage; return true; break; }

« previous php.pear.cvs (#33103) next »