~lastrosade/jsthttpd

756ea8c6475a12e8f7cb46829eb4b06084fae541 — Jeremy Lee Shields 1 year, 3 months ago 635c5c4
Removed server header
1 files changed, 6 insertions(+), 14 deletions(-)

M src/libhttpd.c
M src/libhttpd.c => src/libhttpd.c +6 -14
@@ 1,6 1,6 @@
/* libhttpd.c - HTTP protocol library
**
** Copyright � 1995,1998,1999,2000,2001 by Jef Poskanzer <jef@mail.acme.com>.
** Copyright � 1995,1998,1999,2000,2001 by Jef Poskanzer <jef@mail.acme.com>.
** All rights reserved.
**
** Redistribution and use in source and binary forms, with or without


@@ 80,12 80,6 @@ extern char* crypt( const char* key, const char* setting );
#include <timers.h>
#include <version.h>

#ifdef SHOW_SERVER_VERSION
#define EXPOSED_SERVER_SOFTWARE SERVER_SOFTWARE
#else /* SHOW_SERVER_VERSION */
#define EXPOSED_SERVER_SOFTWARE "sthttpd"
#endif /* SHOW_SERVER_VERSION */

#ifndef STDIN_FILENO
#define STDIN_FILENO 0
#endif


@@ 635,8 629,8 @@ send_mime( httpd_conn* hc, int status, char* title, char* encodings, char* extra
	(void) my_snprintf(
	    fixed_type, sizeof(fixed_type), type, hc->hs->charset );
	(void) my_snprintf( buf, sizeof(buf),
	    "%.20s %d %s\015\012Server: %s\015\012Content-Type: %s\015\012Date: %s\015\012Last-Modified: %s\015\012Accept-Ranges: bytes\015\012Connection: close\015\012",
	    hc->protocol, status, title, EXPOSED_SERVER_SOFTWARE, fixed_type,
	    "%.20s %d %s\015\012Content-Type: %s\015\012Date: %s\015\012Last-Modified: %s\015\012Accept-Ranges: bytes\015\012Connection: close\015\012",
	    hc->protocol, status, title, fixed_type,
	    nowbuf, modbuf );
	add_response( hc, buf );
	s100 = status / 100;


@@ 732,7 726,7 @@ send_response( httpd_conn* hc, int status, char* title, char* extraheads, char* 
    (void) my_snprintf( buf, sizeof(buf), "\
<HTML>\n\
<HEAD><TITLE>%d %s</TITLE></HEAD>\n\
<BODY BGCOLOR=\"#cc9999\" TEXT=\"#000000\" LINK=\"#2020ff\" VLINK=\"#4040cc\">\n\
<BODY BGCOLOR=\"#f2f2f2\" TEXT=\"#444\" LINK=\"green\" VLINK=\"green\">\n\
<H2>%d %s</H2>\n",
	status, title, status, title );
    add_response( hc, buf );


@@ 758,10 752,8 @@ send_response_tail( httpd_conn* hc )

    (void) my_snprintf( buf, sizeof(buf), "\
<HR>\n\
<ADDRESS><A HREF=\"%s\">%s</A></ADDRESS>\n\
</BODY>\n\
</HTML>\n",
	SERVER_ADDRESS, EXPOSED_SERVER_SOFTWARE );
</HTML>\n" );
    add_response( hc, buf );
    }



@@ 2762,7 2754,7 @@ ls( httpd_conn* hc )
	    (void) fprintf( fp, "\
<HTML>\n\
<HEAD><TITLE>Index of %.80s</TITLE></HEAD>\n\
<BODY BGCOLOR=\"#99cc99\" TEXT=\"#000000\" LINK=\"#2020ff\" VLINK=\"#4040cc\">\n\
<BODY BGCOLOR=\"#f2f2f2\" TEXT=\"#444\" LINK=\"green\" VLINK=\"green\">\n\
<H2>Index of %.80s</H2>\n\
<PRE>\n\
mode  links  bytes  last-changed  name\n\