summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin V. Arkhipov <voxus@gentoo.org>2005-05-13 12:38:44 +0000
committerKonstantin V. Arkhipov <voxus@gentoo.org>2005-05-13 12:38:44 +0000
commit1bba5b6c5f0612f190f729d071a3dd6fc5faaa5a (patch)
tree6f74aff7099c7594ed55bce6265aee5f34f0ab29 /www-servers/nginx
parentnew upstream version, fixes #91963. marked 0.82.0.00 stable on amd64, ppc and... (diff)
downloadgentoo-2-1bba5b6c5f0612f190f729d071a3dd6fc5faaa5a.tar.gz
gentoo-2-1bba5b6c5f0612f190f729d071a3dd6fc5faaa5a.tar.bz2
gentoo-2-1bba5b6c5f0612f190f729d071a3dd6fc5faaa5a.zip
invalid headers patch added
(Portage version: 2.0.51.21-r1)
Diffstat (limited to 'www-servers/nginx')
-rw-r--r--www-servers/nginx/ChangeLog8
-rw-r--r--www-servers/nginx/Manifest3
-rw-r--r--www-servers/nginx/files/digest-nginx-0.1.29-r11
-rw-r--r--www-servers/nginx/files/nginx-0.1.29-ignore_invalid_headers.patch121
-rw-r--r--www-servers/nginx/nginx-0.1.29-r1.ebuild84
5 files changed, 216 insertions, 1 deletions
diff --git a/www-servers/nginx/ChangeLog b/www-servers/nginx/ChangeLog
index e112f77469d5..2b85048c6a1f 100644
--- a/www-servers/nginx/ChangeLog
+++ b/www-servers/nginx/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for www-servers/nginx
# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/www-servers/nginx/ChangeLog,v 1.17 2005/05/13 10:41:07 voxus Exp $
+# $Header: /var/cvsroot/gentoo-x86/www-servers/nginx/ChangeLog,v 1.18 2005/05/13 12:38:44 voxus Exp $
+
+*nginx-0.1.29-r1 (13 May 2005)
+
+ 13 May 2005; Konstantin Arkhipov <voxus@gentoo.org> +nginx-0.1.29.ebuild,
+ +files/nginx-0.1.29-ignore_invalid_headers.patch:
+ Ability to control invalid headers ignoring. Patch from author.
*nginx-0.1.29 (13 May 2005)
diff --git a/www-servers/nginx/Manifest b/www-servers/nginx/Manifest
index 5fcd18957807..6494c883bc82 100644
--- a/www-servers/nginx/Manifest
+++ b/www-servers/nginx/Manifest
@@ -1,9 +1,12 @@
MD5 9c9fbd55ddd607578bae871c855446fb nginx-0.1.29.ebuild 1989
MD5 0b612ee125685634d4e80df6e302d442 nginx-0.1.28-r2.ebuild 2082
+MD5 a12836e06a7d326975109e399a484784 nginx-0.1.29-r1.ebuild 2088
MD5 139c82dd1e28289e37beb638b4a83140 ChangeLog 2985
MD5 822f3c821527e6a34f23a6a92a884766 metadata.xml 220
MD5 4e72c813c956580f61dea414fe1af8b3 files/digest-nginx-0.1.29 64
MD5 8c7b8c93f0c4048d83df9cdc31d86e1b files/nginx 922
MD5 964b96268e483e663e4ea13d03320185 files/digest-nginx-0.1.28-r2 64
+MD5 4e72c813c956580f61dea414fe1af8b3 files/digest-nginx-0.1.29-r1 64
MD5 148b61099c94cfc02add671522699a48 files/nginx-0.1.28-bad_backend_header.patch 656
MD5 b3342c18a1880b574cbe4458560019c6 files/nginx.conf 1445
+MD5 c7b08f10d672ae9fa9f09c4b7439b5be files/nginx-0.1.29-ignore_invalid_headers.patch 3579
diff --git a/www-servers/nginx/files/digest-nginx-0.1.29-r1 b/www-servers/nginx/files/digest-nginx-0.1.29-r1
new file mode 100644
index 000000000000..7d101a0eb227
--- /dev/null
+++ b/www-servers/nginx/files/digest-nginx-0.1.29-r1
@@ -0,0 +1 @@
+MD5 3cc24d511144d2a9e553e9a2296ef9e0 nginx-0.1.29.tar.gz 291855
diff --git a/www-servers/nginx/files/nginx-0.1.29-ignore_invalid_headers.patch b/www-servers/nginx/files/nginx-0.1.29-ignore_invalid_headers.patch
new file mode 100644
index 000000000000..fe559fd355ef
--- /dev/null
+++ b/www-servers/nginx/files/nginx-0.1.29-ignore_invalid_headers.patch
@@ -0,0 +1,121 @@
+--- src/http/ngx_http_core_module.c Sat Apr 30 13:48:14 2005
++++ src/http/ngx_http_core_module.c Fri May 13 13:26:28 2005
+@@ -144,6 +144,13 @@
+ offsetof(ngx_http_core_srv_conf_t, restrict_host_names),
+ &ngx_http_restrict_host_names },
+
++ { ngx_string("ignore_invalid_headers"),
++ NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_TAKE1,
++ ngx_conf_set_flag_slot,
++ NGX_HTTP_SRV_CONF_OFFSET,
++ offsetof(ngx_http_core_srv_conf_t, ignore_invalid_headers),
++ NULL },
++
+ { ngx_string("location"),
+ NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_BLOCK|NGX_CONF_TAKE12,
+ ngx_http_core_location,
+@@ -1578,6 +1588,7 @@
+ cscf->client_header_timeout = NGX_CONF_UNSET_MSEC;
+ cscf->client_header_buffer_size = NGX_CONF_UNSET_SIZE;
+ cscf->restrict_host_names = NGX_CONF_UNSET_UINT;
++ cscf->ignore_invalid_headers = NGX_CONF_UNSET;
+
+ return cscf;
+ }
+@@ -1662,6 +1673,9 @@
+
+ ngx_conf_merge_unsigned_value(conf->restrict_host_names,
+ prev->restrict_host_names, 0);
++
++ ngx_conf_merge_value(conf->ignore_invalid_headers,
++ prev->ignore_invalid_headers, 1);
+
+ return NGX_CONF_OK;
+ }
+--- src/http/ngx_http_core_module.h Fri Apr 22 23:02:01 2005
++++ src/http/ngx_http_core_module.h Fri May 13 13:22:57 2005
+@@ -87,6 +87,8 @@
+ ngx_msec_t client_header_timeout;
+
+ ngx_uint_t restrict_host_names;
++
++ ngx_flag_t ignore_invalid_headers;
+ } ngx_http_core_srv_conf_t;
+
+
+--- src/http/ngx_http_parse.c Mon May 2 23:49:06 2005
++++ src/http/ngx_http_parse.c Fri May 13 13:02:47 2005
+@@ -529,6 +529,8 @@
+
+ /* first char */
+ case sw_start:
++ r->invalid_header = 0;
++
+ switch (ch) {
+ case CR:
+ r->header_end = p;
+@@ -552,6 +554,8 @@
+ break;
+ }
+
++ r->invalid_header = 1;
++
+ break;
+
+ }
+@@ -605,6 +609,8 @@
+ state = sw_ignore_line;
+ break;
+ }
++
++ r->invalid_header = 1;
+
+ break;
+
+--- src/http/ngx_http_request.c Wed May 4 12:08:43 2005
++++ src/http/ngx_http_request.c Fri May 13 13:42:48 2005
+@@ -725,6 +725,7 @@
+ ngx_connection_t *c;
+ ngx_http_header_t *hh;
+ ngx_http_request_t *r;
++ ngx_http_core_srv_conf_t *cscf;
+ ngx_http_core_main_conf_t *cmcf;
+
+ c = rev->data;
+@@ -742,6 +743,7 @@
+ }
+
+ cmcf = ngx_http_get_module_main_conf(r, ngx_http_core_module);
++ cscf = ngx_http_get_module_srv_conf(r, ngx_http_core_module);
+ hh = (ngx_http_header_t *) cmcf->headers_in_hash.buckets;
+
+ rc = NGX_AGAIN;
+@@ -783,8 +785,7 @@
+
+ if (rc == NGX_OK) {
+
+-#if 0
+- if (r->invalid_header) {
++ if (r->invalid_header && cscf->ignore_invalid_headers) {
+
+ /* there was error while a header line parsing */
+
+@@ -796,7 +797,6 @@
+ &header);
+ continue;
+ }
+-#endif
+
+ /* a header line has been parsed successfully */
+
+--- src/http/ngx_http_request.h Mon May 2 23:41:21 2005
++++ src/http/ngx_http_request.h Fri May 13 12:16:38 2005
+@@ -336,6 +337,8 @@
+
+ /* URI with "\0" or "%00" */
+ unsigned zero_in_uri:1;
++
++ unsigned invalid_header:1;
+
+ unsigned valid_location:1;
+ unsigned valid_unparsed_uri:1;
diff --git a/www-servers/nginx/nginx-0.1.29-r1.ebuild b/www-servers/nginx/nginx-0.1.29-r1.ebuild
new file mode 100644
index 000000000000..4408699f7c6a
--- /dev/null
+++ b/www-servers/nginx/nginx-0.1.29-r1.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-servers/nginx/nginx-0.1.29-r1.ebuild,v 1.1 2005/05/13 12:38:44 voxus Exp $
+
+inherit eutils
+
+DESCRIPTION="Robust, small and high performance http and reverse proxy server"
+
+HOMEPAGE="http://sysoev.ru/nginx/"
+SRC_URI="http://sysoev.ru/nginx/${P}.tar.gz"
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug fastcgi threads ssl zlib"
+
+DEPEND="dev-lang/perl
+ ssl? ( dev-libs/openssl )
+ zlib? ( sys-libs/zlib )"
+
+src_unpack() {
+ unpack ${A}
+ cd ${S} && epatch ${FILESDIR}/${P}-ignore_invalid_headers.patch
+}
+
+src_compile() {
+ local myconf
+
+ if use threads; then
+ einfo
+ ewarn "threads support is experimental at the moment"
+ ewarn "do not use it on production systems - you've been warned"
+ einfo
+ myconf="${myconf} --with-threads"
+ fi
+
+ use fastcgi || myconf="${myconf} --without-http_fastcgi_module"
+ use zlib || myconf="${myconf} --without-http_gzip_module"
+ use debug && myconf="${myconf} --with-debug"
+ use ssl && myconf="${myconf} --with-http_ssl_module"
+
+ cd ${S} && ./configure \
+ --prefix=/usr \
+ --conf-path=/etc/${PN}/${PN}.conf \
+ --http-log-path=/var/log/${PN}/access_log \
+ --error-log-path=/var/log/${PN}/error_log \
+ --pid-path=/var/run/${PN}.pid \
+ --http-client-body-temp-path=/var/tmp/${PN}/client \
+ --http-proxy-temp-path=/var/tmp/${PN}/proxy \
+ --http-fastcgi-temp-path=/var/tmp/${PN}/fastcgi \
+ --with-md5-asm \
+ ${myconf} || die "configure failed"
+
+ emake || "failed to compile"
+}
+
+src_install() {
+ cd ${S} || die
+
+ dodir /var/log/${PN}
+ keepdir /var/log/${PN}
+
+ dodir /var/tmp/${PN}
+
+ dodir /var/tmp/${PN}/client
+ keepdir /var/tmp/${PN}/client
+
+ dodir /var/tmp/${PN}/proxy
+ keepdir /var/tmp/${PN}/proxy
+
+ dodir /var/tmp/${PN}/fastcgi
+ keepdir /var/tmp/${PN}/fastcgi
+
+ dodir /etc/${PN}
+
+ dosbin objs/nginx
+ doinitd ${FILESDIR}/nginx
+
+ insinto /etc/${PN}
+ rm conf/nginx.conf
+ doins -r conf/*
+ doins ${FILESDIR}/nginx.conf
+
+ dodoc CHANGES{,.ru} LICENSE README
+}