Skip to content

Commit

Permalink
address CR comment re interface in cmds http handler
Browse files Browse the repository at this point in the history
#1529 (comment)

License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
  • Loading branch information
jbenet committed Jul 28, 2015
1 parent e126194 commit 41c93dc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions commands/http/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ func (i internalHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
}

// now handle responding to the client properly
sendResponse(w, r, req, res)
sendResponse(w, r, res, req)
}

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

func sendResponse(w http.ResponseWriter, r *http.Request, req cmds.Request, res cmds.Response) {
func sendResponse(w http.ResponseWriter, r *http.Request, res cmds.Response, req cmds.Request) {
mime, err := guessMimeType(res)
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
Expand Down

0 comments on commit 41c93dc

Please sign in to comment.