Skip to content
This repository has been archived by the owner on Dec 17, 2024. It is now read-only.

Commit

Permalink
Merge pull request #759 from vania-pooh/master
Browse files Browse the repository at this point in the history
Video and log listing fix
  • Loading branch information
vania-pooh authored Jul 2, 2019
2 parents 31ca7e9 + c7ee6cb commit a30263c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,11 +275,11 @@ func video(w http.ResponseWriter, r *http.Request) {
return
}
user, remote := util.RequestInfo(r)
log.Printf("[%d] [LOG_LISTING] [%s] [%s]", requestId, user, remote)
if _, ok := r.URL.Query()[jsonParam]; ok {
listFilesAsJson(requestId, w, videoOutputDir, "VIDEO_ERROR")
return
}
log.Printf("[%d] [VIDEO_LISTING] [%s] [%s]", requestId, user, remote)
fileServer := http.StripPrefix(paths.Video, http.FileServer(http.Dir(videoOutputDir)))
fileServer.ServeHTTP(w, r)
}
Expand Down
2 changes: 1 addition & 1 deletion selenoid.go
Original file line number Diff line number Diff line change
Expand Up @@ -594,11 +594,11 @@ func logs(w http.ResponseWriter, r *http.Request) {
return
}
user, remote := util.RequestInfo(r)
log.Printf("[%d] [LOG_LISTING] [%s] [%s]", requestId, user, remote)
if _, ok := r.URL.Query()[jsonParam]; ok {
listFilesAsJson(requestId, w, logOutputDir, "LOG_ERROR")
return
}
log.Printf("[%d] [LOG_LISTING] [%s] [%s]", requestId, user, remote)
fileServer := http.StripPrefix(paths.Logs, http.FileServer(http.Dir(logOutputDir)))
fileServer.ServeHTTP(w, r)
return
Expand Down

0 comments on commit a30263c

Please sign in to comment.