From d19820ac4ac7aa5d54c1873832489b8e34b17df6 Mon Sep 17 00:00:00 2001 From: Sean McBride Date: Fri, 5 Aug 2022 14:04:37 -0400 Subject: [PATCH] fix: HTTP nits --- runtime/include/http.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/runtime/include/http.h b/runtime/include/http.h index cab6f34..c3e3a0d 100644 --- a/runtime/include/http.h +++ b/runtime/include/http.h @@ -5,8 +5,8 @@ #include "http_total.h" #include "panic.h" -#define HTTP_MAX_HEADER_COUNT 16 -#define HTTP_MAX_HEADER_LENGTH 32 +#define HTTP_MAX_HEADER_COUNT 32 +#define HTTP_MAX_HEADER_LENGTH 64 #define HTTP_MAX_HEADER_VALUE_LENGTH 256 #define HTTP_MAX_FULL_URL_LENGTH 256 @@ -33,31 +33,41 @@ #define HTTP_RESPONSE_404_NOT_FOUND \ "HTTP/1.1 404 Not Found\r\n" \ "Server: SLEdge\r\n" \ + "Content-Length: 0\r\n" \ "Connection: close\r\n" \ + "\r\n" \ "\r\n" #define HTTP_RESPONSE_413_PAYLOAD_TOO_LARGE \ "HTTP/1.1 413 Payload Too Large\r\n" \ "Server: SLEdge\r\n" \ + "Content-Length: 0\r\n" \ "Connection: close\r\n" \ + "\r\n" \ "\r\n" #define HTTP_RESPONSE_429_TOO_MANY_REQUESTS \ "HTTP/1.1 429 Too Many Requests\r\n" \ "Server: SLEdge\r\n" \ + "Content-Length: 0\r\n" \ "Connection: close\r\n" \ + "\r\n" \ "\r\n" #define HTTP_RESPONSE_500_INTERNAL_SERVER_ERROR \ "HTTP/1.1 500 Internal Server Error\r\n" \ "Server: SLEdge\r\n" \ + "Content-Length: 0\r\n" \ "Connection: close\r\n" \ + "\r\n" \ "\r\n" #define HTTP_RESPONSE_503_SERVICE_UNAVAILABLE \ "HTTP/1.1 503 Service Unavailable\r\n" \ "Server: SLEdge\r\n" \ + "Content-Length: 0\r\n" \ "Connection: close\r\n" \ + "\r\n" \ "\r\n" static inline const char *