From 89e0305b6f298347c8721c79514fdd0e726bf89e Mon Sep 17 00:00:00 2001 From: Sean McBride Date: Tue, 16 Nov 2021 15:42:59 -0500 Subject: [PATCH] feat: More detailed HTTP response headers --- runtime/include/http.h | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/runtime/include/http.h b/runtime/include/http.h index 1f8b932..e6a3918 100644 --- a/runtime/include/http.h +++ b/runtime/include/http.h @@ -6,12 +6,29 @@ #define HTTP_MAX_HEADER_LENGTH 32 #define HTTP_MAX_HEADER_VALUE_LENGTH 64 -#define HTTP_RESPONSE_400_BAD_REQUEST "HTTP/1.1 400 Bad Request\r\n\r\n" -#define HTTP_RESPONSE_413_PAYLOAD_TOO_LARGE "HTTP/1.1 413 Payload Too Large\r\n\r\n" -#define HTTP_RESPONSE_503_SERVICE_UNAVAILABLE "HTTP/1.1 503 Service Unavailable\r\n\r\n" +#define HTTP_RESPONSE_400_BAD_REQUEST \ + "HTTP/1.1 400 Bad Request\r\n" \ + "Server: SLEdge\r\n" \ + "Connection: close\r\n" \ + "\r\n" + + +#define HTTP_RESPONSE_413_PAYLOAD_TOO_LARGE \ + "HTTP/1.1 413 Payload Too Large\r\n" \ + "Server: SLEdge\r\n" \ + "Connection: close\r\n" \ + "\r\n" + +#define HTTP_RESPONSE_503_SERVICE_UNAVAILABLE \ + "HTTP/1.1 503 Service Unavailable\r\n" \ + "Server: SLEdge\r\n" \ + "Connection: close\r\n" \ + "\r\n" #define HTTP_RESPONSE_200_TEMPLATE \ "HTTP/1.1 200 OK\r\n" \ + "Server: SLEdge\r\n" \ + "Connection: close\r\n" \ "Content-Type: %s\r\n" \ "Content-Length: %s\r\n" \ "\r\n"