Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
beego
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
beego
Commits
cef91db2
Commit
cef91db2
authored
May 23, 2016
by
astaxie
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1956 from gitchs/master
Ctx.Redirect patch
parents
2165fb6e
f32392e9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
3 deletions
+1
-3
context.go
context/context.go
+1
-3
No files found.
context/context.go
View file @
cef91db2
...
...
@@ -69,10 +69,8 @@ func (ctx *Context) Reset(rw http.ResponseWriter, r *http.Request) {
}
// Redirect does redirection to localurl with http header status code.
// It sends http response header directly.
func
(
ctx
*
Context
)
Redirect
(
status
int
,
localurl
string
)
{
ctx
.
Output
.
Header
(
"Location"
,
localurl
)
ctx
.
ResponseWriter
.
WriteHeader
(
status
)
http
.
Redirect
(
ctx
.
ResponseWriter
,
ctx
.
Request
,
localurl
,
status
)
}
// Abort stops this request.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment