# HG changeset patch # User sergey # Date 1368710201 -14400 # Node ID 28eba7e0c592870e06f000172a38c07290ef4719 # Parent d485467eca9210c553d551fb88a8d45ca11bd6f1 *web application action: added method to access HTTP request header. diff -r d485467eca92 -r 28eba7e0c592 Lib/IMPL/Web/Application/Action.pm --- 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) = @_;