Date: Sat, 2 Jul 2016 08:54:56 +0000 (UTC) From: Alexey Dokuchaev <danfe@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r417914 - in head/www/thttpd: . files Message-ID: <201607020854.u628sufD030174@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: danfe Date: Sat Jul 2 08:54:56 2016 New Revision: 417914 URL: https://svnweb.freebsd.org/changeset/ports/417914 Log: Add two more configuration options (defaults were not changed): - LOG_UNKNOWN: whether to log unknown request headers. Most sites will not want to log them, which will save them a bit of CPU time; - FLUSH_LOG: whether to fflush() the log file after each request. If this is turned off there's a slight savings in CPU cycles. Added: head/www/thttpd/files/extra-patch-log_unknown_headers (contents, props changed) Modified: head/www/thttpd/Makefile Modified: head/www/thttpd/Makefile ============================================================================== --- head/www/thttpd/Makefile Sat Jul 2 07:57:38 2016 (r417913) +++ head/www/thttpd/Makefile Sat Jul 2 08:54:56 2016 (r417914) @@ -19,18 +19,21 @@ SUB_FILES= pkg-message thttpd.conf.sampl SUB_LIST= WWWOWN=${WWWOWN} WWWGRP=${WWWGRP} CPE_VENDOR= acme -OPTIONS_DEFINE= SENDFILE IPREAL INDEXES HTACCESS STATS -OPTIONS_DEFAULT= SENDFILE IPREAL STATS +OPTIONS_DEFINE= SENDFILE IPREAL INDEXES HTACCESS STATS LOG_UNKNOWN FLUSH_LOG +OPTIONS_DEFAULT= SENDFILE IPREAL STATS FLUSH_LOG SENDFILE_DESC= Use sendfile(2) to serve files IPREAL_DESC= Respect (pass on) "X-Forwarded-For" header INDEXES_DESC= Generate index pages for directories HTACCESS_DESC= IP-based authorization (.htaccess) support STATS_DESC= Collect internal stats and print to system log +LOG_UNKNOWN_DESC= Log unknown request headers +FLUSH_LOG_DESC= fflush() the log file after each request SENDFILE_EXTRA_PATCHES= ${FILESDIR}/extra-patch-config.h IPREAL_EXTRA_PATCHES= ${FILESDIR}/extra-patch-ip_real HTACCESS_EXTRA_PATCHES= ${FILESDIR}/extra-patch-htaccess +LOG_UNKNOWN_EXTRA_PATCHES= ${FILESDIR}/extra-patch-log_unknown_headers post-patch: # To avoid conflict with other ports that also install htpasswd(1) @@ -48,6 +51,10 @@ post-patch-STATS-off: @${REINPLACE_CMD} -e '/STATS_TIME/s|.*|/* & */|' \ ${WRKSRC}/config.h +post-patch-FLUSH_LOG-off: + @${REINPLACE_CMD} -e '/FLUSH_LOG_EVERY_TIME/s|.*|/* & */|' \ + ${WRKSRC}/config.h + post-install: ${INSTALL_DATA} ${WRKDIR}/thttpd.conf.sample ${STAGEDIR}${PREFIX}/etc ${PRINTF} "/var/log/thttpd.log\t ${WWWOWN}:${WWWGRP}\t640 7 * @T00\ Added: head/www/thttpd/files/extra-patch-log_unknown_headers ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/thttpd/files/extra-patch-log_unknown_headers Sat Jul 2 08:54:56 2016 (r417914) @@ -0,0 +1,12 @@ +--- config.h.orig 2011-09-11 16:41:37 UTC ++++ config.h +@@ -341,9 +342,7 @@ + /* CONFIGURE: Whether to log unknown request headers. Most sites will not + ** want to log them, which will save them a bit of CPU time. + */ +-#ifdef notdef + #define LOG_UNKNOWN_HEADERS +-#endif + + /* CONFIGURE: Whether to fflush() the log file after each request. If + ** this is turned off there's a slight savings in CPU cycles.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201607020854.u628sufD030174>