From 8af1923e7de7e1ca096487f129209779ae035994 Mon Sep 17 00:00:00 2001 From: Alex Layton Date: Thu, 24 Jun 2021 20:42:51 -0400 Subject: [PATCH] Fix wrong Content-Type for binary --- oada/services/http-handler/src/resources.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/oada/services/http-handler/src/resources.ts b/oada/services/http-handler/src/resources.ts index 5bc45555..f0d1dc6f 100644 --- a/oada/services/http-handler/src/resources.ts +++ b/oada/services/http-handler/src/resources.ts @@ -184,6 +184,7 @@ const plugin: FastifyPluginAsync = async function (fastify, opts) { const oadaGraph = request.requestContext.get('oadaGraph')!; const type = oadaGraph.type ?? 'application/json'; + reply.type(type); // TODO: Why does this not work as a fastify plugin?? const headers = handleResponse(type); // TODO: Why does fastify strip content-type params??