cache file open bugfix
This commit is contained in:
parent
76a2f7d2db
commit
b69c78b380
2 changed files with 5 additions and 4 deletions
|
|
@ -48,7 +48,7 @@ func skipLog(path string) bool {
|
|||
func (fs *FileServer) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
s := &statusInterceptor{w: w}
|
||||
w = s
|
||||
if !skipLog(r.RequestURI) {
|
||||
if !skipLog(r.URL.Path) {
|
||||
defer func() {
|
||||
if s.Status() == http.StatusPartialContent {
|
||||
return
|
||||
|
|
@ -57,7 +57,7 @@ func (fs *FileServer) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
|||
"client", r.RemoteAddr,
|
||||
"method", r.Method,
|
||||
"status", s.Status(),
|
||||
"uri", r.RequestURI,
|
||||
"uri", r.URL.Path,
|
||||
)
|
||||
}()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue