summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--Makefile11
-rw-r--r--http.c11
-rw-r--r--http.h14
-rw-r--r--plop.c1
-rw-r--r--plop.h1
-rw-r--r--request.c2
-rw-r--r--response.c2
7 files changed, 5 insertions, 37 deletions
diff --git a/Makefile b/Makefile
index dfdafc0..c4c3862 100644
--- a/Makefile
+++ b/Makefile
@@ -3,13 +3,12 @@ CFLAGS+=-I/usr/include/lua5.3
LDLIBS+=-llua5.3
PREFIX?=/usr/local
-plop: main.o plop.o http.o response.o request.o
+plop: main.o plop.o response.o request.o
-http.o: http.h
-main.o: plop.h http.h request.h
-plop.o: http.h plop.h request.h response.h
-request.o: http.h request.h
-response.o: response.h http.h
+main.o: plop.h request.h
+plop.o: plop.h request.h response.h
+request.o: request.h
+response.o: response.h
clean:
rm -f plop *.o
diff --git a/http.c b/http.c
deleted file mode 100644
index 7616392..0000000
--- a/http.c
+++ /dev/null
@@ -1,11 +0,0 @@
-#include "http.h"
-
-const char * status_str[] = {
- [STATUS_OK] = "200 OK",
- [STATUS_BAD_REQUEST] = "400 Bad Request",
- [STATUS_METHOD_NOT_ALLOWED] = "405 Method Not Allowed",
- [STATUS_REQUEST_TIMEOUT] = "408 Request Timeout",
- [STATUS_INTERNAL_SERVER_ERROR] = "500 Internal Server Error",
- [STATUS_NOT_IMPLEMENTED] = "501 Not Implemented",
- [STATUS_VERSION_NOT_SUPPORTED] = "505 Version Not Supported",
-};
diff --git a/http.h b/http.h
deleted file mode 100644
index 52a1822..0000000
--- a/http.h
+++ /dev/null
@@ -1,14 +0,0 @@
-#pragma once
-
-enum status
-{
- STATUS_OK = 200,
- STATUS_BAD_REQUEST = 400,
- STATUS_METHOD_NOT_ALLOWED = 405,
- STATUS_REQUEST_TIMEOUT = 408,
- STATUS_INTERNAL_SERVER_ERROR = 500,
- STATUS_NOT_IMPLEMENTED = 501,
- STATUS_VERSION_NOT_SUPPORTED = 505,
-};
-
-extern const char * status_str[];
diff --git a/plop.c b/plop.c
index 43f9ed4..8fd8cd1 100644
--- a/plop.c
+++ b/plop.c
@@ -14,7 +14,6 @@
#include <lauxlib.h>
#include <lua.h>
-#include "http.h"
#include "request.h"
#include "response.h"
diff --git a/plop.h b/plop.h
index 1aeec7f..78c307c 100644
--- a/plop.h
+++ b/plop.h
@@ -4,7 +4,6 @@
#include <lua.h>
-#include "http.h"
#include "request.h"
int make_server(const char *, const char *);
diff --git a/request.c b/request.c
index e6ee3bf..114cfd5 100644
--- a/request.c
+++ b/request.c
@@ -11,8 +11,6 @@
#include <lauxlib.h>
#include <lua.h>
-#include "http.h"
-
static const int REQUEST_DATA_SIZE = 4096;
/// Allocates and initializes request structure.
diff --git a/response.c b/response.c
index 02dd59b..959ed18 100644
--- a/response.c
+++ b/response.c
@@ -8,8 +8,6 @@
#include <lua.h>
-#include "http.h"
-
/// Sends a response based on the current top value on the stack.
/// \param L Lua state to send response for
/// \param fd File descriptor of a socket to write to