summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgodzilla80@gmx.net <>2010-05-23 06:42:54 +0000
committergodzilla80@gmx.net <>2010-05-23 06:42:54 +0000
commit0802beaf640fd56965ae87c606cd964e61c18f51 (patch)
tree1194c749131811f1b61cb3f7f4d8beff953a4cb7
parentcdb7ea5ccbda68b47d5fe5b41ec9f1fd450a9c83 (diff)
add second parameter to THttpResponse::appendHeader whether the header should replace a previous similar header, or add a second header of the same type
-rw-r--r--HISTORY1
-rw-r--r--framework/Web/THttpResponse.php5
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);
}
/**