Browse Source

Ensure GIDL-RPC replies have appropriate Content-Type headers.

Jamey Sharp 8 years ago
parent
commit
5992b7a474
1 changed files with 1 additions and 0 deletions
  1. 1 0
      src/Gidl/Backend/Rpc.hs

+ 1 - 0
src/Gidl/Backend/Rpc.hs

@@ -307,6 +307,7 @@ readAttr (attrname, (AttrMethod _ t)) suffix msg =
                      <+> text (constrName suffix msg)
                      <+> dot <+> text "SequenceNum.SequenceNum"
 
+    , text "Snap.modifyResponse $ Snap.setContentType \"application/json\""
     , text "Snap.writeLBS (encode resp)"
     ]
   where