From 98559d0e0bddd62d4c478df0e67e34e5dbef9c4e Mon Sep 17 00:00:00 2001 From: Jeromy Johnson Date: Tue, 28 Jul 2015 08:44:35 -0700 Subject: [PATCH] put comment back --- commands/http/handler.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/commands/http/handler.go b/commands/http/handler.go index e4abec3cd..7fa7f4552 100644 --- a/commands/http/handler.go +++ b/commands/http/handler.go @@ -175,6 +175,9 @@ func sendResponse(w http.ResponseWriter, req cmds.Request, res cmds.Response) { } if _, ok := res.Output().(io.Reader); ok { + // we don't set the Content-Type for streams, so that browsers can MIME-sniff the type themselves + // we set this header so clients have a way to know this is an output stream + // (not marshalled command output) mime = "" h.Set(streamHeader, "1") }