From 0802beaf640fd56965ae87c606cd964e61c18f51 Mon Sep 17 00:00:00 2001 From: "godzilla80@gmx.net" <> Date: Sun, 23 May 2010 06:42:54 +0000 Subject: add second parameter to THttpResponse::appendHeader whether the header should replace a previous similar header, or add a second header of the same type --- HISTORY | 1 + framework/Web/THttpResponse.php | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/HISTORY b/HISTORY index 6a6169fd..ac6ad32f 100644 --- a/HISTORY +++ b/HISTORY @@ -17,6 +17,7 @@ ENH: Update TDraggable::revert property to accept "failure" value (Christophe) BUG: Issue#246: TQueue::peek returns the top not the bottom (Christophe) CHG/ENH: Change behavior of THttpRequest::getBaseUrl() & THttpRequest::getAbsoluteApplicationUrl() to make it possible to force either http or https (Yves) EHN: Add property SecureConnection to TUrlMappingPattern and related enum TUrlMappingPatternSecureConnection to make it possible to to define wether to use http or https on pattern level (Yves) +EHN: Add second parameter to THttpResponse::appendHeader whether the header should replace a previous similar header, or add a second header of the same type (Yves) Version 3.1.7 February 22, 2010 ENH: Issue#24 - Specify needed fields on demand (Yves) diff --git a/framework/Web/THttpResponse.php b/framework/Web/THttpResponse.php index c15f2836..1e5540ab 100644 --- a/framework/Web/THttpResponse.php +++ b/framework/Web/THttpResponse.php @@ -511,11 +511,12 @@ class THttpResponse extends TModule implements ITextWriter /** * Sends a header. * @param string header + * @param boolean whether the header should replace a previous similar header, or add a second header of the same type */ - public function appendHeader($value) + public function appendHeader($value, $replace=true) { Prado::trace("Sending header '$value'",'System.Web.THttpResponse'); - header($value); + header($value, $replace); } /** -- cgit v1.2.3