浏览代码

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

Jamey Sharp 9 年之前
父节点
当前提交
5992b7a474
共有 1 个文件被更改,包括 1 次插入0 次删除
  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