X-Git-Url: http://git.bytex64.net/?a=blobdiff_plain;f=cgi%2Fcanned_responses.c;h=b1da932ad6437ff68d7288b2b16b077065a7d49d;hb=476c970903c4f3d29a8da3fa7c6f6f237745a8b7;hp=a1e4f2956a63611cb23b3c626a6ce15c2836f5d6;hpb=b8df1ce6b0bb9bd51d46b8ad6dce195122126d5a;p=blerg.git diff --git a/cgi/canned_responses.c b/cgi/canned_responses.c index a1e4f29..b1da932 100644 --- a/cgi/canned_responses.c +++ b/cgi/canned_responses.c @@ -6,7 +6,7 @@ #include "canned_responses.h" #include "app.h" -void respond_simple_data(unsigned const char *data, int len) { +void respond_simple_data(const char *data, int len) { printf("Content-length: %d\r\n\r\n", len); fwrite(data, len, 1, stdout); } @@ -36,9 +36,11 @@ void respond_405() { } void respond_JSON_Failure() { + printf("Content-type: application/json\r\n"); respond_simple_data(JSON_FAILURE, strlen(JSON_FAILURE)); } void respond_JSON_Success() { + printf("Content-type: application/json\r\n"); respond_simple_data(JSON_SUCCESS, strlen(JSON_SUCCESS)); }