X-Git-Url: http://git.bytex64.net/?a=blobdiff_plain;f=cgi%2Fcanned_responses.c;h=a1e4f2956a63611cb23b3c626a6ce15c2836f5d6;hb=b8df1ce6b0bb9bd51d46b8ad6dce195122126d5a;hp=2f430b17c3d294bfba78e780dfc465b0d0a57bd1;hpb=ec27db46cef1c4643087fa2eeaad2ca72228bc06;p=blerg.git diff --git a/cgi/canned_responses.c b/cgi/canned_responses.c index 2f430b1..a1e4f29 100644 --- a/cgi/canned_responses.c +++ b/cgi/canned_responses.c @@ -1,3 +1,6 @@ +/* Blerg is (C) 2011 The Dominion of Awesome, and is distributed under a + * BSD-style license. Please see the COPYING file for details. + */ #include #include #include "canned_responses.h" @@ -8,6 +11,14 @@ void respond_simple_data(unsigned const char *data, int len) { fwrite(data, len, 1, stdout); } +void respond_403() { + printf("Status: 403 Forbidden\r\n"); + printf("Content-type: text/html\r\n"); + printf("Content-length: %d\r\n\r\n", strlen(CONTENT_403)); + + printf(CONTENT_403); +} + void respond_404() { printf("Status: 404 Not Found\r\n"); printf("Content-type: text/html\r\n");