Skip to content

Commit 98559d0

Browse files
committedJul 28, 2015
put comment back
1 parent 2cad99d commit 98559d0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed
 

‎commands/http/handler.go

+3
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,9 @@ func sendResponse(w http.ResponseWriter, req cmds.Request, res cmds.Response) {
175175
}
176176

177177
if _, ok := res.Output().(io.Reader); ok {
178+
// we don't set the Content-Type for streams, so that browsers can MIME-sniff the type themselves
179+
// we set this header so clients have a way to know this is an output stream
180+
// (not marshalled command output)
178181
mime = ""
179182
h.Set(streamHeader, "1")
180183
}

0 commit comments

Comments
 (0)
Please sign in to comment.