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
5dee6b7d
Commit
5dee6b7d
authored
May 28, 2014
by
astaxie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
beego: fix the namespace cond
parent
f6c7a6bd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
0 deletions
+4
-0
namespace.go
namespace.go
+1
-0
router.go
router.go
+3
-0
No files found.
namespace.go
View file @
5dee6b7d
...
...
@@ -191,6 +191,7 @@ func (n *Namespace) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
}
if
n
.
condition
!=
nil
&&
!
n
.
condition
(
context
)
{
http
.
Error
(
rw
,
"Method Not Allowed"
,
405
)
return
}
n
.
handlers
.
ServeHTTP
(
rw
,
r
)
}
...
...
router.go
View file @
5dee6b7d
...
...
@@ -763,6 +763,9 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request)
if
!
findrouter
{
for
_
,
route
:=
range
p
.
fixrouters
{
n
:=
len
(
requestPath
)
if
n
==
0
{
continue
}
if
requestPath
==
route
.
pattern
{
runMethod
=
p
.
getRunMethod
(
r
.
Method
,
context
,
route
)
if
runMethod
!=
""
{
...
...
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