Add Host field for HTTP/1.1. - bitreich-httpd - Bitreich HTTPD service
 (HTM) git clone git://bitreich.org/bitreich-httpd git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/bitreich-httpd
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) Tags
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit f03e566220bca9b8371d4a188cbc5e580e4b2274
 (DIR) parent e7bd6f5e3b9ad60226f8dc84875826f85656d0d7
 (HTM) Author: Christoph Lohmann <20h@r-36.net>
       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(-)
       ---
 (DIR) diff --git a/README.md b/README.md
       @@ -16,7 +16,7 @@ This simple service is meant to be used with inetd(8) or xinetd(8).
        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
        
 (DIR) 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");
        }