diff --git a/www/lighttpd/Makefile b/www/lighttpd/Makefile index eee42c1a07c..2f2cdb5e64e 100644 --- a/www/lighttpd/Makefile +++ b/www/lighttpd/Makefile @@ -1,10 +1,11 @@ -# $OpenBSD: Makefile,v 1.25 2005/11/23 15:22:48 brad Exp $ +# $OpenBSD: Makefile,v 1.26 2006/01/03 23:39:11 brad Exp $ SHARED_ONLY= Yes COMMENT= "secure, fast, compliant, and very flexible web-server" DISTNAME= lighttpd-1.4.8 +PKGNAME= ${DISTNAME}p1 CATEGORIES= www net MAINTAINER= Brad Smith diff --git a/www/lighttpd/patches/patch-src_mod_proxy_c b/www/lighttpd/patches/patch-src_mod_proxy_c new file mode 100644 index 00000000000..e3737a446c5 --- /dev/null +++ b/www/lighttpd/patches/patch-src_mod_proxy_c @@ -0,0 +1,17 @@ +$OpenBSD: patch-src_mod_proxy_c,v 1.1 2006/01/03 23:39:12 brad Exp $ +--- src/mod_proxy.c.orig Tue Jan 3 18:18:34 2006 ++++ src/mod_proxy.c Tue Jan 3 18:20:03 2006 +@@ -439,7 +439,12 @@ static int proxy_create_env(server *srv, + BUFFER_APPEND_STRING_CONST(b, " HTTP/1.0\r\n"); + + proxy_append_header(con, "X-Forwarded-For", (char *)inet_ntop_cache_get_ip(srv, &(con->dst_addr))); +- proxy_set_header(con, "X-Host", con->request.http_host->ptr); ++ /* http_host is NOT is just a pointer to a buffer ++ * which is NULL if it is not set */ ++ if (con->request.http_host && ++ !buffer_is_empty(con->request.http_host)) { ++ proxy_set_header(con, "X-Host", con->request.http_host->ptr); ++ } + proxy_set_header(con, "X-Forwarded-Proto", con->conf.is_ssl ? "https" : "http"); + + /* request header */