Refactor a bunch of stuff for cgi fork
[blerg.git] / http / canned_responses.c
index c61e2a7..5461b46 100644 (file)
@@ -1,22 +1,13 @@
 #include <string.h>
 #include <microhttpd.h>
-#include "http.h"
+#include "app.h"
 #include "canned_responses.h"
 
 void init_responses() {
-#define CONTENT_401 "<html><head><title>401 Unauthorized</title></head><body><h1>401 Unauthorized</h1>DENIED</body></html>"
        response_401 = MHD_create_response_from_data(strlen (CONTENT_401), CONTENT_401, MHD_NO, MHD_NO);  
-
-#define CONTENT_404 "<html><head><title>404 Not Found</title></head><body><h1>404 Not Found</h1>I couldn't find that.</body></html>"
        response_404 = MHD_create_response_from_data(strlen(CONTENT_404), CONTENT_404, MHD_NO, MHD_NO);
-
-#define CONTENT_405 "<html><head><title>405 Method Not Allowed</title></head><body><h1>405 Method Not Allowed</h1>I'm sorry, Dave. I'm afraid I can't do that.</body></html>"
        response_405 = MHD_create_response_from_data(strlen(CONTENT_405), CONTENT_405, MHD_NO, MHD_NO);
-
-#define JSON_SUCCESS "{status: \"success\"}"
        response_JSON_Success = MHD_create_response_from_data(strlen(JSON_SUCCESS), JSON_SUCCESS, MHD_NO, MHD_NO);
-
-#define JSON_FAILURE "{status: \"failure\"}"
        response_JSON_Failure = MHD_create_response_from_data(strlen(JSON_FAILURE), JSON_FAILURE, MHD_NO, MHD_NO);
 }