Mercurial > pub > Impl
comparison Lib/IMPL/Web/Application/Response.pm @ 97:964587c5183c
Added SecureCall to Web QueryHandlers stack
many bug fixes to Security and Web Application modules
| author | wizard |
|---|---|
| date | Tue, 04 May 2010 04:04:37 +0400 |
| parents | 67eb8eaec3d4 |
| children | 4267a2ac3d46 |
comparison
equal
deleted
inserted
replaced
| 96:4c55aed00ff2 | 97:964587c5183c |
|---|---|
| 100 $opt{-type} = $this->contentType if $this->contentType; | 100 $opt{-type} = $this->contentType if $this->contentType; |
| 101 $opt{-status} = $this->status if $this->status; | 101 $opt{-status} = $this->status if $this->status; |
| 102 $opt{-expires} = $this->expires if $this->expires; | 102 $opt{-expires} = $this->expires if $this->expires; |
| 103 | 103 |
| 104 my $refCookies = $this->cookies; | 104 my $refCookies = $this->cookies; |
| 105 $opt{-cookie} = [map CGI::Cookie->new(-name => $_, $refCookies->{$_} ), keys %$refCookies] if $refCookies; | 105 $opt{-cookie} = [map _createCookie($_,$refCookies->{$_}), keys %$refCookies] if $refCookies; |
| 106 | 106 |
| 107 my $hOut = $this->streamOut; | 107 my $hOut = $this->streamOut; |
| 108 | 108 |
| 109 print $hOut $this->query->header( | 109 print $hOut $this->query->header( |
| 110 %opt | 110 %opt |
| 111 ); | 111 ); |
| 112 } | 112 } |
| 113 } | |
| 114 | |
| 115 sub _createCookie { | |
| 116 return UNIVERSAL::isa($_[1], 'CGI::Cookie') ? $_[1] : CGI::Cookie->new(-name => $_[0], -value => $_[1] ); | |
| 113 } | 117 } |
| 114 | 118 |
| 115 sub setCookie { | 119 sub setCookie { |
| 116 my ($this,$name,$value) = @_; | 120 my ($this,$name,$value) = @_; |
| 117 | 121 |
| 155 return 0 unless $this->streamOut; | 159 return 0 unless $this->streamOut; |
| 156 | 160 |
| 157 my $hOut = $this->streamOut; | 161 my $hOut = $this->streamOut; |
| 158 | 162 |
| 159 $this->_PrintHeader(); | 163 $this->_PrintHeader(); |
| 160 | 164 |
| 161 $this->_streamBody(undef); | 165 close $this->_streamBody(); |
| 162 | 166 |
| 163 if ($this->buffered) { | 167 if ($this->buffered) { |
| 164 print $hOut ${$this->_bufferBody}; | 168 print $hOut ${$this->_bufferBody}; |
| 165 } | 169 } |
| 166 | 170 |
