File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed
modules/static/app/controllers Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change 2
2
3
3
A high productivity, full-stack web framework for the [ Go language] ( http://www.golang.org ) .
4
4
5
- Current Version: 0.11.1 (Oct 27 , 2014)
5
+ Current Version: 0.11.2 (Nov 23 , 2014)
6
6
7
7
** As of Revel 0.11.0, Go 1.3+ is required.**
8
8
Original file line number Diff line number Diff line change @@ -43,8 +43,13 @@ type Static struct {
43
43
// Calls:
44
44
// Static.Serve("public/img", "favicon.png")
45
45
func (c Static ) Serve (prefix , filepath string ) revel.Result {
46
- var basePath string
46
+ // Fix for #503.
47
+ prefix = c .Params .Fixed .Get ("prefix" )
48
+ if prefix == "" {
49
+ return c .NotFound ("" )
50
+ }
47
51
52
+ var basePath string
48
53
if ! fpath .IsAbs (prefix ) {
49
54
basePath = revel .BasePath
50
55
}
@@ -87,6 +92,12 @@ func (c Static) Serve(prefix, filepath string) revel.Result {
87
92
// as Static.Serve with the additional module name pre-pended to the list of
88
93
// arguments.
89
94
func (c Static ) ServeModule (moduleName , prefix , filepath string ) revel.Result {
95
+ // Fix for #503.
96
+ prefix = c .Params .Fixed .Get ("prefix" )
97
+ if prefix == "" {
98
+ return c .NotFound ("" )
99
+ }
100
+
90
101
var basePath string
91
102
for _ , module := range revel .Modules {
92
103
if module .Name == moduleName {
You can’t perform that action at this time.
0 commit comments