diff --git a/src/lib/fastcgi.c b/src/lib/fastcgi.c index 554e144..cfd50ff 100644 --- a/src/lib/fastcgi.c +++ b/src/lib/fastcgi.c @@ -278,7 +278,7 @@ int fastcgi_header(fastcgi_conn *conn, http_res *res, char *err_msg) { FCGI_Header header; char *content; unsigned short content_len, req_id; - int ret; + long ret; int err = 0; while (1) { @@ -372,7 +372,7 @@ int fastcgi_header(fastcgi_conn *conn, http_res *res, char *err_msg) { } ret = http_parse_header_field(&res->hdr, ptr, pos0); - if (ret != 0) return ret; + if (ret != 0) return (int) ret; if (pos0[2] == '\r' && pos0[3] == '\n') { return 0; } diff --git a/src/lib/http.c b/src/lib/http.c index 2c24dc2..b63d8eb 100644 --- a/src/lib/http.c +++ b/src/lib/http.c @@ -8,7 +8,6 @@ #include "http.h" #include "utils.h" #include "compress.h" -#include "../necronda-server.h" #include void http_to_camel_case(char *str, int mode) { diff --git a/src/lib/http.h b/src/lib/http.h index dac4d31..05188d0 100644 --- a/src/lib/http.h +++ b/src/lib/http.h @@ -29,6 +29,8 @@ #define HTTP_COLOR_WARNING "#E0C000" #define HTTP_COLOR_ERROR "#C00000" +#define CLIENT_MAX_HEADER_SIZE 8192 + #ifndef SERVER_STR # define SERVER_STR "Necronda" #endif diff --git a/src/lib/http_static.c b/src/lib/http_static.c index 46d3c03..d63cd1f 100644 --- a/src/lib/http_static.c +++ b/src/lib/http_static.c @@ -5,8 +5,8 @@ * Lorenz Stechauner, 2021-05-03 */ +#include "../necronda.h" #include "http.h" -#include "utils.h" const http_status http_statuses[] = { {100, "Informational", "Continue"}, diff --git a/src/necronda-server.h b/src/necronda-server.h index c9ddddb..46a083a 100644 --- a/src/necronda-server.h +++ b/src/necronda-server.h @@ -20,7 +20,6 @@ #define SERVER_TIMEOUT 4 #define CHUNK_SIZE 8192 -#define CLIENT_MAX_HEADER_SIZE 8192 #ifndef DEFAULT_HOST # define DEFAULT_HOST "www.necronda.net"