Browse Source

Fixed TLS access problem on windows webdav client

TC pushbot 5 4 years ago
parent
commit
cf2d0c5db3
1 changed files with 3 additions and 3 deletions
  1. 3 3
      mod/storage/webdav/webdav.go

+ 3 - 3
mod/storage/webdav/webdav.go

@@ -194,7 +194,7 @@ func (s *Server) HandleRequest(w http.ResponseWriter, r *http.Request) {
 	//log.Println("Request Method: ", r.Method)
 
 	//Check if this is enabled
-	if s.Enabled == false {
+	if !s.Enabled {
 		http.NotFound(w, r)
 		return
 	}
@@ -212,8 +212,8 @@ func (s *Server) HandleRequest(w http.ResponseWriter, r *http.Request) {
 	}
 
 	//Windows File Explorer. Handle with special case
-	if r.Header["User-Agent"] != nil && strings.Contains(r.Header["User-Agent"][0], "Microsoft-WebDAV-MiniRedir") && s.tlsMode == false {
-		//log.Println("Windows File Explorer Connection. Routing using alternative handler")
+	if r.Header["User-Agent"] != nil && strings.Contains(r.Header["User-Agent"][0], "Microsoft-WebDAV-MiniRedir") && r.TLS == nil {
+		log.Println("Windows File Explorer Connection. Routing using alternative handler")
 		s.HandleWindowClientAccess(w, r, reqRoot)
 		return
 	}