Macaron: remove custom Request type (#37874)
* remove macaron.Request, use http.Request instead * remove com dependency from bindings module * fix another c.Req.Request
This commit is contained in:
1 parent
56f61001a8
commit
c3ab2fdeb7
35 files changed
+1205
-111
No files matched your search
@@ -160,7 +160,7 @@ func staticHandler(ctx *macaron.Context, log log.Logger, opt StaticOptions) bool
|
||||
rePrefix := regexp.MustCompile(`^(?:/\\|/+)`)
|
||||
path = rePrefix.ReplaceAllString(path, "/")
|
||||
}
|
||||
http.Redirect(ctx.Resp, ctx.Req.Request, path, http.StatusFound)
|
||||
http.Redirect(ctx.Resp, ctx.Req, path, http.StatusFound)
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -190,7 +190,7 @@ func staticHandler(ctx *macaron.Context, log log.Logger, opt StaticOptions) bool
|
||||
opt.AddHeaders(ctx)
|
||||
}
|
||||
|
||||
http.ServeContent(ctx.Resp, ctx.Req.Request, file, fi.ModTime(), f)
|
||||
http.ServeContent(ctx.Resp, ctx.Req, file, fi.ModTime(), f)
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user