Browse Source

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
svn/tags/lighttpd-1.4.20
Stefan Bühler 14 years ago
parent
commit
ff4cabbb1d
  1. 1
      NEWS
  2. 2
      src/response.c

1
NEWS

@ -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

2
src/response.c

@ -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);
}

Loading…
Cancel
Save