diff options
author | Treeki <treeki@gmail.com> | 2015-10-11 14:55:46 +0200 |
---|---|---|
committer | Treeki <treeki@gmail.com> | 2015-10-11 14:55:46 +0200 |
commit | 5445c84684f0c12e4dc0ec06445117418d679105 (patch) | |
tree | 2e663bc8aa085d84c82731a7c38513fe11db697a /src/html-error.c | |
parent | 800c3a250c410150a4560ddaf6a1853c75a516f8 (diff) | |
download | tinyproxy-ninji-patches.tar.gz tinyproxy-ninji-patches.zip |
add crummy authentication supportninji-patches
Diffstat (limited to '')
-rw-r--r-- | src/html-error.c | 11 |
1 files changed, 10 insertions, 1 deletions
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)); } /* |