summaryrefslogtreecommitdiffhomepage
path: root/plop.c
diff options
context:
space:
mode:
Diffstat (limited to 'plop.c')
-rw-r--r--plop.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/plop.c b/plop.c
index bc30138..16f486c 100644
--- a/plop.c
+++ b/plop.c
@@ -7,6 +7,8 @@
#include <sys/types.h>
#include <unistd.h>
+#include "http.h"
+
/// Tries to create, bind and start listening on INET server socket.
/// \param node Hostname
/// \param service Port
@@ -83,13 +85,7 @@ int handle_client(struct pollfd * pfd, const int shift_by)
return -1; // TODO: Handle errors properly
}
- static const char * response =
- "HTTP/1.1 200 OK\r\n"
- "Content-Type: text/plain; charset=utf-8\r\n"
- "\r\n"
- "plop\n";
-
- if (-1 == send(pfd->fd, response, strlen(response), 0))
+ if (-1 == respond_only_status(pfd->fd, STATUS_NOT_IMPLEMENTED))
{
// TODO: Handle errors properly
}