aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsem <sem@FreeBSD.org>2005-02-13 00:51:31 +0800
committersem <sem@FreeBSD.org>2005-02-13 00:51:31 +0800
commit912ba8c69e90cd5937b0c7d3018cba8b9dc96f0b (patch)
tree0fd54be8568dc984c9ac9b3b86e9c3f83186933d
parentc0a3979606d4efd3a8bfbcde26129f7c7551c6ea (diff)
downloadfreebsd-ports-gnome-912ba8c69e90cd5937b0c7d3018cba8b9dc96f0b.tar.gz
freebsd-ports-gnome-912ba8c69e90cd5937b0c7d3018cba8b9dc96f0b.tar.zst
freebsd-ports-gnome-912ba8c69e90cd5937b0c7d3018cba8b9dc96f0b.zip
- The patch fixes a CGI handler bug in the config file.
Obtained from: http://wiki.lighttpd.net/7.html#A14 and http://cvs.pld-linux.org/cgi-bin/cvsweb/SOURCES/lighttpd-empty_cgi_handler.patch?rev=1.1 - Bump PORTREVISON. PR: ports/77418 Submitted by: maintainer
-rw-r--r--www/lighttpd/Makefile1
-rw-r--r--www/lighttpd/files/patch-src::cgi.c29
2 files changed, 30 insertions, 0 deletions
diff --git a/www/lighttpd/Makefile b/www/lighttpd/Makefile
index 248ea219147b..56646bd5e2c9 100644
--- a/www/lighttpd/Makefile
+++ b/www/lighttpd/Makefile
@@ -7,6 +7,7 @@
PORTNAME= lighttpd
PORTVERSION= 1.3.10
+PORTREVISION= 1
CATEGORIES= www
MASTER_SITES= http://www.lighttpd.net/download/ \
http://dl.fkb.wormulon.net/lighttpd/ \
diff --git a/www/lighttpd/files/patch-src::cgi.c b/www/lighttpd/files/patch-src::cgi.c
new file mode 100644
index 000000000000..2c8e7d73e61e
--- /dev/null
+++ b/www/lighttpd/files/patch-src::cgi.c
@@ -0,0 +1,29 @@
+--- ./src/cgi.c~ 2005-02-08 00:08:01.000000000 +0200
++++ ./src/cgi.c 2005-02-08 00:13:02.000000000 +0200
+@@ -686,16 +686,18 @@
+
+ int to_cgi_fds[2];
+ int from_cgi_fds[2];
+- struct stat st;
+-
++
+ #ifndef __WIN32
++ struct stat st;
+
+- /* stat the exec file */
+- if (-1 == (stat(cgi_handler->ptr, &st))) {
+- log_error_write(srv, __FILE__, __LINE__, "sbss",
+- "stat for cgi-handler", cgi_handler,
+- "failed:", strerror(errno));
+- return -1;
++ if (cgi_handler->used > 1) {
++ /* stat the exec file */
++ if (-1 == (stat(cgi_handler->ptr, &st))) {
++ log_error_write(srv, __FILE__, __LINE__, "sbss",
++ "stat for cgi-handler", cgi_handler,
++ "failed:", strerror(errno));
++ return -1;
++ }
+ }
+
+ if (pipe(to_cgi_fds)) {