[Groonga-commit] groonga/groonga [master] [http] fix Content-Type on error. fixes #1220

Back to archive index

null+****@clear***** null+****@clear*****
2011年 12月 16日 (金) 22:06:31 JST


Yoji SHIDARA	2011-12-16 13:06:31 +0000 (Fri, 16 Dec 2011)

  New Revision: deada36d3892c40523f1cd8eae557f149252033e

  Log:
    [http] fix Content-Type on error. fixes #1220

  Modified files:
    src/groonga.c

  Modified: src/groonga.c (+3 -1)
===================================================================
--- src/groonga.c    2011-12-16 02:14:14 +0000 (7df71c0)
+++ src/groonga.c    2011-12-16 13:06:31 +0000 (70963fd)
@@ -890,7 +890,9 @@ h_output(grn_ctx *ctx, int flags, void *arg)
     } else {
       GRN_TEXT_SETS(ctx, body, "HTTP/1.1 500 Internal Server Error\r\n");
     }
-    GRN_TEXT_PUTS(ctx, body, "Content-Type: application/json\r\n\r\n");
+    GRN_TEXT_PUTS(ctx, body, "Content-Type: ");
+    GRN_TEXT_PUTS(ctx, body, mime_type);
+    GRN_TEXT_PUTS(ctx, body, "\r\n\r\n");
   }
   {
     ssize_t ret, len;




Groonga-commit メーリングリストの案内
Back to archive index