diff Lib/IMPL/Web/Application/Response.pm @ 95:67eb8eaec3d4

Added a security authority property to the Context and Security classes Added a WriteResponse method to the SecureCookie class Added a setCookie method to the Response class
author wizard
date Thu, 29 Apr 2010 02:21:27 +0400
parents 9f5795a10939
children 964587c5183c
line wrap: on
line diff
--- a/Lib/IMPL/Web/Application/Response.pm	Thu Apr 29 01:31:27 2010 +0400
+++ b/Lib/IMPL/Web/Application/Response.pm	Thu Apr 29 02:21:27 2010 +0400
@@ -112,6 +112,18 @@
 	}
 }
 
+sub setCookie {
+	my ($this,$name,$value) = @_;
+	
+	unless ($this->cookies) {
+		$this->cookies({$name,$value});
+	} else {
+		$this->_checkHeaderPrinted(); 
+		$this->cookies->{$name} = $value;
+	}
+	return $value;
+}
+
 sub getStreamBody {
 	my ($this) = @_;