Changes with Apache 1.3.25
+ *) Tighten up the overridden-Server-header bugfix in the proxy, by
+ only overriding if the request is a proxy request. It has been
+ pointed out that the previous fix allows CGIs and modules to
+ override the Server header, which is change to previous behavior.
+ [Graham Leggett, Joshua Slive]
+
*) Another fix for the multiple-cookie header bug in proxy. With some
luck this bug is actually now dead. [Graham Leggett]
API_EXPORT(void) ap_basic_http_header(request_rec *r)
{
char *protocol;
- const char *server;
if (r->assbackwards)
return;
/* output the date header */
ap_send_header_field(r, "Date", ap_gm_timestr_822(r->pool, r->request_time));
- /* keep a previously set server header (possible from proxy), otherwise
+ /* keep the set-by-proxy server header, otherwise
* generate a new server header */
- if (server = ap_table_get(r->headers_out, "Server")) {
- ap_send_header_field(r, "Server", server);
+ if (r->proxyreq) {
+ const char *server = ap_table_get(r->headers_out, "Server");
+ if (server) {
+ ap_send_header_field(r, "Server", server);
+ }
}
else {
ap_send_header_field(r, "Server", ap_get_server_version());