Mercurial > pub > Impl
comparison Lib/IMPL/Web/Application/Action.pm @ 256:32aceba4ee6d
corrected ViewHandlers to handle cookies and headers.
Dirty hacks to handle binary data
RestController doesn't deal with file extensions anymore.
author | sergey |
---|---|
date | Wed, 12 Dec 2012 04:29:50 +0400 |
parents | 7c517134c42f |
children | 89179bb8c388 |
comparison
equal
deleted
inserted
replaced
255:827cf96faa1c | 256:32aceba4ee6d |
---|---|
2 use strict; | 2 use strict; |
3 | 3 |
4 use Carp qw(carp); | 4 use Carp qw(carp); |
5 | 5 |
6 use IMPL::Const qw(:prop); | 6 use IMPL::Const qw(:prop); |
7 use IMPL::Web::CGIWrapper(); | |
7 | 8 |
8 use IMPL::declare { | 9 use IMPL::declare { |
9 base => [ | 10 base => [ |
10 'IMPL::Object' => undef, | 11 'IMPL::Object' => undef, |
11 'IMPL::Object::Autofill' => '@_' | 12 'IMPL::Object::Autofill' => '@_' |
47 } | 48 } |
48 | 49 |
49 $this->_launder($value, $rx ); | 50 $this->_launder($value, $rx ); |
50 } | 51 } |
51 | 52 |
53 sub rawData { | |
54 my ($this) = @_; | |
55 | |
56 local $IMPL::Web::CGIWrapper::NO_DECODE = 1; | |
57 if ($this->requestMethod eq 'POST') { | |
58 return $this->query->param('POSTDATA'); | |
59 } elsif($this->requestMethod eq 'PUT') { | |
60 return $this->query->param('PUTDATA'); | |
61 } | |
62 } | |
63 | |
52 sub requestMethod { | 64 sub requestMethod { |
53 my ($this) = @_; | 65 my ($this) = @_; |
54 return $this->query->request_method; | 66 return $this->query->request_method; |
67 } | |
68 | |
69 sub contentType { | |
70 return shift->query->content_type(); | |
55 } | 71 } |
56 | 72 |
57 sub pathInfo { | 73 sub pathInfo { |
58 my ($this) = @_; | 74 my ($this) = @_; |
59 return $this->query->path_info; | 75 return $this->query->path_info; |