Don't send empty Server headers (#1620)

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2145 152afb58-edef-0310-8abb-c4023f1b3aa9
This commit is contained in:
Stefan Bühler 2008-04-10 10:54:27 +00:00
parent 91d83ea983
commit ff4cabbb1d
2 changed files with 2 additions and 1 deletions

1
NEWS
View File

@ -12,6 +12,7 @@ NEWS
* Fix mod_magnet: enable "request.method" and "request.protocol" in lighty.env (#1308)
* Fix segfault for appending matched parts if there was no regex matching (just give empty strings) (#1601)
* Use data_response_init in mod_fastcgi x-sendfile handling for response.headers, fix a small "memleak" (#1628)
* Don't send empty Server headers (#1620)
- 1.4.19 - 2008-03-10

View File

@ -101,7 +101,7 @@ int http_response_write_header(server *srv, connection *con) {
if (!have_server) {
if (buffer_is_empty(con->conf.server_tag)) {
BUFFER_APPEND_STRING_CONST(b, "\r\nServer: " PACKAGE_NAME "/" PACKAGE_VERSION);
} else {
} else if (con->conf.server_tag->used > 1) {
BUFFER_APPEND_STRING_CONST(b, "\r\nServer: ");
buffer_append_string_encoded(b, CONST_BUF_LEN(con->conf.server_tag), ENCODING_HTTP_HEADER);
}