From c47f75eb5b30a744e444a26294be79b40cb80b0b Mon Sep 17 00:00:00 2001 From: chrislu Date: Wed, 1 Feb 2023 02:38:05 -0800 Subject: [PATCH] fix null content type caused exception in hdfs client fix https://github.com/seaweedfs/seaweedfs/issues/4170 --- weed/server/filer_server_handlers_read.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/weed/server/filer_server_handlers_read.go b/weed/server/filer_server_handlers_read.go index 58d1928c6..99ac77498 100644 --- a/weed/server/filer_server_handlers_read.go +++ b/weed/server/filer_server_handlers_read.go @@ -162,6 +162,8 @@ func (fs *FilerServer) GetOrHeadHandler(w http.ResponseWriter, r *http.Request) } if mimeType != "" { w.Header().Set("Content-Type", mimeType) + } else { + w.Header().Set("Content-Type", "application/octet-stream") } // print out the header from extended properties