diff --git a/core/control/HTTPResponse.php b/core/control/HTTPResponse.php index e401d5d20..76e32f44d 100644 --- a/core/control/HTTPResponse.php +++ b/core/control/HTTPResponse.php @@ -61,10 +61,21 @@ class HTTPResponse extends Object { return $this->body; } + /** + * Add a HTTP header to the response, replacing any header of the same name + */ function addHeader($header, $value) { $this->headers[$header] = $value; } + /** + * Return the HTTP header of the given name + * @returns string + */ + function getHeader($header) { + return $this->headers[$header]; + } + function redirect($dest) { $this->statusCode = 302; $this->headers['Location'] = $dest;