mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-04-16 13:27:37 -04:00
fix: explicitly set the HTTP status header for the access log
This commit is contained in:
@@ -65,6 +65,7 @@ func (h *HttpAdapter) GetLock(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
w.Header().Set(HeaderWopiLock, lockID)
|
||||
w.WriteHeader(http.StatusOK)
|
||||
}
|
||||
|
||||
// Lock adapts the "Lock" and "UnlockAndRelock" operations for WOPI.
|
||||
@@ -91,8 +92,7 @@ func (h *HttpAdapter) Lock(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
return
|
||||
}
|
||||
// If no error, a HTTP 200 should be sent automatically.
|
||||
// X-WOPI-Lock header isn't needed on HTTP 200
|
||||
w.WriteHeader(http.StatusOK)
|
||||
}
|
||||
|
||||
// RefreshLock adapts the "RefreshLock" operation for WOPI
|
||||
@@ -119,8 +119,7 @@ func (h *HttpAdapter) RefreshLock(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
return
|
||||
}
|
||||
// If no error, a HTTP 200 should be sent automatically.
|
||||
// X-WOPI-Lock header isn't needed on HTTP 200
|
||||
w.WriteHeader(http.StatusOK)
|
||||
}
|
||||
|
||||
// UnLock adapts the "Unlock" operation for WOPI
|
||||
@@ -145,8 +144,7 @@ func (h *HttpAdapter) UnLock(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
return
|
||||
}
|
||||
// If no error, a HTTP 200 should be sent automatically.
|
||||
// X-WOPI-Lock header isn't needed on HTTP 200
|
||||
w.WriteHeader(http.StatusOK)
|
||||
}
|
||||
|
||||
// CheckFileInfo will retrieve the information of the file in json format
|
||||
@@ -229,6 +227,5 @@ func (h *HttpAdapter) PutFile(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
return
|
||||
}
|
||||
// If no error, a HTTP 200 should be sent automatically.
|
||||
// X-WOPI-Lock header isn't needed on HTTP 200
|
||||
w.WriteHeader(http.StatusOK)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user