From owner-svn-ports-all@freebsd.org Sat Jul 2 08:54:57 2016 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 89A28B870B1; Sat, 2 Jul 2016 08:54:57 +0000 (UTC) (envelope-from danfe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4D72A27CC; Sat, 2 Jul 2016 08:54:57 +0000 (UTC) (envelope-from danfe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u628sudJ030177; Sat, 2 Jul 2016 08:54:56 GMT (envelope-from danfe@FreeBSD.org) Received: (from danfe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u628sufD030174; Sat, 2 Jul 2016 08:54:56 GMT (envelope-from danfe@FreeBSD.org) Message-Id: <201607020854.u628sufD030174@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: danfe set sender to danfe@FreeBSD.org using -f From: Alexey Dokuchaev Date: Sat, 2 Jul 2016 08:54:56 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r417914 - in head/www/thttpd: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Jul 2016 08:54:57 -0000 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.