Skip to content

Commit 41c93dc

Browse files
committed
address CR comment re interface in cmds http handler
#1529 (comment) License: MIT Signed-off-by: Juan Batiz-Benet <[email protected]>
1 parent e126194 commit 41c93dc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

commands/http/handler.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ func (i internalHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
151151
}
152152

153153
// now handle responding to the client properly
154-
sendResponse(w, r, req, res)
154+
sendResponse(w, r, res, req)
155155
}
156156

157157
func guessMimeType(res cmds.Response) (string, error) {
@@ -175,7 +175,7 @@ func guessMimeType(res cmds.Response) (string, error) {
175175
return mimeTypes[enc], nil
176176
}
177177

178-
func sendResponse(w http.ResponseWriter, r *http.Request, req cmds.Request, res cmds.Response) {
178+
func sendResponse(w http.ResponseWriter, r *http.Request, res cmds.Response, req cmds.Request) {
179179
mime, err := guessMimeType(res)
180180
if err != nil {
181181
http.Error(w, err.Error(), http.StatusInternalServerError)

0 commit comments

Comments
 (0)