Skip to content
Myr

fix bug (#1682)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by thinkerou · committed by GitHub · parent f463d84 · Browse files · 1 file+4 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+4 added−1 removed

  • other:+4 added−1 removed

1 file+4 added−1 removed

modified:routergroup.go+4 added-1 removed
185 unmodified lines
186 absolutePath := group.calculateAbsolutePath(relativePath)187 fileServer := http.StripPrefix(absolutePath, http.FileServer(fs))188189 return func(c *Context) {190 file := c.Param("filepath")190 if _, nolisting := fs.(*onlyfilesFS); nolisting {191 c.Writer.WriteHeader(http.StatusNotFound)192 }193194 file := c.Param("filepath")195 // Check if file exists and/or if we have permission to access it196 if _, err := fs.Open(file); err != nil {197 c.Writer.WriteHeader(http.StatusNotFound)198 c.handlers = group.engine.allNoRoute
30 unmodified lines