Mercurial > pub > Impl
changeset 320:28eba7e0c592
*web application action: added method to access HTTP request header.
author | sergey |
---|---|
date | Thu, 16 May 2013 17:16:41 +0400 |
parents | d485467eca92 |
children | 3dc9260017ad |
files | Lib/IMPL/Web/Application/Action.pm |
diffstat | 1 files changed, 10 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/Lib/IMPL/Web/Application/Action.pm Wed May 15 02:00:42 2013 +0400 +++ b/Lib/IMPL/Web/Application/Action.pm Thu May 16 17:16:41 2013 +0400 @@ -31,6 +31,16 @@ $this->_launder(scalar( $this->query->cookie($name) ), $rx ); } +sub header { + my ($this,$header) = @_; + + $this->query->https ? $this->query->https($header) : $this->query->http($header); +} + +sub isSecure { + shift->query->https ? 1 : 0; +} + sub param { my ($this,$name,$rx) = @_;