Add Host field for HTTP/1.1. - bitreich-httpd - Bitreich HTTPD service | |
git clone git://bitreich.org/bitreich-httpd git://enlrupgkhuxnvlhsf6lc3fziv5h2h… | |
Log | |
Files | |
Refs | |
Tags | |
README | |
LICENSE | |
--- | |
commit f03e566220bca9b8371d4a188cbc5e580e4b2274 | |
parent e7bd6f5e3b9ad60226f8dc84875826f85656d0d7 | |
Author: Christoph Lohmann <[email protected]> | |
Date: Fri, 24 Jul 2020 21:46:07 +0200 | |
Add Host field for HTTP/1.1. | |
Diffstat: | |
M README.md | 2 +- | |
M bitreich-httpd.c | 1 + | |
2 files changed, 2 insertions(+), 1 deletion(-) | |
--- | |
diff --git a/README.md b/README.md | |
@@ -16,7 +16,7 @@ This simple service is meant to be used with inetd(8) or xine… | |
Edit the bitreich-httpd.c variable »wwwbase« to your root base. Then | |
change wwwindex to whatever is your index file. In case you need to | |
serve some other files, see how bitreich.sh is handled. This can be | |
-easily extended. | |
+easily extended. Do not forget to change the Host in printheaders(). | |
## Bugs | |
diff --git a/bitreich-httpd.c b/bitreich-httpd.c | |
@@ -46,6 +46,7 @@ printheaders(char *ctype) | |
printf("X-Use-Gopher: gopher://bitreich.org\r\n"); | |
printf("If-By-Whiskey: Terrorist\r\n"); | |
printf("Server: bitreich-httpd/2.0\r\n"); | |
+ printf("Host: bitreich.org\r\n"); | |
printf("Connection: close\r\n"); | |
} | |