diff options
Diffstat (limited to 'phpBB/includes/functions_download.php')
| -rw-r--r-- | phpBB/includes/functions_download.php | 16 | 
1 files changed, 8 insertions, 8 deletions
| diff --git a/phpBB/includes/functions_download.php b/phpBB/includes/functions_download.php index 4ff3994f4c..704939b176 100644 --- a/phpBB/includes/functions_download.php +++ b/phpBB/includes/functions_download.php @@ -45,7 +45,7 @@ function send_avatar_to_browser($file, $browser)  	if ((@file_exists($file_path) && @is_readable($file_path)) && !headers_sent())  	{ -		header('Pragma: public'); +		header('Cache-Control: public');  		$image_data = @getimagesize($file_path);  		header('Content-Type: ' . image_type_to_mime_type($image_data[2])); @@ -56,17 +56,17 @@ function send_avatar_to_browser($file, $browser)  			if (strpos(strtolower($browser), 'msie 6.0') !== false)  			{ -				header('Expires: -1'); +				header('Expires: ' . gmdate('D, d M Y H:i:s', time()) . ' GMT');  			}  			else  			{ -				header('Expires: ' . gmdate('D, d M Y H:i:s \G\M\T', time() + 31536000)); +				header('Expires: ' . gmdate('D, d M Y H:i:s', time() + 31536000) . ' GMT');  			}  		}  		else  		{  			header('Content-Disposition: inline; ' . header_filename($file)); -			header('Expires: ' . gmdate('D, d M Y H:i:s \G\M\T', time() + 31536000)); +			header('Expires: ' . gmdate('D, d M Y H:i:s', time() + 31536000) . ' GMT');  		}  		$size = @filesize($file_path); @@ -175,7 +175,7 @@ function send_file_to_browser($attachment, $upload_dir, $category)  	}  	// Now the tricky part... let's dance -	header('Pragma: public'); +	header('Cache-Control: public');  	// Send out the Headers. Do not set Content-Disposition to inline please, it is a security measure for users using the Internet Explorer.  	header('Content-Type: ' . $attachment['mimetype']); @@ -197,7 +197,7 @@ function send_file_to_browser($attachment, $upload_dir, $category)  			header('Content-Disposition: attachment; ' . header_filename(htmlspecialchars_decode($attachment['real_filename'])));  			if (empty($user->browser) || (strpos(strtolower($user->browser), 'msie 6.0') !== false))  			{ -				header('expires: -1'); +				header('Expires: ' . gmdate('D, d M Y H:i:s', time()) . ' GMT');  			}  		}  		else @@ -420,8 +420,8 @@ function set_modified_headers($stamp, $browser)  		{  			send_status_line(304, 'Not Modified');  			// seems that we need those too ... browsers -			header('Pragma: public'); -			header('Expires: ' . gmdate('D, d M Y H:i:s \G\M\T', time() + 31536000)); +			header('Cache-Control: public'); +			header('Expires: ' . gmdate('D, d M Y H:i:s', time() + 31536000) . ' GMT');  			return true;  		}  		else | 
