From cbefb5c89e4a18f525b91fa58189b91fed80f172 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Tue, 25 Oct 2022 16:27:43 +0200 Subject: [PATCH] Don't try to set Content-Type if no mimetype is available --- openhtf/output/servers/station_server.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openhtf/output/servers/station_server.py b/openhtf/output/servers/station_server.py index 690edd523..634beb3af 100644 --- a/openhtf/output/servers/station_server.py +++ b/openhtf/output/servers/station_server.py @@ -360,7 +360,8 @@ def get(self, test_uid, phase_descriptor_id, attachment_name): self.set_status(404) return - self.set_header('Content-Type', attachment.mimetype) + if attachment.mimetype: + self.set_header('Content-Type', attachment.mimetype) self.write(attachment.data)