Commit | Line | Data |
dd4e6fd2 |
1 | package TestApp::Controller::Engine::Response::Redirect; |
2 | |
3 | use strict; |
c057ae86 |
4 | use base 'Catalyst::Controller'; |
dd4e6fd2 |
5 | |
6 | sub one : Relative { |
7 | my ( $self, $c ) = @_; |
8 | $c->response->redirect('/test/writing/is/boring'); |
9 | } |
10 | |
11 | sub two : Relative { |
12 | my ( $self, $c ) = @_; |
13 | $c->response->redirect('http://www.google.com/'); |
14 | } |
15 | |
16 | sub three : Relative { |
17 | my ( $self, $c ) = @_; |
18 | $c->response->redirect('http://www.google.com/'); |
19 | $c->response->status(301); # Moved Permanently |
20 | } |
21 | |
22 | sub four : Relative { |
23 | my ( $self, $c ) = @_; |
24 | $c->response->redirect('http://www.google.com/'); |
25 | $c->response->status(307); # Temporary Redirect |
26 | } |
27 | |
28 | 1; |
29 | |