From: Grigory Batalov <bga@altlinux.org>
To: sisyphus@lists.altlinux.org
Subject: Re: [sisyphus] Daedalus: squid-2.6.STABLE6-alt1
Date: Thu, 21 Dec 2006 20:34:16 +0300
Message-ID: <20061221203416.4d2c0f9b.bga@altlinux.org> (raw)
In-Reply-To: <1166684153l.10887l.3l@ildar.nexttel.kz>
[-- Attachment #1: Type: text/plain, Size: 763 bytes --]
On Thu, 21 Dec 2006 12:55:53 +0600
Ildar Mulyukov <ildar@altlinux.ru> wrote:
> > > В Daedalus выложены обновлённые пакеты:
> > > squid
> >
> > Через некоторое время этот squid отправится в Сизиф, так что кому
> > интересно, прошу тестировать. Изменений много =).
>
> Можете посмотреть на
> https://bugzilla.altlinux.org/show_bug.cgi?id=8551
Посмотрел. В рассылке squid решили, что патч годный, но будет
приложен в squid-3, поскольку squid-2.x считается "стабильным".
Как заметил Денис Овсиенко, директива max_body_size практически
эквивалентна request_body_max_size, разве что распространяется
на ACL. Я тоже не вижу большого смысла в этом патче, но если
хотите, можете приложить его самостоятельно =).
--
Grigory Batalov,
ALT Linux Team
[-- Attachment #2: squid-2.6.STABLE6-acl_max_body_size.patch --]
[-- Type: text/plain, Size: 2615 bytes --]
diff --git a/squid/src/acl.c b/squid/src/acl.c
index ae71564..b284cc1 100644
--- a/squid/src/acl.c
+++ b/squid/src/acl.c
@@ -192,6 +192,8 @@ aclStrToType(const char *s)
return ACL_MAX_USER_IP;
if (!strcmp(s, "external"))
return ACL_EXTERNAL;
+ if (!strcmp(s, "max_body_size"))
+ return ACL_MAX_BODY_SIZE;
if (!strcmp(s, "urllogin"))
return ACL_URLLOGIN;
#if USE_SSL
@@ -286,6 +288,8 @@ aclTypeToStr(squid_acl type)
return "max_user_ip";
if (type == ACL_EXTERNAL)
return "external";
+ if (type == ACL_MAX_BODY_SIZE)
+ return "max_body_size";
if (type == ACL_URLLOGIN)
return "urllogin";
#if USE_SSL
@@ -1020,6 +1024,7 @@ aclParseAclLine(acl ** head)
case ACL_SRC_ASN:
case ACL_MAXCONN:
case ACL_DST_ASN:
+ case ACL_MAX_BODY_SIZE:
aclParseIntlist(&A->data);
break;
case ACL_MAX_USER_IP:
@@ -1896,6 +1901,8 @@ aclMatchAcl(acl * ae, aclCheck_t * check
k = clientdbEstablished(checklist->src_addr, 0);
return ((k > ((intlist *) ae->data)->i) ? 1 : 0);
/* NOTREACHED */
+ case ACL_MAX_BODY_SIZE:
+ return ((r->content_length > ((intlist *) ae->data)->i) ? 1 : 0);
case ACL_URL_PORT:
return aclMatchIntegerRange(ae->data, (int) r->port);
/* NOTREACHED */
@@ -2538,6 +2545,9 @@ aclDestroyAcls(acl ** head)
case ACL_MAXCONN:
intlistDestroy((intlist **) (void *) &a->data);
break;
+ case ACL_MAX_BODY_SIZE:
+ intlistDestroy((intlist **) & a->data);
+ break;
case ACL_MAX_USER_IP:
aclDestroyUserMaxIP(&a->data);
break;
@@ -2971,6 +2981,7 @@ aclDumpGeneric(const acl * a)
case ACL_SRC_ASN:
case ACL_MAXCONN:
case ACL_DST_ASN:
+ case ACL_MAX_BODY_SIZE:
return aclDumpIntlistList(a->data);
case ACL_MAX_USER_IP:
return aclDumpUserMaxIP(a->data);
diff --git a/squid/src/cf.data.pre b/squid/src/cf.data.pre
index d6aed37..f48757a 100644
--- a/squid/src/cf.data.pre
+++ b/squid/src/cf.data.pre
@@ -2769,6 +2769,10 @@ DOC_START
# effect in rules that affect the reply data stream such as
# http_reply_access.
+ acl aclname max_body_size <bytes>
+ # This will be matched when the client's HTTP Request Body is
+ # greater than <bytes>.
+
acl aclname rep_header header-name [-i] any\.regex\.here
# regex match against any of the known response headers.
# Example:
diff --git a/squid/src/enums.h b/squid/src/enums.h
index c32d2e1..5cb01aa 100644
--- a/squid/src/enums.h
+++ b/squid/src/enums.h
@@ -141,6 +141,7 @@ typedef enum {
ACL_MAX_USER_IP,
ACL_EXTERNAL,
ACL_URLLOGIN,
+ ACL_MAX_BODY_SIZE,
#if USE_SSL
ACL_USER_CERT,
ACL_CA_CERT,
next prev parent reply other threads:[~2006-12-21 17:34 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-20 10:57 ` Grigory Batalov
2006-12-20 13:11 ` Konstantin A. Lepikhov
2006-12-20 13:31 ` Grigory Batalov
2006-12-20 13:42 ` Konstantin A. Lepikhov
2006-12-20 14:56 ` Grigory Batalov
2006-12-21 6:55 ` Ildar Mulyukov
2006-12-21 17:34 ` Grigory Batalov [this message]
2006-12-22 7:58 ` Ildar Mulyukov
2006-12-22 11:14 ` Grigory Batalov
2006-12-22 13:28 ` Ildar Mulyukov
2006-12-22 21:11 ` Grigory Batalov
2006-12-23 6:14 ` Ildar Mulyukov
2006-12-23 8:32 ` Grigory Batalov
2006-12-25 7:43 ` Ildar Mulyukov
2006-12-25 16:21 ` Grigory Batalov
2006-12-26 4:29 ` Ildar Mulyukov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20061221203416.4d2c0f9b.bga@altlinux.org \
--to=bga@altlinux.org \
--cc=sisyphus@lists.altlinux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux Sisyphus discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/sisyphus/0 sisyphus/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 sisyphus sisyphus/ http://lore.altlinux.org/sisyphus \
sisyphus@altlinux.ru sisyphus@altlinux.org sisyphus@lists.altlinux.org sisyphus@lists.altlinux.ru sisyphus@lists.altlinux.com sisyphus@linuxteam.iplabs.ru sisyphus@list.linux-os.ru
public-inbox-index sisyphus
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.sisyphus
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git