diff options
Diffstat (limited to 'www/lighttpd')
-rw-r--r-- | www/lighttpd/Makefile | 6 | ||||
-rw-r--r-- | www/lighttpd/files/extra-patch-nodelay | 15 |
2 files changed, 21 insertions, 0 deletions
diff --git a/www/lighttpd/Makefile b/www/lighttpd/Makefile index 324c101faf8a..00fe256e8853 100644 --- a/www/lighttpd/Makefile +++ b/www/lighttpd/Makefile @@ -7,6 +7,7 @@ PORTNAME= lighttpd PORTVERSION= 1.4.26 +PORTREVISION= 1 CATEGORIES= www MASTER_SITES= http://download.lighttpd.net/lighttpd/releases-1.4.x/ @@ -35,6 +36,7 @@ OPTIONS= BZIP2 "Enable Bzip2 support" off \ MAGNET "Enable magnet support" off \ MEMCACHE "Enable memory caching support" off \ MYSQL "Enable MYSQL support" off \ + NODELAY "Set TCP_NODELAY on listening sockets" off \ OPENLDAP "Enable LDAP support" off \ OPENSSL "Enable SSL support" on \ SPAWNFCGI "Enable spawn-fcgi utility" on \ @@ -95,6 +97,10 @@ CONFIGURE_ARGS+= --with-mysql _REQUIRE+= mysql .endif +.if defined(WITH_NODELAY) +EXTRA_PATCHES+= ${FILESDIR}/extra-patch-nodelay +.endif + .if defined(WITH_OPENLDAP) USE_OPENLDAP= yes CONFIGURE_ARGS+= --with-ldap diff --git a/www/lighttpd/files/extra-patch-nodelay b/www/lighttpd/files/extra-patch-nodelay new file mode 100644 index 000000000000..72fe94b97863 --- /dev/null +++ b/www/lighttpd/files/extra-patch-nodelay @@ -0,0 +1,15 @@ +--- src/network.c.orig Tue Jan 26 14:33:01 2010 ++++ src/network.c Tue Jan 26 14:37:39 2010 +@@ -226,6 +226,12 @@ + log_error_write(srv, __FILE__, __LINE__, "ss", "socketsockopt failed:", strerror(errno)); + goto error_free_socket; + } ++ if(srv_socket->addr.plain.sa_family == AF_INET || srv_socket->addr.plain.sa_family == AF_INET6 ) { ++ if (setsockopt(srv_socket->fd, IPPROTO_TCP, TCP_NODELAY, &val, sizeof(val)) < 0) { ++ log_error_write(srv, __FILE__, __LINE__, "ss", "socketsockopt failed:", strerror(errno)); ++ goto error_free_socket; ++ } ++ } + + switch(srv_socket->addr.plain.sa_family) { + #ifdef HAVE_IPV6 |