From 5445c84684f0c12e4dc0ec06445117418d679105 Mon Sep 17 00:00:00 2001 From: Treeki Date: Sun, 11 Oct 2015 14:55:46 +0200 Subject: add crummy authentication support --- src/html-error.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/html-error.c') diff --git a/src/html-error.c b/src/html-error.c index 2721a40..09809cc 100644 --- a/src/html-error.c +++ b/src/html-error.c @@ -180,10 +180,19 @@ int send_http_headers (struct conn_s *connptr, int code, const char *message) const char *headers = "HTTP/1.0 %d %s\r\n" "Server: %s/%s\r\n" + "%s" "Content-Type: text/html\r\n" "Connection: close\r\n" "\r\n"; +#ifdef AUTH_SUPPORT + const char *auth_header = lookup_variable(connptr, "auth-header"); + if (auth_header == NULL) + auth_header = ""; +#else + const char *auth_header = ""; +#endif + return (write_message (connptr->client_fd, headers, - code, message, PACKAGE, VERSION)); + code, message, PACKAGE, VERSION, auth_header)); } /* -- cgit v1.2.3