Hello community,
here is the log from the commit of package squid3
checked in at Mon Apr 21 02:38:33 CEST 2008.
--------
--- squid3/squid3.changes 2008-04-07 18:46:57.000000000 +0200
+++ squid3/squid3.changes 2008-04-17 12:07:33.872706000 +0200
@@ -1,0 +2,17 @@
+Thu Apr 17 12:07:17 CEST 2008 - kssingvo@suse.de
+
+- added official patches:
+ * increase MAX_URL to 8192
+ * Honor 0x and 0 prefixes as numeric base indication when parsing
+ squid.conf integer options.
+ * Correct and simplify parsing of list headers
+ * Fix processing of large reply headers
+ * Removed execute bit from various non-executable source files
+ * assertion failed: HttpHdrContRange.cc:100: "spec->length >= 0"
+ * Fallback on transparent interception mode even if the connection
+ didn't seem to be transparently intercepted
+ * fix pt 2: DIRECT/<ip> mixed with DIRECT/
+ * Fallout from build-testing the new backports.
+- fixed a compiler warning, which got treated as an error
+
+-------------------------------------------------------------------
New:
----
b8733.patch
b8734.patch
b8735.patch
b8736.patch
b8737.patch
b8738.patch
b8739.patch
b8741.patch
b8742.patch
squid3-3.0.STABLE4-gcc_warn_fix.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ squid3.spec ++++++
--- /var/tmp/diff_new_pack.D23793/_old 2008-04-21 02:37:35.000000000 +0200
+++ /var/tmp/diff_new_pack.D23793/_new 2008-04-21 02:37:35.000000000 +0200
@@ -15,7 +15,7 @@
BuildRequires: openldap2-devel opensp-devel pam-devel sharutils
Summary: Squid Version 3 WWW Proxy Server
Version: 3.0.STABLE4
-Release: 1
+Release: 3
License: GPL v2 or later
Url: http://www.squid-cache.org/Versions/v3
Group: Productivity/Networking/Web/Proxy
@@ -43,15 +43,15 @@
# please read every file if there is interest about what the patch changes
# or just visit: http://www.squid-cache.org/Versions/v3/3.0/changesets/
#
-# Patch01: http://www.squid-cache.org/Versions/v3/3.0/changesets/
-# Patch02: http://www.squid-cache.org/Versions/v3/3.0/changesets/
-# Patch03: http://www.squid-cache.org/Versions/v3/3.0/changesets/
-# Patch04: http://www.squid-cache.org/Versions/v3/3.0/changesets/
-# Patch05: http://www.squid-cache.org/Versions/v3/3.0/changesets/
-# Patch06: http://www.squid-cache.org/Versions/v3/3.0/changesets/
-# Patch07: http://www.squid-cache.org/Versions/v3/3.0/changesets/
-# Patch08: http://www.squid-cache.org/Versions/v3/3.0/changesets/
-# Patch09: http://www.squid-cache.org/Versions/v3/3.0/changesets/
+Patch01: http://www.squid-cache.org/Versions/v3/3.0/changesets/b8733.patch
+Patch02: http://www.squid-cache.org/Versions/v3/3.0/changesets/b8734.patch
+Patch03: http://www.squid-cache.org/Versions/v3/3.0/changesets/b8735.patch
+Patch04: http://www.squid-cache.org/Versions/v3/3.0/changesets/b8736.patch
+Patch05: http://www.squid-cache.org/Versions/v3/3.0/changesets/b8737.patch
+Patch06: http://www.squid-cache.org/Versions/v3/3.0/changesets/b8738.patch
+Patch07: http://www.squid-cache.org/Versions/v3/3.0/changesets/b8739.patch
+Patch08: http://www.squid-cache.org/Versions/v3/3.0/changesets/b8741.patch
+Patch09: http://www.squid-cache.org/Versions/v3/3.0/changesets/b8742.patch
# Patch10: http://www.squid-cache.org/Versions/v3/3.0/changesets/
# Patch11: http://www.squid-cache.org/Versions/v3/3.0/changesets/
# Patch12: http://www.squid-cache.org/Versions/v3/3.0/changesets/
@@ -120,6 +120,7 @@
Patch103: squid-beta-3.0.pre4-gcc41_wur.patch
Patch104: squid-beta-3.0-openldap.patch
Patch105: squid-beta-3.0-mem_node_64bit.patch
+Patch106: squid3-3.0.STABLE4-gcc_warn_fix.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%define squidlibdir %{_libdir}/squid
%define squidconfdir /etc/squid
@@ -152,15 +153,15 @@
%prep
%setup -n squid-%{version}
%patch -p1
-# %patch1 -p1
-# %patch2 -p1
-# %patch3 -p1
-# %patch4 -p1
-# %patch5 -p1
-# %patch6 -p1
-# %patch7 -p1
-# %patch8 -p1
-# %patch9 -p1
+%patch1 -p0
+%patch2 -p0
+%patch3 -p0
+%patch4 -p0
+# %patch5 -p0
+%patch6 -p0
+%patch7 -p0
+%patch8 -p0
+%patch9 -p0
# %patch10 -p1
# %patch11 -p1
# %patch12 -p1
@@ -259,6 +260,7 @@
%patch103 -p1
%patch104 -p1
%patch105 -p1
+%patch106 -p1
%build
export CFLAGS="$RPM_OPT_FLAGS -fPIE -fPIC -fno-strict-aliasing"
@@ -462,6 +464,20 @@
#%doc squid_ldapauth.conf
%changelog
+* Thu Apr 17 2008 kssingvo@suse.de
+- added official patches:
+ * increase MAX_URL to 8192
+ * Honor 0x and 0 prefixes as numeric base indication when parsing
+ squid.conf integer options.
+ * Correct and simplify parsing of list headers
+ * Fix processing of large reply headers
+ * Removed execute bit from various non-executable source files
+ * assertion failed: HttpHdrContRange.cc:100: "spec->length >= 0"
+ * Fallback on transparent interception mode even if the connection
+ didn't seem to be transparently intercepted
+ * fix pt 2: DIRECT/<ip> mixed with DIRECT/
+ * Fallout from build-testing the new backports.
+- fixed a compiler warning, which got treated as an error
* Mon Apr 07 2008 kssingvo@suse.de
- fix for unpackaged non-man pages (SLE9, SLE10 build failures)
* Mon Apr 07 2008 kssingvo@suse.de
++++++ b8733.patch ++++++
------------------------------------------------------------
revno: 8733
revision-id:amosjeffries@squid-cache.org-20080405024851-6h7tm02c8oza42gx
parent: amosjeffries@squid-cache.org-20080401115141-fwa3qz16aljgugfv
committer: Amos Jeffries
branch nick: SQUID_3_0
timestamp: Fri 2008-04-04 20:48:51 -0600
message:
Bug #2267 - increase MAX_URL to 8192
------------------------------------------------------------
# Bazaar merge directive format 2 (Bazaar 0.90)
# revision_id: amosjeffries@squid-cache.org-20080405024851-\
# 6h7tm02c8oza42gx
# target_branch: http://www.squid-cache.org/bzr/squid3/trunk/
# testament_sha1: 3391084c6e24591ef6bb94644f6c8804686256c8
# timestamp: 2008-04-05 02:50:52 +0000
# source_branch: http://www.squid-cache.org/bzr/squid3/branches\
# /SQUID_3_0
# base_revision_id: amosjeffries@squid-cache.org-20080401115141-\
# fwa3qz16aljgugfv
#
# Begin patch
=== modified file 'src/defines.h'
--- src/defines.h 2007-08-13 23:20:50 +0000
+++ src/defines.h 2008-04-05 02:48:51 +0000
@@ -153,7 +153,7 @@
#define MAX_FILES_PER_DIR (1<<20)
-#define MAX_URL 4096
+#define MAX_URL 8192
#define MAX_LOGIN_SZ 128
#define PEER_MAX_ADDRESSES 10
++++++ b8734.patch ++++++
------------------------------------------------------------
revno: 8734
revision-id:amosjeffries@squid-cache.org-20080405025311-tont21hc1uprgkll
parent: amosjeffries@squid-cache.org-20080405024851-6h7tm02c8oza42gx
committer: Amos Jeffries
branch nick: SQUID_3_0
timestamp: Fri 2008-04-04 20:53:11 -0600
message:
Honor 0x and 0 prefixes as numeric base indication when parsing squid.conf integer options.
Author: Alex Rousskov
Squid3 parses squid.conf file integers as decimal numbers while Squid2 honors
0 and 0x prefixes (indicating octal and hex numbers). The later functionality
is needed for things like unmask that are traditionally specified using octal
format.
This patch changes Squid3 behavior to match that of Squid2.
Internally, Squid3 uses sscanf and Squid2 uses strtol.
TODO: Squid3::GetInteger should probably use xatol,
and xatol should be fixed to proper verify the result of strtol.
------------------------------------------------------------
# Bazaar merge directive format 2 (Bazaar 0.90)
# revision_id: amosjeffries@squid-cache.org-20080405025311-\
# tont21hc1uprgkll
# target_branch: http://www.squid-cache.org/bzr/squid3/trunk/
# testament_sha1: d8fcfa7745353d840d5f804692c8e508a70f6054
# timestamp: 2008-04-05 03:02:44 +0000
# source_branch: http://www.squid-cache.org/bzr/squid3/branches\
# /SQUID_3_0
# base_revision_id: amosjeffries@squid-cache.org-20080405024851-\
# 6h7tm02c8oza42gx
#
# Begin patch
=== modified file 'src/Parsing.cc'
--- src/Parsing.cc 2007-08-13 23:20:50 +0000
+++ src/Parsing.cc 2008-04-05 02:53:11 +0000
@@ -89,7 +89,8 @@
if (token == NULL)
self_destruct();
- if (sscanf(token, "%d", &i) != 1)
+ // %i honors 0 and 0x prefixes, which are important for things like umask
+ if (sscanf(token, "%i", &i) != 1)
self_destruct();
return i;
++++++ b8735.patch ++++++
------------------------------------------------------------
revno: 8735
revision-id:amosjeffries@squid-cache.org-20080405025842-kfyafifqcq0retgb
parent: amosjeffries@squid-cache.org-20080405025311-tont21hc1uprgkll
committer: Amos Jeffries
branch nick: SQUID_3_0
timestamp: Fri 2008-04-04 20:58:42 -0600
message:
Correct and simplify parsing of list headers
Author: Henrik Nordstrom
------------------------------------------------------------
# Bazaar merge directive format 2 (Bazaar 0.90)
# revision_id: amosjeffries@squid-cache.org-20080405025842-\
# kfyafifqcq0retgb
# target_branch: http://www.squid-cache.org/bzr/squid3/trunk/
# testament_sha1: a9a99b006d58fbe3a2ddaae971dca0c2e2d77e39
# timestamp: 2008-04-05 03:50:33 +0000
# source_branch: http://www.squid-cache.org/bzr/squid3/branches\
# /SQUID_3_0
# base_revision_id: amosjeffries@squid-cache.org-20080405025311-\
# tont21hc1uprgkll
#
# Begin patch
=== modified file 'src/HttpHeaderTools.cc'
--- src/HttpHeaderTools.cc 2008-03-29 06:14:27 +0000
+++ src/HttpHeaderTools.cc 2008-04-05 02:58:42 +0000
@@ -246,31 +246,26 @@
strListGetItem(const String * str, char del, const char **item, int *ilen, const char **pos)
{
size_t len;
- static char delim[2][3] = {
- { '"', '?', 0},
- { '"', '\\', 0}};
+ static char delim[3][8] = {
+ "\"?,",
+ "\"\\",
+ " ?,\t\r\n"
+ };
int quoted = 0;
assert(str && item && pos);
delim[0][1] = del;
+ delim[2][1] = del;
- if (*pos) {
- if (!**pos) /* end of string */
- return 0;
- else
- (*pos)++;
- } else {
+ if (!*pos) {
*pos = str->buf();
if (!*pos)
return 0;
}
- /* skip leading ws (ltrim) */
- *pos += xcountws(*pos);
-
- /* skip leading delimiters */
- *pos += strspn(*pos, delim[0]);
+ /* skip leading ws and delimiters */
+ *pos += strspn(*pos, delim[2]);
*item = *pos; /* remember item's start */
++++++ b8736.patch ++++++
------------------------------------------------------------
revno: 8736
revision-id: amosjeffries@squid-cache.org-20080409125203-mkfp49ffxez4vl8a
parent: amosjeffries@squid-cache.org-20080405025842-kfyafifqcq0retgb
parent: henrik@henriknordstrom.net-20080407231553-djj9wfqy63noyuy4
committer: Amos Jeffries
branch nick: SQUID_3_0
timestamp: Wed 2008-04-09 06:52:03 -0600
message:
Fix processing of large reply headers
Author: Henrik Nordstrom
------------------------------------------------------------
revno: 8725.2.6
revision-id: henrik@henriknordstrom.net-20080407231553-djj9wfqy63noyuy4
parent: henrik@henriknordstrom.net-20080406003849-00au6rconzwzcbdv
committer: Henrik Nordstrom
branch nick: largeresp-3.0
timestamp: Tue 2008-04-08 01:15:53 +0200
message:
Merge reply_header_max_size fix from trunk, quite related.
------------------------------------------------------------
revno: 8725.2.5
revision-id: henrik@henriknordstrom.net-20080406003849-00au6rconzwzcbdv
parent: henrik@henriknordstrom.net-20080406003511-xby5oe3ug65b1ibl
parent: amosjeffries@squid-cache.org-20080405025842-kfyafifqcq0retgb
committer: Henrik Nordstrom
branch nick: largeresp-3.0
timestamp: Sun 2008-04-06 02:38:49 +0200
message:
Merged changes from SQUID_3_0
------------------------------------------------------------
revno: 8725.2.4
revision-id: henrik@henriknordstrom.net-20080406003511-xby5oe3ug65b1ibl
parent: henrik@henriknordstrom.net-20080330163800-m06h0iqek6nq8fyb
committer: Henrik Nordstrom
branch nick: largeresp-3.0
timestamp: Sun 2008-04-06 02:35:11 +0200
message:
Import MemBuf::size(size) method from HEAD
------------------------------------------------------------
revno: 8725.2.3
revision-id: henrik@henriknordstrom.net-20080330163800-m06h0iqek6nq8fyb
parent: henrik@henriknordstrom.net-20080330152846-dyk9dt2oms7kw0fi
committer: Henrik Nordstrom
branch nick: largeresp-3.0
timestamp: Sun 2008-03-30 18:38:00 +0200
message:
Bug #2001: Read full response headers when >4KB
cherrypicked from trunk to complete support for large responses.
------------------------------------------------------------
revno: 8725.2.2
revision-id: henrik@henriknordstrom.net-20080330152846-dyk9dt2oms7kw0fi
parent: henrik@henriknordstrom.net-20080330142957-k2fdnduxphl8zmwf
parent: amosjeffries@squid-cache.org-20080329065653-nxa2s3jig4ce6nwb
committer: Henrik Nordstrom
branch nick: largeresp-3.0
timestamp: Sun 2008-03-30 17:28:46 +0200
message:
Merged from SQUID_3_0
------------------------------------------------------------
revno: 8725.2.1
revision-id: henrik@henriknordstrom.net-20080330142957-k2fdnduxphl8zmwf
parent: henrik@henriknordstrom.net-20080320130128-odoxg03luel3kwsq
committer: Henrik Nordstrom
branch nick: largeresp-3.0
timestamp: Sun 2008-03-30 16:29:57 +0200
message:
Merged largeresp
------------------------------------------------------------
# Bazaar merge directive format 2 (Bazaar 0.90)
# revision_id: amosjeffries@squid-cache.org-20080409125203-\
# mkfp49ffxez4vl8a
# target_branch: http://www.squid-cache.org/bzr/squid3/branches\
# /SQUID_3_0/
# testament_sha1: 1a2cc7775b1832871b2811fb8298360f92da610f
# timestamp: 2008-04-09 13:00:46 +0000
# source_branch: http://www.squid-cache.org/bzr/squid3/branches\
# /SQUID_3_0
# base_revision_id: amosjeffries@squid-cache.org-20080405025842-\
# kfyafifqcq0retgb
#
# Begin patch
=== modified file 'src/HttpMsg.cc'
--- src/HttpMsg.cc 2007-08-13 23:20:50 +0000
+++ src/HttpMsg.cc 2008-04-07 23:15:53 +0000
@@ -1,6 +1,6 @@
/*
- * $Id: HttpMsg.cc,v 1.43 2007/08/13 17:20:51 hno Exp $
+ * $Id: HttpMsg.cc,v 1.44 2007/12/21 23:50:24 hno Exp $
*
* DEBUG: section 74 HTTP Message
* AUTHOR: Alex Rousskov
@@ -153,6 +153,14 @@
// TODO: Remove? httpReplyParseStep() should do similar checks
const size_t hdr_len = headersEnd(buf->content(), buf->contentSize());
+ // TODO: move to httpReplyParseStep()
+ if (hdr_len > Config.maxReplyHeaderSize || hdr_len <= 0 && (size_t)buf->contentSize() > Config.maxReplyHeaderSize) {
+ debugs(58, 1, "HttpMsg::parse: Too large reply header (" <<
+ hdr_len << " > " << Config.maxReplyHeaderSize);
+ *error = HTTP_HEADER_TOO_LARGE;
+ return false;
+ }
+
if (hdr_len <= 0) {
debugs(58, 3, "HttpMsg::parse: failed to find end of headers " <<
"(eof: " << eof << ") in '" << buf->content() << "'");
@@ -163,14 +171,6 @@
return false;
}
- // TODO: move to httpReplyParseStep()
- if (hdr_len > Config.maxReplyHeaderSize) {
- debugs(58, 1, "HttpMsg::parse: Too large reply header (" <<
- hdr_len << " > " << Config.maxReplyHeaderSize);
- *error = HTTP_HEADER_TOO_LARGE;
- return false;
- }
-
if (!sanityCheckStartLine(buf, error)) {
debugs(58,1, HERE << "first line of HTTP message is invalid");
*error = HTTP_INVALID_HEADER;
=== modified file 'src/HttpReply.cc'
--- src/HttpReply.cc 2007-11-26 20:09:54 +0000
+++ src/HttpReply.cc 2008-03-30 14:29:57 +0000
@@ -496,3 +496,17 @@
return expectBody;
}
+
+HttpReply *
+HttpReply::clone() const
+{
+ HttpReply *rep = new HttpReply();
+ rep->header.append(&header);
+ rep->hdrCacheInit();
+ rep->hdr_sz = hdr_sz;
+ rep->http_ver = http_ver;
+ rep->pstate = pstate;
+ rep->protocol = protocol;
+ rep->sline = sline;
+ return rep;
+}
=== modified file 'src/HttpReply.h'
--- src/HttpReply.h 2007-08-13 23:20:50 +0000
+++ src/HttpReply.h 2008-03-30 14:29:57 +0000
@@ -122,6 +122,11 @@
void packHeadersInto(Packer * p) const;
+ /// Clone this reply.
+ /// Could be done as a copy-contructor but we do not want to
+ /// accidently copy a HttpReply..
+ HttpReply *clone() const;
+
private:
/* initialize */
void init();
=== modified file 'src/MemBuf.h'
--- src/MemBuf.h 2006-08-21 06:50:40 +0000
+++ src/MemBuf.h 2008-04-06 00:35:11 +0000
@@ -1,7 +1,7 @@
/*
- * $Id: MemBuf.h,v 1.8 2006/08/21 00:50:41 robertc Exp $
+ * $Id: MemBuf.h,v 1.9 2007/12/21 23:48:04 hno Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
@@ -60,6 +60,7 @@
// these space-related methods assume no growth and allow 0-termination
char *space() { return buf + size; } // space to add data
+ char *space(mb_size_t required) { if (size + required > capacity) grow(size + required); return buf + size; } // space to add data
mb_size_t spaceSize() const;
bool hasSpace() const { return size+1 < capacity; }
=== modified file 'src/client_side_reply.cc'
--- src/client_side_reply.cc 2008-03-14 04:45:16 +0000
+++ src/client_side_reply.cc 2008-03-30 14:29:57 +0000
@@ -352,68 +352,47 @@
sendClientOldEntry();
}
- // we have a partial reply from the origin
- else if (STORE_PENDING == http->storeEntry()->store_status && 0 == status) {
- // header is too large, send old entry
-
- if (reqsize >= HTTP_REQBUF_SZ) {
- debugs(88, 3, "handleIMSReply: response from origin is too large '" << http->storeEntry()->url() << "', sending old entry to client" );
- http->logType = LOG_TCP_REFRESH_FAIL;
- sendClientOldEntry();
- }
-
- // everything looks fine, we're just waiting for more data
- else {
- debugs(88, 3, "handleIMSReply: incomplete headers for '" << http->storeEntry()->url() << "', waiting for more data" );
- reqofs = reqsize;
- waitForMoreData();
- }
- }
-
- // we have a reply from the origin
+ HttpReply *old_rep = (HttpReply *) old_entry->getReply();
+
+ // origin replied 304
+
+ if (status == HTTP_NOT_MODIFIED) {
+ http->logType = LOG_TCP_REFRESH_UNMODIFIED;
+
+ // update headers on existing entry
+ HttpReply *old_rep = (HttpReply *) old_entry->getReply();
+ old_rep->updateOnNotModified(http->storeEntry()->getReply());
+ old_entry->timestampsSet();
+
+ // if client sent IMS
+
+ if (http->request->flags.ims) {
+ // forward the 304 from origin
+ debugs(88, 3, "handleIMSReply: origin replied 304, revalidating existing entry and forwarding 304 to client");
+ sendClientUpstreamResponse();
+ } else {
+ // send existing entry, it's still valid
+ debugs(88, 3, "handleIMSReply: origin replied 304, revalidating existing entry and sending " <<
+ old_rep->sline.status << " to client");
+ sendClientOldEntry();
+ }
+ }
+
+ // origin replied with a non-error code
+ else if (status > HTTP_STATUS_NONE && status < HTTP_INTERNAL_SERVER_ERROR) {
+ // forward response from origin
+ http->logType = LOG_TCP_REFRESH_MODIFIED;
+ debugs(88, 3, "handleIMSReply: origin replied " << status << ", replacing existing entry and forwarding to client");
+ sendClientUpstreamResponse();
+ }
+
+ // origin replied with an error
else {
- HttpReply *old_rep = (HttpReply *) old_entry->getReply();
-
- // origin replied 304
-
- if (status == HTTP_NOT_MODIFIED) {
- http->logType = LOG_TCP_REFRESH_UNMODIFIED;
-
- // update headers on existing entry
- HttpReply *old_rep = (HttpReply *) old_entry->getReply();
- old_rep->updateOnNotModified(http->storeEntry()->getReply());
- old_entry->timestampsSet();
-
- // if client sent IMS
-
- if (http->request->flags.ims) {
- // forward the 304 from origin
- debugs(88, 3, "handleIMSReply: origin replied 304, revalidating existing entry and forwarding 304 to client");
- sendClientUpstreamResponse();
- } else {
- // send existing entry, it's still valid
- debugs(88, 3, "handleIMSReply: origin replied 304, revalidating existing entry and sending " <<
- old_rep->sline.status << " to client");
- sendClientOldEntry();
- }
- }
-
- // origin replied with a non-error code
- else if (status > HTTP_STATUS_NONE && status < HTTP_INTERNAL_SERVER_ERROR) {
- // forward response from origin
- http->logType = LOG_TCP_REFRESH_MODIFIED;
- debugs(88, 3, "handleIMSReply: origin replied " << status << ", replacing existing entry and forwarding to client");
- sendClientUpstreamResponse();
- }
-
- // origin replied with an error
- else {
- // ignore and let client have old entry
- http->logType = LOG_TCP_REFRESH_FAIL;
- debugs(88, 3, "handleIMSReply: origin replied with error " <<
- status << ", sending old entry (" << old_rep->sline.status << ") to client");
- sendClientOldEntry();
- }
+ // ignore and let client have old entry
+ http->logType = LOG_TCP_REFRESH_FAIL;
+ debugs(88, 3, "handleIMSReply: origin replied with error " <<
+ status << ", sending old entry (" << old_rep->sline.status << ") to client");
+ sendClientOldEntry();
}
}
@@ -472,33 +451,6 @@
/* update size of the request */
reqsize = result.length + reqofs;
- if (e->getReply()->sline.status == 0) {
- /*
- * we don't have full reply headers yet; either wait for more or
- * punt to clientProcessMiss.
- */
-
- if (e->mem_status == IN_MEMORY || e->store_status == STORE_OK) {
- processMiss();
- } else if (result.length + reqofs >= HTTP_REQBUF_SZ
- && http->out.offset == 0) {
- processMiss();
- } else {
- debugs(88, 3, "clientCacheHit: waiting for HTTP reply headers");
- reqofs += result.length;
- assert(reqofs <= HTTP_REQBUF_SZ);
- /* get the next users' buffer */
- StoreIOBuffer tempBuffer;
- tempBuffer.offset = http->out.offset + reqofs;
- tempBuffer.length = next()->readBuffer.length - reqofs;
- tempBuffer.data = next()->readBuffer.data + reqofs;
- storeClientCopy(sc, e,
- tempBuffer, CacheHit, this);
- }
-
- return;
- }
-
/*
* Got the headers, now grok them
*/
@@ -1371,32 +1323,14 @@
void
-clientReplyContext::buildReply(const char *buf, size_t size)
+clientReplyContext::cloneReply()
{
- size_t k = headersEnd(buf, size);
-
- if (!k)
- return;
-
assert(reply == NULL);
- HttpReply *rep = new HttpReply;
+ HttpReply *rep = http->storeEntry()->getReply()->clone();
reply = HTTPMSGLOCK(rep);
- if (!reply->parseCharBuf(buf, k)) {
- /* parsing failure, get rid of the invalid reply */
- HTTPMSGUNLOCK(reply);
-
- if (http->request->range) {
- debugs(0,0,HERE << "look for bug here");
- /* this will fail and destroy request->range */
- // clientBuildRangeHeader(http, reply);
- }
-
- return;
- }
-
/* enforce 1.0 reply version */
reply->sline.version = HttpVersion(1,0);
@@ -1703,32 +1637,6 @@
return getNextNode();
}
-void
-clientReplyContext::waitForMoreData ()
-{
- debugs(88, 5, "clientReplyContext::waitForMoreData: Waiting for more data to parse reply headers in client side.");
- /* We don't have enough to parse the metadata yet */
- /* TODO: the store should give us out of band metadata and
- * obsolete this routine
- */
- /* wait for more to arrive */
- startSendProcess();
-}
-
-void
-clientReplyContext::startSendProcess()
-{
- debugs(88, 5, "clientReplyContext::startSendProcess: triggering store read to SendMoreData");
- assert(reqofs <= HTTP_REQBUF_SZ);
- /* TODO: copy into the supplied buffer */
- StoreIOBuffer tempBuffer;
- tempBuffer.offset = reqofs;
- tempBuffer.length = next()->readBuffer.length - reqofs;
- tempBuffer.data = next()->readBuffer.data + reqofs;
- storeClientCopy(sc, http->storeEntry(),
- tempBuffer, SendMoreData, this);
-}
-
/*
* Calculates the maximum size allowed for an HTTP response
*/
@@ -1841,8 +1749,10 @@
http->loggingEntry(http->storeEntry());
ssize_t body_size = reqofs - reply->hdr_sz;
-
- assert(body_size >= 0);
+ if (body_size < 0) {
+ reqofs = reply->hdr_sz;
+ body_size = 0;
+ }
debugs(88, 3, "clientReplyContext::sendMoreData: Appending " <<
(int) body_size << " bytes after " << reply->hdr_sz <<
@@ -1872,7 +1782,7 @@
StoreIOBuffer tempBuffer;
char *buf = next()->readBuffer.data;
- char *body_buf = buf + reply->hdr_sz;
+ char *body_buf = buf + reply->hdr_sz - next()->readBuffer.offset;
//Server side may disable ranges under some circumstances.
@@ -1916,23 +1826,11 @@
char *body_buf = buf;
- /* This is always valid until we get the headers as metadata from
- * storeClientCopy.
- * Then it becomes reqofs == next->readBuffer.offset()
- */
- assert(reqofs == 0 || flags.storelogiccomplete);
-
- if (flags.headersSent && buf != result.data) {
+ if (buf != result.data) {
/* we've got to copy some data */
assert(result.length <= next()->readBuffer.length);
xmemcpy(buf, result.data, result.length);
body_buf = buf;
- } else if (!flags.headersSent &&
- buf + reqofs !=result.data) {
- /* we've got to copy some data */
- assert(result.length + reqofs <= next()->readBuffer.length);
- xmemcpy(buf + reqofs, result.data, result.length);
- body_buf = buf;
}
/* We've got the final data to start pushing... */
@@ -1971,38 +1869,23 @@
return;
}
- buildReply(buf, reqofs);
-
- if (reply) {
-
- /* handle headers */
-
- if (Config.onoff.log_mime_hdrs) {
- size_t k;
-
- if ((k = headersEnd(buf, reqofs))) {
- safe_free(http->al.headers.reply);
- http->al.headers.reply = (char *)xcalloc(k + 1, 1);
- xstrncpy(http->al.headers.reply, buf, k);
- }
- }
-
- holdingBuffer = result;
- processReplyAccess();
- return;
-
- } else if (reqofs < HTTP_REQBUF_SZ && entry->store_status == STORE_PENDING) {
- waitForMoreData();
- return;
- } else {
- debugs(88, 0, "clientReplyContext::sendMoreData: Unable to parse reply headers within a single HTTP_REQBUF_SZ length buffer");
- StoreIOBuffer tempBuffer;
- tempBuffer.flags.error = 1;
- /* XXX FIXME: make an html error page here */
- sendStreamError(tempBuffer);
- return;
+ cloneReply();
+
+ /* handle headers */
+
+ if (Config.onoff.log_mime_hdrs) {
+ size_t k;
+
+ if ((k = headersEnd(buf, reqofs))) {
+ safe_free(http->al.headers.reply);
+ http->al.headers.reply = (char *)xcalloc(k + 1, 1);
+ xstrncpy(http->al.headers.reply, buf, k);
+ }
}
- fatal ("clientReplyContext::sendMoreData: Unreachable code reached \n");
+
+ holdingBuffer = result;
+ processReplyAccess();
+ return;
}
=== modified file 'src/client_side_reply.h'
--- src/client_side_reply.h 2008-02-26 06:08:50 +0000
+++ src/client_side_reply.h 2008-03-30 14:29:57 +0000
@@ -124,15 +124,13 @@
bool errorInStream(StoreIOBuffer const &result, size_t const &sizeToProcess)const ;
void sendStreamError(StoreIOBuffer const &result);
void pushStreamData(StoreIOBuffer const &result, char *source);
- void waitForMoreData ();
clientStreamNode * next() const;
- void startSendProcess();
StoreIOBuffer holdingBuffer;
HttpReply *reply;
void processReplyAccess();
static PF ProcessReplyAccessResult;
void processReplyAccessResult(bool accessAllowed);
- void buildReply(const char *buf, size_t size);
+ void cloneReply();
void buildReplyHeader ();
bool alwaysAllowResponse(http_status sline) const;
int checkTransferDone();
=== modified file 'src/http.cc'
--- src/http.cc 2007-11-19 05:00:58 +0000
+++ src/http.cc 2008-03-30 16:38:00 +0000
@@ -1213,12 +1213,16 @@
* handler until we get a notification from someone that
* its okay to read again.
*/
- if (read_sz < 2)
- return;
+ if (read_sz < 2) {
+ if (flags.headers_parsed)
+ return;
+ else
+ read_sz = 1024;
+ }
if (flags.do_next_read) {
- flags.do_next_read = 0;
- entry->delayAwareRead(fd, readBuf->space(), read_sz, ReadReplyWrapper, this);
+ flags.do_next_read = 0;
+ entry->delayAwareRead(fd, readBuf->space(read_sz), read_sz, ReadReplyWrapper, this);
}
}
++++++ b8737.patch ++++++
------------------------------------------------------------
revno: 8737
revision-id: amosjeffries@squid-cache.org-20080412135542-h7s8dno3te36h8v4
parent: amosjeffries@squid-cache.org-20080409125203-mkfp49ffxez4vl8a
committer: Amos Jeffries
branch nick: SQUID_3_0
timestamp: Sat 2008-04-12 07:55:42 -0600
message:
Author: Henrik Nordstrom
Removed execute bit from various non-executable source files
------------------------------------------------------------
# Bazaar merge directive format 2 (Bazaar 0.90)
# revision_id: amosjeffries@squid-cache.org-20080412135542-\
# h7s8dno3te36h8v4
# target_branch: http://www.squid-cache.org/bzr/squid3/branches\
# /SQUID_3_0/
# testament_sha1: fa59171a56c99de12aa37156e1af8b9bc2ac06eb
# timestamp: 2008-04-12 14:11:19 +0000
# source_branch: http://www.squid-cache.org/bzr/squid3/branches\
# /SQUID_3_0
# base_revision_id: amosjeffries@squid-cache.org-20080409125203-\
# mkfp49ffxez4vl8a
#
# Begin patch
=== modified file 'doc/README.wccpv2' (properties changed)
=== modified file 'doc/cachemgr.cgi.8.in' (properties changed)
=== modified file 'doc/squid.8.in' (properties changed)
=== modified file 'errors/Azerbaijani/ERR_ESI' (properties changed)
=== modified file 'errors/Azerbaijani/ERR_ICAP_FAILURE' (properties changed)
=== modified file 'errors/Azerbaijani/generic' (properties changed)
=== modified file 'errors/Bulgarian/ERR_INVALID_RESP' (properties changed)
=== modified file 'errors/Catalan/ERR_INVALID_RESP' (properties changed)
=== modified file 'errors/Czech/ERR_INVALID_RESP' (properties changed)
=== modified file 'errors/Danish/ERR_INVALID_RESP' (properties changed)
=== modified file 'errors/Dutch/ERR_INVALID_RESP' (properties changed)
=== modified file 'errors/English/ERR_INVALID_RESP' (properties changed)
=== modified file 'errors/Estonian/ERR_INVALID_RESP' (properties changed)
=== modified file 'errors/Estonian/generic' (properties changed)
=== modified file 'errors/Finnish/ERR_INVALID_RESP' (properties changed)
=== modified file 'errors/French/ERR_INVALID_RESP' (properties changed)
=== modified file 'errors/German/ERR_INVALID_RESP' (properties changed)
=== modified file 'errors/Greek/ERR_ACCESS_DENIED' (properties changed)
=== modified file 'errors/Greek/ERR_CACHE_ACCESS_DENIED' (properties changed)
=== modified file 'errors/Greek/ERR_CACHE_MGR_ACCESS_DENIED' (properties changed)
=== modified file 'errors/Greek/ERR_CANNOT_FORWARD' (properties changed)
=== modified file 'errors/Greek/ERR_CONNECT_FAIL' (properties changed)
=== modified file 'errors/Greek/ERR_DNS_FAIL' (properties changed)
=== modified file 'errors/Greek/ERR_ESI' (properties changed)
=== modified file 'errors/Greek/ERR_FORWARDING_DENIED' (properties changed)
=== modified file 'errors/Greek/ERR_FTP_DISABLED' (properties changed)
=== modified file 'errors/Greek/ERR_FTP_FAILURE' (properties changed)
=== modified file 'errors/Greek/ERR_FTP_FORBIDDEN' (properties changed)
=== modified file 'errors/Greek/ERR_FTP_NOT_FOUND' (properties changed)
=== modified file 'errors/Greek/ERR_FTP_PUT_CREATED' (properties changed)
=== modified file 'errors/Greek/ERR_FTP_PUT_ERROR' (properties changed)
=== modified file 'errors/Greek/ERR_FTP_PUT_MODIFIED' (properties changed)
=== modified file 'errors/Greek/ERR_FTP_UNAVAILABLE' (properties changed)
=== modified file 'errors/Greek/ERR_ICAP_FAILURE' (properties changed)
=== modified file 'errors/Greek/ERR_INVALID_REQ' (properties changed)
=== modified file 'errors/Greek/ERR_INVALID_RESP' (properties changed)
=== modified file 'errors/Greek/ERR_INVALID_URL' (properties changed)
=== modified file 'errors/Greek/ERR_LIFETIME_EXP' (properties changed)
=== modified file 'errors/Greek/ERR_NO_RELAY' (properties changed)
=== modified file 'errors/Greek/ERR_ONLY_IF_CACHED_MISS' (properties changed)
=== modified file 'errors/Greek/ERR_READ_ERROR' (properties changed)
=== modified file 'errors/Greek/ERR_READ_TIMEOUT' (properties changed)
=== modified file 'errors/Greek/ERR_SHUTTING_DOWN' (properties changed)
=== modified file 'errors/Greek/ERR_SOCKET_FAILURE' (properties changed)
=== modified file 'errors/Greek/ERR_TOO_BIG' (properties changed)
=== modified file 'errors/Greek/ERR_UNSUP_REQ' (properties changed)
=== modified file 'errors/Greek/ERR_URN_RESOLVE' (properties changed)
=== modified file 'errors/Greek/ERR_WRITE_ERROR' (properties changed)
=== modified file 'errors/Greek/ERR_ZERO_SIZE_OBJECT' (properties changed)
=== modified file 'errors/Greek/README' (properties changed)
=== modified file 'errors/Greek/generic' (properties changed)
=== modified file 'errors/Hebrew/ERR_INVALID_RESP' (properties changed)
=== modified file 'errors/Hebrew/generic' (properties changed)
=== modified file 'errors/Hungarian/ERR_INVALID_RESP' (properties changed)
=== modified file 'errors/Italian/ERR_INVALID_RESP' (properties changed)
=== modified file 'errors/Italian/generic' (properties changed)
=== modified file 'errors/Japanese/ERR_INVALID_RESP' (properties changed)
=== modified file 'errors/Korean/ERR_INVALID_RESP' (properties changed)
=== modified file 'errors/Lithuanian/ERR_ESI' (properties changed)
=== modified file 'errors/Lithuanian/ERR_INVALID_RESP' (properties changed)
=== modified file 'errors/Lithuanian/generic' (properties changed)
=== modified file 'errors/Polish/ERR_INVALID_RESP' (properties changed)
=== modified file 'errors/Portuguese/ERR_INVALID_RESP' (properties changed)
=== modified file 'errors/Romanian/ERR_INVALID_RESP' (properties changed)
=== modified file 'errors/Romanian/generic' (properties changed)
=== modified file 'errors/Russian-1251/ERR_INVALID_RESP' (properties changed)
=== modified file 'errors/Russian-1251/generic' (properties changed)
=== modified file 'errors/Russian-koi8-r/ERR_INVALID_RESP' (properties changed)
=== modified file 'errors/Russian-koi8-r/generic' (properties changed)
=== modified file 'errors/Serbian/ERR_INVALID_RESP' (properties changed)
=== modified file 'errors/Simplify_Chinese/ERR_ACCESS_DENIED' (properties changed)
=== modified file 'errors/Simplify_Chinese/ERR_CACHE_ACCESS_DENIED' (properties changed)
=== modified file 'errors/Simplify_Chinese/ERR_CACHE_MGR_ACCESS_DENIED' (properties changed)
=== modified file 'errors/Simplify_Chinese/ERR_CANNOT_FORWARD' (properties changed)
=== modified file 'errors/Simplify_Chinese/ERR_CONNECT_FAIL' (properties changed)
=== modified file 'errors/Simplify_Chinese/ERR_DNS_FAIL' (properties changed)
=== modified file 'errors/Simplify_Chinese/ERR_FORWARDING_DENIED' (properties changed)
=== modified file 'errors/Simplify_Chinese/ERR_FTP_DISABLED' (properties changed)
=== modified file 'errors/Simplify_Chinese/ERR_FTP_FAILURE' (properties changed)
=== modified file 'errors/Simplify_Chinese/ERR_FTP_FORBIDDEN' (properties changed)
=== modified file 'errors/Simplify_Chinese/ERR_FTP_NOT_FOUND' (properties changed)
=== modified file 'errors/Simplify_Chinese/ERR_FTP_PUT_CREATED' (properties changed)
=== modified file 'errors/Simplify_Chinese/ERR_FTP_PUT_ERROR' (properties changed)
=== modified file 'errors/Simplify_Chinese/ERR_FTP_PUT_MODIFIED' (properties changed)
=== modified file 'errors/Simplify_Chinese/ERR_FTP_UNAVAILABLE' (properties changed)
=== modified file 'errors/Simplify_Chinese/ERR_INVALID_REQ' (properties changed)
=== modified file 'errors/Simplify_Chinese/ERR_INVALID_RESP' (properties changed)
=== modified file 'errors/Simplify_Chinese/ERR_INVALID_URL' (properties changed)
=== modified file 'errors/Simplify_Chinese/ERR_LIFETIME_EXP' (properties changed)
=== modified file 'errors/Simplify_Chinese/ERR_NO_RELAY' (properties changed)
=== modified file 'errors/Simplify_Chinese/ERR_ONLY_IF_CACHED_MISS' (properties changed)
=== modified file 'errors/Simplify_Chinese/ERR_READ_ERROR' (properties changed)
=== modified file 'errors/Simplify_Chinese/ERR_READ_TIMEOUT' (properties changed)
=== modified file 'errors/Simplify_Chinese/ERR_SHUTTING_DOWN' (properties changed)
=== modified file 'errors/Simplify_Chinese/ERR_SOCKET_FAILURE' (properties changed)
=== modified file 'errors/Simplify_Chinese/ERR_TOO_BIG' (properties changed)
=== modified file 'errors/Simplify_Chinese/ERR_UNSUP_REQ' (properties changed)
=== modified file 'errors/Simplify_Chinese/ERR_URN_RESOLVE' (properties changed)
=== modified file 'errors/Simplify_Chinese/ERR_WRITE_ERROR' (properties changed)
=== modified file 'errors/Simplify_Chinese/ERR_ZERO_SIZE_OBJECT' (properties changed)
=== modified file 'errors/Simplify_Chinese/README' (properties changed)
=== modified file 'errors/Simplify_Chinese/generic' (properties changed)
=== modified file 'errors/Slovak/ERR_INVALID_RESP' (properties changed)
=== modified file 'errors/Spanish/ERR_INVALID_RESP' (properties changed)
=== modified file 'errors/Swedish/ERR_INVALID_RESP' (properties changed)
=== modified file 'errors/Traditional_Chinese/ERR_INVALID_RESP' (properties changed)
=== modified file 'errors/Turkish/ERR_INVALID_RESP' (properties changed)
=== modified file 'helpers/basic_auth/mswin_sspi/Makefile.am' (properties changed)
=== modified file 'helpers/basic_auth/mswin_sspi/mswin_auth.c' (properties changed)
=== modified file 'helpers/basic_auth/mswin_sspi/readme.txt' (properties changed)
=== modified file 'helpers/basic_auth/mswin_sspi/valid.c' (properties changed)
=== modified file 'helpers/basic_auth/mswin_sspi/valid.h' (properties changed)
=== modified file 'helpers/external_acl/mswin_lm_group/Makefile.am' (properties changed)
=== modified file 'helpers/external_acl/mswin_lm_group/readme.txt' (properties changed)
=== modified file 'helpers/external_acl/mswin_lm_group/win32_check_group.c' (properties changed)
=== modified file 'helpers/external_acl/mswin_lm_group/win32_check_group.h' (properties changed)
=== modified file 'helpers/negotiate_auth/Makefile.am' (properties changed)
=== modified file 'helpers/negotiate_auth/mswin_sspi/Makefile.am' (properties changed)
=== modified file 'helpers/negotiate_auth/mswin_sspi/libnegotiatessp.c' (properties changed)
=== modified file 'helpers/negotiate_auth/mswin_sspi/negotiate.h' (properties changed)
=== modified file 'helpers/negotiate_auth/mswin_sspi/negotiate_auth.c' (properties changed)
=== modified file 'helpers/negotiate_auth/mswin_sspi/readme.txt' (properties changed)
=== modified file 'helpers/negotiate_auth/squid_kerb_auth/Makefile.am' (properties changed)
=== modified file 'helpers/negotiate_auth/squid_kerb_auth/squid_kerb_auth.c' (properties changed)
=== modified file 'helpers/ntlm_auth/mswin_sspi/Makefile.am' (properties changed)
=== modified file 'helpers/ntlm_auth/mswin_sspi/libntlmssp.c' (properties changed)
=== modified file 'helpers/ntlm_auth/mswin_sspi/ntlm.h' (properties changed)
=== modified file 'helpers/ntlm_auth/mswin_sspi/ntlm_auth.c' (properties changed)
=== modified file 'helpers/ntlm_auth/mswin_sspi/readme.txt' (properties changed)
=== modified file 'include/squid_mswin.h' (properties changed)
=== modified file 'include/sspwin32.h' (properties changed)
=== modified file 'include/strsep.h' (properties changed)
=== modified file 'include/strtoll.h' (properties changed)
=== modified file 'lib/sspwin32.c' (properties changed)
=== modified file 'lib/strsep.c' (properties changed)
=== modified file 'lib/strtoll.c' (properties changed)
=== modified file 'lib/win32lib.c' (properties changed)
=== modified file 'src/CommIO.h' (properties changed)
=== modified file 'src/DiskIO/AIO/aio_win32.cc' (properties changed)
=== modified file 'src/DiskIO/AIO/aio_win32.h' (properties changed)
=== modified file 'src/DiskIO/DiskThreads/aiops_win32.cc' (properties changed)
=== modified file 'src/WinSvc.cc' (properties changed)
=== modified file 'src/ipc_win32.cc' (properties changed)
=== modified file 'tools/cachemgr.conf' (properties changed)
++++++ b8738.patch ++++++
------------------------------------------------------------
revno: 8738
revision-id: amosjeffries@squid-cache.org-20080412140053-5dtsi2enfpvbu7hk
parent: amosjeffries@squid-cache.org-20080412135542-h7s8dno3te36h8v4
committer: Amos Jeffries
branch nick: SQUID_3_0
timestamp: Sat 2008-04-12 08:00:53 -0600
message:
Author: Christos Tsantilos
Bug 2286: assertion failed: HttpHdrContRange.cc:100: "spec->length >= 0"
Moves the assertion check for spec->length in function
httpHdrRangeRespSpecParseInit exactly after the spec->length copmuted.
Also Fix of a possible misuse of errno in httpHeaderParseOffset function
The errno before used with strtol function must set to "0".
------------------------------------------------------------
# Bazaar merge directive format 2 (Bazaar 0.90)
# revision_id: amosjeffries@squid-cache.org-20080412140053-\
# 5dtsi2enfpvbu7hk
# target_branch: http://www.squid-cache.org/bzr/squid3/branches\
# /SQUID_3_0/
# testament_sha1: c29fb72d549e81fe12c9b64a068c3d3917782c2d
# timestamp: 2008-04-12 14:12:58 +0000
# source_branch: http://www.squid-cache.org/bzr/squid3/branches\
# /SQUID_3_0
# base_revision_id: amosjeffries@squid-cache.org-20080412135542-\
# h7s8dno3te36h8v4
#
# Begin patch
=== modified file 'src/HttpHdrContRange.cc'
--- src/HttpHdrContRange.cc 2007-08-14 00:25:14 +0000
+++ src/HttpHdrContRange.cc 2008-04-12 14:00:53 +0000
@@ -94,11 +94,10 @@
return 0;
spec->length = size_diff(last_pos + 1, spec->offset);
+ /* Ensure typecast is safe */
+ assert (spec->length >= 0);
}
- /* Ensure typecast is safe */
- assert (spec->length >= 0);
-
/* we managed to parse, check if the result makes sence */
if (known_spec(spec->length) && spec->length == 0) {
debugs(68, 2, "invalid range (" << spec->offset << " += " <<
=== modified file 'src/HttpHeaderTools.cc'
--- src/HttpHeaderTools.cc 2008-04-05 02:58:42 +0000
+++ src/HttpHeaderTools.cc 2008-04-12 14:00:53 +0000
@@ -333,6 +333,7 @@
int
httpHeaderParseOffset(const char *start, int64_t * value)
{
+ errno = 0;
int64_t res = strtoll(start, NULL, 10);
if (!res && EINVAL == errno) /* maybe not portable? */
return 0;
++++++ b8739.patch ++++++
------------------------------------------------------------
revno: 8739
revision-id: amosjeffries@squid-cache.org-20080412140326-znjx427motgc2iv0
parent: amosjeffries@squid-cache.org-20080412140053-5dtsi2enfpvbu7hk
committer: Amos Jeffries
branch nick: SQUID_3_0
timestamp: Sat 2008-04-12 08:03:26 -0600
message:
Author: Henrik Nordstrom
Fallback on transparent interception mode even if the connection didn't seem to be transparently intercepted
Needed to deal properly with situations where connections to the local host
is intercepted, or when people NAT outside the Squid server but still compile
Squid with support for the NAT/interception method availabe on the host OS..
------------------------------------------------------------
# Bazaar merge directive format 2 (Bazaar 0.90)
# revision_id: amosjeffries@squid-cache.org-20080412140326-\
# znjx427motgc2iv0
# target_branch: http://www.squid-cache.org/bzr/squid3/branches\
# /SQUID_3_0/
# testament_sha1: 0689aab69e99fd3095da738f0c33d127f41ebe49
# timestamp: 2008-04-12 14:15:26 +0000
# source_branch: http://www.squid-cache.org/bzr/squid3/branches\
# /SQUID_3_0
# base_revision_id: amosjeffries@squid-cache.org-20080412140053-\
# 5dtsi2enfpvbu7hk
#
# Begin patch
=== modified file 'src/client_side.cc'
--- src/client_side.cc 2007-12-04 10:35:52 +0000
+++ src/client_side.cc 2008-04-12 14:03:26 +0000
@@ -1963,6 +1963,9 @@
/* prepend our name & port */
http->uri = xstrdup(internalLocalUri(NULL, url));
http->flags.accel = 1;
+ } else if (conn->port->transparent) {
+ // Fallback on transparent if enabled, useful for "self" requests
+ prepareTransparentURL(conn, http, url, req_hdr);
}
if (!http->uri) {
++++++ b8741.patch ++++++
------------------------------------------------------------
revno: 8741
revision-id: amosjeffries@squid-cache.org-20080412140929-5dghjfman8n2keng
parent: amosjeffries@squid-cache.org-20080412140521-l0jmf89zagfawykx
committer: Amos Jeffries
branch nick: SQUID_3_0
timestamp: Sat 2008-04-12 08:09:29 -0600
message:
Author: Alex Rousskov
Bug 2186 pt 2: DIRECT/<ip> mixed with DIRECT/<hostname>
------------------------------------------------------------
# Bazaar merge directive format 2 (Bazaar 0.90)
# revision_id: amosjeffries@squid-cache.org-20080412140929-\
# 5dghjfman8n2keng
# target_branch: http://www.squid-cache.org/bzr/squid3/branches\
# /SQUID_3_0/
# testament_sha1: 38f1e3f451137c9cc7bd1c42636e2b820bb3b224
# timestamp: 2008-04-12 14:17:45 +0000
# source_branch: http://www.squid-cache.org/bzr/squid3/branches\
# /SQUID_3_0
# base_revision_id: amosjeffries@squid-cache.org-20080412140521-\
# l0jmf89zagfawykx
#
# Begin patch
=== modified file 'src/forward.cc'
--- src/forward.cc 2008-02-27 17:42:23 +0000
+++ src/forward.cc 2008-04-12 14:09:29 +0000
@@ -681,7 +681,7 @@
assert(server_fd == aServerFD);
if (Config.onoff.log_ip_on_direct && status != COMM_ERR_DNS && fs->code == HIER_DIRECT)
- hierarchyNote(&request->hier, fs->code, fd_table[server_fd].ipaddr);
+ updateHierarchyInfo();
if (status == COMM_ERR_DNS) {
/*
@@ -741,7 +741,7 @@
assert(fd == server_fd);
if (Config.onoff.log_ip_on_direct && fs->code == HIER_DIRECT && fd_table[fd].ipaddr[0])
- hierarchyNote(&request->hier, fs->code, fd_table[fd].ipaddr);
+ updateHierarchyInfo();
if (entry->isEmpty()) {
ErrorState *anErr = errorCon(ERR_CONNECT_FAIL, HTTP_GATEWAY_TIMEOUT, request);
@@ -815,12 +815,10 @@
server_fd = fd;
n_tries++;
- if (!fs->_peer) {
+ if (!fs->_peer)
origin_tries++;
- hierarchyNote(&request->hier, fs->code, request->host);
- } else {
- hierarchyNote(&request->hier, fs->code, fs->_peer->host);
- }
+
+ updateHierarchyInfo();
comm_add_close_handler(fd, fwdServerClosedWrapper, this);
@@ -879,9 +877,7 @@
commSetTimeout(fd, ctimeout, fwdConnectTimeoutWrapper, this);
- if (fs->_peer) {
- hierarchyNote(&request->hier, fs->code, fs->_peer->host);
- } else {
+ if (!fs->_peer) {
#if LINUX_TPROXY
if (request->flags.tproxy) {
@@ -914,9 +910,9 @@
}
#endif
- hierarchyNote(&request->hier, fs->code, request->host);
}
+ updateHierarchyInfo();
commConnectStart(fd, host, port, fwdConnectDoneWrapper, this);
}
@@ -1200,6 +1196,38 @@
}
}
+// updates HierarchyLogEntry, guessing nextHop and its format
+void
+FwdState::updateHierarchyInfo()
+{
+ assert(request);
+
+ FwdServer *fs = servers;
+ assert(fs);
+
+ // some callers use one condition, some use the other; are they the same?
+ assert((fs->code == HIER_DIRECT) == !fs->_peer);
+
+ const char *nextHop = NULL;
+
+ if (fs->_peer) {
+ // went to peer, log peer domain name
+ nextHop = fs->_peer->host;
+ } else {
+ // went DIRECT, must honor log_ip_on_direct
+
+ // XXX: or should we use request->host_addr here? how?
+ assert(server_fd >= 0);
+ nextHop = fd_table[server_fd].ipaddr;
+ if (!Config.onoff.log_ip_on_direct || !nextHop[0])
+ nextHop = request->GetHost(); // domain name
+ }
+
+ assert(nextHop);
+ hierarchyNote(&request->hier, fs->code, nextHop);
+}
+
+
/**** PRIVATE NON-MEMBER FUNCTIONS ********************************************/
static void
=== modified file 'src/forward.h'
--- src/forward.h 2007-06-20 02:27:00 +0000
+++ src/forward.h 2008-04-12 14:09:29 +0000
@@ -62,6 +62,7 @@
void start(Pointer aSelf);
static void logReplyStatus(int tries, http_status status);
+ void updateHierarchyInfo();
void completed();
void retryOrBail();
++++++ b8742.patch ++++++
------------------------------------------------------------
revno: 8742
revision-id: amosjeffries@squid-cache.org-20080412151627-srl4di6ie6kkoqlt
parent: amosjeffries@squid-cache.org-20080412140929-5dghjfman8n2keng
committer: Amos Jeffries
branch nick: SQUID_3_0
timestamp: Sat 2008-04-12 09:16:27 -0600
message:
Fallout from build-testing the new backports.
------------------------------------------------------------
# Bazaar merge directive format 2 (Bazaar 0.90)
# revision_id: amosjeffries@squid-cache.org-20080412151627-\
# srl4di6ie6kkoqlt
# target_branch: http://www.squid-cache.org/bzr/squid3/branches\
# /SQUID_3_0/
# testament_sha1: 275143812f4e25564378948a501a2b31c8f5f479
# timestamp: 2008-04-12 15:50:37 +0000
# source_branch: http://www.squid-cache.org/bzr/squid3/branches\
# /SQUID_3_0
# base_revision_id: amosjeffries@squid-cache.org-20080412140929-\
# 5dghjfman8n2keng
#
# Begin patch
=== modified file 'src/forward.cc'
--- src/forward.cc 2008-04-12 14:09:29 +0000
+++ src/forward.cc 2008-04-12 15:16:27 +0000
@@ -1220,7 +1220,7 @@
assert(server_fd >= 0);
nextHop = fd_table[server_fd].ipaddr;
if (!Config.onoff.log_ip_on_direct || !nextHop[0])
- nextHop = request->GetHost(); // domain name
+ nextHop = request->host; // domain name
}
assert(nextHop);
++++++ squid3-3.0.STABLE4-gcc_warn_fix.patch ++++++
--- squid-3.0.STABLE4/src/HttpMsg.cc.orig 2008-04-17 11:45:05.000000000 +0200
+++ squid-3.0.STABLE4/src/HttpMsg.cc 2008-04-17 11:53:04.000000000 +0200
@@ -154,7 +154,7 @@
const size_t hdr_len = headersEnd(buf->content(), buf->contentSize());
// TODO: move to httpReplyParseStep()
- if (hdr_len > Config.maxReplyHeaderSize || hdr_len <= 0 && (size_t)buf->contentSize() > Config.maxReplyHeaderSize) {
+ if (hdr_len > Config.maxReplyHeaderSize || (hdr_len <= 0 && (size_t)buf->contentSize() > Config.maxReplyHeaderSize)) {
debugs(58, 1, "HttpMsg::parse: Too large reply header (" <<
hdr_len << " > " << Config.maxReplyHeaderSize);
*error = HTTP_HEADER_TOO_LARGE;
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org