mirror of
https://github.com/gravitational/teleport.git
synced 2026-10-29 17:58:15 +08:00
Return nil on success for web UI file tranfers (#15021)
When we download, we write the file contents with the `http.ResponseWriter` which is also used to write our replies, so it was also writing our success replies. fixes https://github.com/gravitational/teleport/issues/14557
This commit is contained in:
+3
-1
@@ -79,7 +79,9 @@ func (h *Handler) transferFile(w http.ResponseWriter, r *http.Request, p httprou
|
||||
return nil, trace.Wrap(err)
|
||||
}
|
||||
|
||||
return OK(), nil
|
||||
// We must return nil so that we don't write anything to
|
||||
// the response, which would corrupt the downloaded file.
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
type fileTransfer struct {
|
||||
|
||||
Reference in New Issue
Block a user