Skip to content
This repository has been archived by the owner on Nov 2, 2020. It is now read-only.

Commit

Permalink
feat(Response): Add redirect code
Browse files Browse the repository at this point in the history
Signed-off-by: Rhilip <rhilipruan@gmail.com>
  • Loading branch information
Rhilip committed Jun 15, 2019
1 parent 037ca71 commit 5d8742d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,11 @@
- **Tracker:** Add passkey and info_hash Filter

### Refactor
- **InviteAction:** Use InviteActionFrom instead of func in Controller
- **Mailer:** Use phpmailer to replace swiftmailer
- **Redis:** Add more Redis arguments in debug output
- **Session:** Add Session Format Docs
- **Validator:** Add function buildDefaultValue()
- **ext2Icon:** Add more File format

### Revert
Expand Down
4 changes: 2 additions & 2 deletions framework/Http/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ public function setCookie($name, $value = '', $expires = 0, $path = '', $domain
}

// 重定向
public function redirect($url)
public function redirect($url, $code = 302)
{
$this->setHeader('Location', $url);
$this->statusCode = 302;
$this->statusCode = $code;
}

// 发送
Expand Down

0 comments on commit 5d8742d

Please sign in to comment.