Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support for 301 and 302 redirects, enhanced 307, extended Contr…
…oller to support. Signed-off-by: Kris Jordan <krisjordan@gmail.com> Signed-off-by: Recess PHP Framework <kris@recessframework.org>
- Loading branch information
1 parent
5643227
commit b18bfa8
Showing
4 changed files
with
56 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
Library::import('recess.http.Response'); | ||
Library::import('recess.http.ResponseCodes'); | ||
|
||
class FoundResponse extends Response { | ||
public function __construct(Request $request, $resourceUri, $data = array()) { | ||
parent::__construct($request, ResponseCodes::HTTP_FOUND, $data); | ||
$this->addHeader("Location: $resourceUri"); | ||
} | ||
} | ||
?> |
11 changes: 11 additions & 0 deletions
11
recess/lib/recess/http/responses/MovedPermanentlyResponse.class.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
Library::import('recess.http.Response'); | ||
Library::import('recess.http.ResponseCodes'); | ||
|
||
class MovedPermanentlyResponse extends Response { | ||
public function __construct(Request $request, $resourceUri, $data = array()) { | ||
parent::__construct($request, ResponseCodes::HTTP_MOVED_PERMANENTLY, $data); | ||
$this->addHeader("Location: $resourceUri"); | ||
} | ||
} | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters