![](https://seccdn.libravatar.org/avatar/e2145bc5cf53dda95c308a3c75e8fef3.jpg?s=120&d=mm&r=g)
Hello community, here is the log from the commit of package squid checked in at Thu Sep 25 23:48:13 CEST 2008. -------- --- squid/squid.changes 2008-08-20 14:38:49.000000000 +0200 +++ /mounts/work_src_done/STABLE/squid/squid.changes 2008-09-25 16:58:05.538528000 +0200 @@ -1,0 +2,12 @@ +Thu Sep 25 16:56:29 CEST 2008 - kssingvo@suse.de + +- added a few official patches: + * HTTP/0.9: making it possible to disable upgrade of HTTP/0.9 + responses + * assertion failed: sc->new_callback == NULL at store_client.c:190 + * foreground rebuild should do all of the rebuilding before Squid + accepts + * Shut down store url rewrite helpers on squid -k reconfigure + * configuration file contains non-ASCII characters + +------------------------------------------------------------------- New: ---- 12374.patch 12375.patch 12376.patch 12377.patch 12378.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ squid.spec ++++++ --- /var/tmp/diff_new_pack.I22537/_old 2008-09-25 23:47:46.000000000 +0200 +++ /var/tmp/diff_new_pack.I22537/_new 2008-09-25 23:47:46.000000000 +0200 @@ -26,7 +26,7 @@ %endif Summary: Squid WWW proxy server Version: 2.7.STABLE4 -Release: 1 +Release: 15 License: GPL v2 or later Url: http://www.squid-cache.org Group: Productivity/Networking/Web/Proxy @@ -53,65 +53,65 @@ Source12: http://www.squid-cache.org/WCCP-support/Linux/ip_wccp.c Source13: squid.sysconfig Patch0: squid-2.7.STABLE3-config.patch -# Patch1: http://www.squid-cache.org/Versions/v2/2.6/changesets/12008.patch -# Patch2: http://www.squid-cache.org/Versions/v2/2.6/changesets/12009.patch -# Patch3: http://www.squid-cache.org/Versions/v2/2.6/changesets/12018.patch -# Patch4: http://www.squid-cache.org/Versions/v2/2.6/changesets/12026.patch -# Patch5: http://www.squid-cache.org/Versions/v2/2.6/changesets/12027.patch -# Patch6: http://www.squid-cache.org/Versions/v2/2.6/changesets/12029.patch -# Patch7: http://www.squid-cache.org/Versions/v2/2.6/changesets/ -# Patch8: http://www.squid-cache.org/Versions/v2/2.6/changesets/ -# Patch9: http://www.squid-cache.org/Versions/v2/2.6/changesets/ -# Patch10: http://www.squid-cache.org/Versions/v2/2.6/changesets/ -# Patch11: http://www.squid-cache.org/Versions/v2/2.6/changesets/ -# Patch12: http://www.squid-cache.org/Versions/v2/2.6/changesets/ -# Patch13: http://www.squid-cache.org/Versions/v2/2.6/changesets/ -# Patch14: http://www.squid-cache.org/Versions/v2/2.6/changesets/ -# Patch15: http://www.squid-cache.org/Versions/v2/2.6/changesets/ -# Patch16: http://www.squid-cache.org/Versions/v2/2.6/changesets/ -# Patch17: http://www.squid-cache.org/Versions/v2/2.6/changesets/ -# Patch18: http://www.squid-cache.org/Versions/v2/2.6/changesets/ -# Patch19: http://www.squid-cache.org/Versions/v2/2.6/changesets/ -# Patch20: http://www.squid-cache.org/Versions/v2/2.6/changesets/ -# Patch21: http://www.squid-cache.org/Versions/v2/2.6/changesets/ -# Patch22: http://www.squid-cache.org/Versions/v2/2.6/changesets/ -# Patch23: http://www.squid-cache.org/Versions/v2/2.6/changesets/ -# Patch24: http://www.squid-cache.org/Versions/v2/2.6/changesets/ -# Patch25: http://www.squid-cache.org/Versions/v2/2.6/changesets/ -# Patch26: http://www.squid-cache.org/Versions/v2/2.6/changesets/ -# Patch27: http://www.squid-cache.org/Versions/v2/2.6/changesets/ -# Patch28: http://www.squid-cache.org/Versions/v2/2.6/changesets/ -# Patch29: http://www.squid-cache.org/Versions/v2/2.6/changesets/ -# Patch30: http://www.squid-cache.org/Versions/v2/2.6/changesets/ -# Patch31: http://www.squid-cache.org/Versions/v2/2.6/changesets/ -# Patch32: http://www.squid-cache.org/Versions/v2/2.6/changesets/ -# Patch33: http://www.squid-cache.org/Versions/v2/2.6/changesets/ -# Patch34: http://www.squid-cache.org/Versions/v2/2.6/changesets/ -# Patch35: http://www.squid-cache.org/Versions/v2/2.6/changesets/ -# Patch36: http://www.squid-cache.org/Versions/v2/2.6/changesets/ -# Patch37: http://www.squid-cache.org/Versions/v2/2.6/changesets/ -# Patch38: http://www.squid-cache.org/Versions/v2/2.6/changesets/ -# Patch39: http://www.squid-cache.org/Versions/v2/2.6/changesets/ -# Patch40: http://www.squid-cache.org/Versions/v2/2.6/changesets/ -# Patch41: http://www.squid-cache.org/Versions/v2/2.6/changesets/ -# Patch42: http://www.squid-cache.org/Versions/v2/2.6/changesets/ -# Patch43: http://www.squid-cache.org/Versions/v2/2.6/changesets/ -# Patch44: http://www.squid-cache.org/Versions/v2/2.6/changesets/ -# Patch45: http://www.squid-cache.org/Versions/v2/2.6/changesets/ -# Patch46: http://www.squid-cache.org/Versions/v2/2.6/changesets/ -# Patch47: http://www.squid-cache.org/Versions/v2/2.6/changesets/ -# Patch48: http://www.squid-cache.org/Versions/v2/2.6/changesets/ -# Patch49: http://www.squid-cache.org/Versions/v2/2.6/changesets/ -# Patch50: http://www.squid-cache.org/Versions/v2/2.6/changesets/ -# Patch51: http://www.squid-cache.org/Versions/v2/2.6/changesets/ -# Patch52: http://www.squid-cache.org/Versions/v2/2.6/changesets/ -# Patch53: http://www.squid-cache.org/Versions/v2/2.6/changesets/ -# Patch54: http://www.squid-cache.org/Versions/v2/2.6/changesets/ -# Patch55: http://www.squid-cache.org/Versions/v2/2.6/changesets/ -# Patch56: http://www.squid-cache.org/Versions/v2/2.6/changesets/ -# Patch57: http://www.squid-cache.org/Versions/v2/2.6/changesets/ -# Patch58: http://www.squid-cache.org/Versions/v2/2.6/changesets/ -# Patch59: http://www.squid-cache.org/Versions/v2/2.6/changesets/ +Patch1: http://www.squid-cache.org/Versions/v2/2.7/changesets/12374.patch +Patch2: http://www.squid-cache.org/Versions/v2/2.7/changesets/12375.patch +Patch3: http://www.squid-cache.org/Versions/v2/2.7/changesets/12376.patch +Patch4: http://www.squid-cache.org/Versions/v2/2.7/changesets/12377.patch +Patch5: http://www.squid-cache.org/Versions/v2/2.7/changesets/12378.patch +# Patch6: http://www.squid-cache.org/Versions/v2/2.7/changesets/ +# Patch7: http://www.squid-cache.org/Versions/v2/2.7/changesets/ +# Patch8: http://www.squid-cache.org/Versions/v2/2.7/changesets/ +# Patch9: http://www.squid-cache.org/Versions/v2/2.7/changesets/ +# Patch10: http://www.squid-cache.org/Versions/v2/2.7/changesets/ +# Patch11: http://www.squid-cache.org/Versions/v2/2.7/changesets/ +# Patch12: http://www.squid-cache.org/Versions/v2/2.7/changesets/ +# Patch13: http://www.squid-cache.org/Versions/v2/2.7/changesets/ +# Patch14: http://www.squid-cache.org/Versions/v2/2.7/changesets/ +# Patch15: http://www.squid-cache.org/Versions/v2/2.7/changesets/ +# Patch16: http://www.squid-cache.org/Versions/v2/2.7/changesets/ +# Patch17: http://www.squid-cache.org/Versions/v2/2.7/changesets/ +# Patch18: http://www.squid-cache.org/Versions/v2/2.7/changesets/ +# Patch19: http://www.squid-cache.org/Versions/v2/2.7/changesets/ +# Patch20: http://www.squid-cache.org/Versions/v2/2.7/changesets/ +# Patch21: http://www.squid-cache.org/Versions/v2/2.7/changesets/ +# Patch22: http://www.squid-cache.org/Versions/v2/2.7/changesets/ +# Patch23: http://www.squid-cache.org/Versions/v2/2.7/changesets/ +# Patch24: http://www.squid-cache.org/Versions/v2/2.7/changesets/ +# Patch25: http://www.squid-cache.org/Versions/v2/2.7/changesets/ +# Patch26: http://www.squid-cache.org/Versions/v2/2.7/changesets/ +# Patch27: http://www.squid-cache.org/Versions/v2/2.7/changesets/ +# Patch28: http://www.squid-cache.org/Versions/v2/2.7/changesets/ +# Patch29: http://www.squid-cache.org/Versions/v2/2.7/changesets/ +# Patch30: http://www.squid-cache.org/Versions/v2/2.7/changesets/ +# Patch31: http://www.squid-cache.org/Versions/v2/2.7/changesets/ +# Patch32: http://www.squid-cache.org/Versions/v2/2.7/changesets/ +# Patch33: http://www.squid-cache.org/Versions/v2/2.7/changesets/ +# Patch34: http://www.squid-cache.org/Versions/v2/2.7/changesets/ +# Patch35: http://www.squid-cache.org/Versions/v2/2.7/changesets/ +# Patch36: http://www.squid-cache.org/Versions/v2/2.7/changesets/ +# Patch37: http://www.squid-cache.org/Versions/v2/2.7/changesets/ +# Patch38: http://www.squid-cache.org/Versions/v2/2.7/changesets/ +# Patch39: http://www.squid-cache.org/Versions/v2/2.7/changesets/ +# Patch40: http://www.squid-cache.org/Versions/v2/2.7/changesets/ +# Patch41: http://www.squid-cache.org/Versions/v2/2.7/changesets/ +# Patch42: http://www.squid-cache.org/Versions/v2/2.7/changesets/ +# Patch43: http://www.squid-cache.org/Versions/v2/2.7/changesets/ +# Patch44: http://www.squid-cache.org/Versions/v2/2.7/changesets/ +# Patch45: http://www.squid-cache.org/Versions/v2/2.7/changesets/ +# Patch46: http://www.squid-cache.org/Versions/v2/2.7/changesets/ +# Patch47: http://www.squid-cache.org/Versions/v2/2.7/changesets/ +# Patch48: http://www.squid-cache.org/Versions/v2/2.7/changesets/ +# Patch49: http://www.squid-cache.org/Versions/v2/2.7/changesets/ +# Patch50: http://www.squid-cache.org/Versions/v2/2.7/changesets/ +# Patch51: http://www.squid-cache.org/Versions/v2/2.7/changesets/ +# Patch52: http://www.squid-cache.org/Versions/v2/2.7/changesets/ +# Patch53: http://www.squid-cache.org/Versions/v2/2.7/changesets/ +# Patch54: http://www.squid-cache.org/Versions/v2/2.7/changesets/ +# Patch55: http://www.squid-cache.org/Versions/v2/2.7/changesets/ +# Patch56: http://www.squid-cache.org/Versions/v2/2.7/changesets/ +# Patch57: http://www.squid-cache.org/Versions/v2/2.7/changesets/ +# Patch58: http://www.squid-cache.org/Versions/v2/2.7/changesets/ +# Patch59: http://www.squid-cache.org/Versions/v2/2.7/changesets/ # Patch99: http://www.squid-cache.org/~wessels/patch/libntlmssp.c.patch Patch100: squid_ldapauth-%{squid_ldapauth_version}.dif Patch101: %{name}-2.6.STABLE19-64bit.patch @@ -138,11 +138,11 @@ #mv msntauth-v2.0.3-squid.1 MSNT #) %patch0 -p1 -# %patch1 -p1 -# %patch2 -p1 -# %patch3 -p1 -# %patch4 -p1 -# %patch5 -p1 +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 +%patch5 -p1 # %patch6 -p1 # %patch7 -p1 # %patch8 -p1 @@ -397,6 +397,15 @@ %doc README.ip_user %changelog +* Thu Sep 25 2008 kssingvo@suse.de +- added a few official patches: + * HTTP/0.9: making it possible to disable upgrade of HTTP/0.9 + responses + * assertion failed: sc->new_callback == NULL at store_client.c:190 + * foreground rebuild should do all of the rebuilding before Squid + accepts + * Shut down store url rewrite helpers on squid -k reconfigure + * configuration file contains non-ASCII characters * Wed Aug 20 2008 kssingvo@suse.de - update to 2.7.STABLE4: * DNS retransmit queue could get hold up ++++++ 12374.patch ++++++ --------------------- PatchSet 12374 Date: 2008/09/25 02:19:57 Author: hno Branch: SQUID_2_7 Tag: (none) Log: Bug #2439: configuration file contains non-ASCII characters Somehow a partial UTF-8 character sneaked into cf.data.pre.. convert to the intended ascii equivalence. Members: src/cf.data.pre:1.450.2.26->1.450.2.27 Index: squid/src/cf.data.pre =================================================================== RCS file: /cvsroot/squid/squid/src/cf.data.pre,v retrieving revision 1.450.2.26 retrieving revision 1.450.2.27 diff -u -r1.450.2.26 -r1.450.2.27 --- squid/src/cf.data.pre 10 Jul 2008 09:47:28 -0000 1.450.2.26 +++ squid/src/cf.data.pre 25 Sep 2008 02:19:57 -0000 1.450.2.27 @@ -1,6 +1,6 @@ # -# $Id: cf.data.pre,v 1.450.2.26 2008/07/10 09:47:28 hno Exp $ +# $Id: cf.data.pre,v 1.450.2.27 2008/09/25 02:19:57 hno Exp $ # # SQUID Web Proxy Cache http://www.squid-cache.org/ # ---------------------------------------------------------- @@ -3538,7 +3538,7 @@ When using the concurrency option, the protocol is changed by introducing a query channel tag infront of the request/response. The query channel - tag is a number between 0 and concurrency−1. + tag is a number between 0 and concurrency-1. FORMAT specifications: @@ -3570,7 +3570,7 @@ present, the supplied value completely replaces the cached value. - In the event of a helper−related error (e.g., overload), Squid + In the event of a helper-related error (e.g., overload), Squid will always default to STALE. DOC_END ++++++ 12375.patch ++++++ --------------------- PatchSet 12375 Date: 2008/09/25 02:21:52 Author: hno Branch: SQUID_2_7 Tag: (none) Log: Bug #2441: Shut down store url rewrite helpers on squid -k reconfigure Members: src/main.c:1.403.2.2->1.403.2.3 Index: squid/src/main.c =================================================================== RCS file: /cvsroot/squid/squid/src/main.c,v retrieving revision 1.403.2.2 retrieving revision 1.403.2.3 diff -u -r1.403.2.2 -r1.403.2.3 --- squid/src/main.c 26 May 2008 23:14:30 -0000 1.403.2.2 +++ squid/src/main.c 25 Sep 2008 02:21:52 -0000 1.403.2.3 @@ -1,6 +1,6 @@ /* - * $Id: main.c,v 1.403.2.2 2008/05/26 23:14:30 hno Exp $ + * $Id: main.c,v 1.403.2.3 2008/09/25 02:21:52 hno Exp $ * * DEBUG: section 1 Startup and Main Loop * AUTHOR: Harvest Derived @@ -467,6 +467,7 @@ dnsShutdown(); #endif redirectShutdown(); + storeurlShutdown(); locationRewriteShutdown(); authenticateShutdown(); externalAclShutdown(); @@ -1105,6 +1106,7 @@ redirectShutdown(); externalAclShutdown(); refreshCheckShutdown(); + storeurlShutdown(); locationRewriteShutdown(); icpConnectionClose(); #if USE_HTCP ++++++ 12376.patch ++++++ --------------------- PatchSet 12376 Date: 2008/09/25 02:28:04 Author: hno Branch: SQUID_2_7 Tag: (none) Log: Author: Alexander V. Lukyanov <lav@netis.ru> A modified version of a patch by lav@netis.ru - foreground rebuild should do all of the rebuilding before Squid accepts requests. The original patch had storeCleanup() call itself at the end of it running so further work would be immediately done. I've kept the eventAdd() to avoid nested function calls but I've included the "rebuild up to a billion objects" logic Alexander added. This -should- function just the same as his patch. Members: src/store_rebuild.c:1.80->1.80.2.1 Index: squid/src/store_rebuild.c =================================================================== RCS file: /cvsroot/squid/squid/src/store_rebuild.c,v retrieving revision 1.80 retrieving revision 1.80.2.1 diff -u -r1.80 -r1.80.2.1 --- squid/src/store_rebuild.c 1 Sep 2007 23:09:32 -0000 1.80 +++ squid/src/store_rebuild.c 25 Sep 2008 02:28:04 -0000 1.80.2.1 @@ -1,6 +1,6 @@ /* - * $Id: store_rebuild.c,v 1.80 2007/09/01 23:09:32 hno Exp $ + * $Id: store_rebuild.c,v 1.80.2.1 2008/09/25 02:28:04 hno Exp $ * * DEBUG: section 20 Store Rebuild Routines * AUTHOR: Duane Wessels @@ -68,7 +68,9 @@ hash_link *link_ptr = NULL; hash_link *link_next = NULL; validnum_start = validnum; - while (validnum - validnum_start < 500) { + int limit = opt_foreground_rebuild ? 1 << 30 : 500; + + while (validnum - validnum_start < limit) { if (++bucketnum >= store_hash_buckets) { debug(20, 1) (" Completed Validation Procedure\n"); debug(20, 1) (" Validated %d Entries\n", validnum); ++++++ 12377.patch ++++++ --------------------- PatchSet 12377 Date: 2008/09/25 02:28:57 Author: hno Branch: SQUID_2_7 Tag: (none) Log: Bug #2464: assertion failed: sc->new_callback == NULL at store_client.c:190 The fix to deal properly with aborted IMS objects forgot a return, resulting in internal inconsistency. Members: src/client_side.c:1.754.2.21->1.754.2.22 Index: squid/src/client_side.c =================================================================== RCS file: /cvsroot/squid/squid/src/client_side.c,v retrieving revision 1.754.2.21 retrieving revision 1.754.2.22 diff -u -r1.754.2.21 -r1.754.2.22 --- squid/src/client_side.c 21 Jul 2008 20:43:27 -0000 1.754.2.21 +++ squid/src/client_side.c 25 Sep 2008 02:28:57 -0000 1.754.2.22 @@ -1,6 +1,6 @@ /* - * $Id: client_side.c,v 1.754.2.21 2008/07/21 20:43:27 hno Exp $ + * $Id: client_side.c,v 1.754.2.22 2008/09/25 02:28:57 hno Exp $ * * DEBUG: section 33 Client-side Routines * AUTHOR: Duane Wessels @@ -953,6 +953,7 @@ if (EBIT_TEST(entry->flags, ENTRY_ABORTED)) { /* Old object got aborted, not good */ clientProcessMiss(http); + return; } if (recopy) { storeClientCopyHeaders(http->sc, entry, ++++++ 12378.patch ++++++ --------------------- PatchSet 12378 Date: 2008/09/25 02:33:37 Author: hno Branch: SQUID_2_7 Tag: (none) Log: Bug #2394: add upgrade_http0.9 option making it possible to disable upgrade of HTTP/0.9 responses Apparently there is some applications which may get confused if HTTP/0.9 (aka headerless) responses gets upgraded to HTTP. This squid.conf option makes it possible to disable the upgrade of such responses, leaving them as-is without any HTTP header. Members: src/HttpHeader.c:1.99->1.99.2.1 src/cf.data.pre:1.450.2.27->1.450.2.28 src/client_side.c:1.754.2.22->1.754.2.23 src/enums.h:1.245.2.2->1.245.2.3 src/http.c:1.439.2.6->1.439.2.7 src/structs.h:1.538.2.15->1.538.2.16 Index: squid/src/HttpHeader.c =================================================================== RCS file: /cvsroot/squid/squid/src/HttpHeader.c,v retrieving revision 1.99 retrieving revision 1.99.2.1 diff -u -r1.99 -r1.99.2.1 --- squid/src/HttpHeader.c 21 Dec 2007 09:50:19 -0000 1.99 +++ squid/src/HttpHeader.c 25 Sep 2008 02:33:37 -0000 1.99.2.1 @@ -1,6 +1,6 @@ /* - * $Id: HttpHeader.c,v 1.99 2007/12/21 09:50:19 adrian Exp $ + * $Id: HttpHeader.c,v 1.99.2.1 2008/09/25 02:33:37 hno Exp $ * * DEBUG: section 55 HTTP Header * AUTHOR: Alex Rousskov @@ -129,6 +129,7 @@ {"X-Forwarded-For", HDR_X_FORWARDED_FOR, ftStr}, {"X-Request-URI", HDR_X_REQUEST_URI, ftStr}, {"X-Squid-Error", HDR_X_SQUID_ERROR, ftStr}, + {"X-HTTP09-First-Line", HDR_X_HTTP09_FIRST_LINE, ftStr}, {"Negotiate", HDR_NEGOTIATE, ftStr}, #if X_ACCELERATOR_VARY {"X-Accelerator-Vary", HDR_X_ACCELERATOR_VARY, ftStr}, Index: squid/src/cf.data.pre =================================================================== RCS file: /cvsroot/squid/squid/src/cf.data.pre,v retrieving revision 1.450.2.27 retrieving revision 1.450.2.28 diff -u -r1.450.2.27 -r1.450.2.28 --- squid/src/cf.data.pre 25 Sep 2008 02:19:57 -0000 1.450.2.27 +++ squid/src/cf.data.pre 25 Sep 2008 02:33:37 -0000 1.450.2.28 @@ -1,6 +1,6 @@ # -# $Id: cf.data.pre,v 1.450.2.27 2008/09/25 02:19:57 hno Exp $ +# $Id: cf.data.pre,v 1.450.2.28 2008/09/25 02:33:37 hno Exp $ # # SQUID Web Proxy Cache http://www.squid-cache.org/ # ---------------------------------------------------------- @@ -3253,6 +3253,29 @@ broken_posts allow buggy_server DOC_END +NAME: upgrade_http0.9 +TYPE: acl_access +DEFAULT: none +LOC: Config.accessList.upgrade_http09 +DOC_START + This access list controls when HTTP/0.9 responses is upgraded + to our current HTTP version. The default is to always upgrade. + + Some applications expect to be able to respond with non-HTTP + responses and clients gets confused if the response is upgraded. + For example SHOUTcast servers used for mp3 streaming. + + To enable some flexibility in detection of such applications + the first line of the response is available in the internal header + X-HTTP09-First-Line for use in the rep_header acl. + +NOCOMMENT_START +# Don't upgrade ShoutCast responses to HTTP +acl shoutcast rep_header X-HTTP09-First-Line ^ICY\s[0-9] +upgrade_http0.9 deny shoutcast +NOCOMMENT_END +DOC_END + NAME: via IFDEF: HTTP_VIOLATIONS COMMENT: on|off Index: squid/src/client_side.c =================================================================== RCS file: /cvsroot/squid/squid/src/client_side.c,v retrieving revision 1.754.2.22 retrieving revision 1.754.2.23 diff -u -r1.754.2.22 -r1.754.2.23 --- squid/src/client_side.c 25 Sep 2008 02:28:57 -0000 1.754.2.22 +++ squid/src/client_side.c 25 Sep 2008 02:33:37 -0000 1.754.2.23 @@ -1,6 +1,6 @@ /* - * $Id: client_side.c,v 1.754.2.22 2008/09/25 02:28:57 hno Exp $ + * $Id: client_side.c,v 1.754.2.23 2008/09/25 02:33:37 hno Exp $ * * DEBUG: section 33 Client-side Routines * AUTHOR: Duane Wessels @@ -1942,8 +1942,8 @@ LOCAL_ARRAY(char, bbuf, MAX_URL + 32); String strVia = httpHeaderGetList(hdr, HDR_VIA); snprintf(bbuf, MAX_URL + 32, "%d.%d %s", - http->entry->mem_obj->reply->sline.version.major, - http->entry->mem_obj->reply->sline.version.minor, ThisCache); + rep->sline.version.major, + rep->sline.version.minor, ThisCache); strListAdd(&strVia, bbuf, ','); httpHeaderDelById(hdr, HDR_VIA); httpHeaderPutStr(hdr, HDR_VIA, strBuf(strVia)); @@ -2003,13 +2003,6 @@ /* try to grab the already-parsed header */ rep = httpReplyClone(orig_rep); if (rep->pstate == psParsed) { - if (http->conn->port->http11) { - /* enforce 1.1 reply version */ - httpBuildVersion(&rep->sline.version, 1, 1); - } else { - /* enforce 1.0 reply version */ - httpBuildVersion(&rep->sline.version, 1, 0); - } /* do header conversions */ clientBuildReplyHeader(http, rep); /* if we do ranges, change status to "Partial Content" */ @@ -3018,17 +3011,41 @@ { HttpReply *rep = http->reply; MemBuf mb; + int send_header = 1; /* reset range iterator */ http->range_iter.pos = HttpHdrRangeInitPos; if (http->request->method == METHOD_HEAD) { /* do not forward body for HEAD replies */ http->flags.done_copying = 1; } + if (http->http_ver.major < 1) + send_header = 0; + if (rep->sline.version.major < 1) { + if (send_header && Config.accessList.upgrade_http09) { + aclCheck_t *checklist = clientAclChecklistCreate(Config.accessList.upgrade_http09, http); + checklist->reply = rep; + if (aclCheckFast(Config.accessList.upgrade_http09, checklist) != 1) + send_header = 0; + aclChecklistFree(checklist); + } + httpHeaderDelById(&rep->header, HDR_X_HTTP09_FIRST_LINE); + } /* init mb; put status line and headers */ - if (http->http_ver.major >= 1) + if (send_header) { + if (http->conn->port->http11) { + /* enforce 1.1 reply version */ + httpBuildVersion(&rep->sline.version, 1, 1); + } else { + /* enforce 1.0 reply version */ + httpBuildVersion(&rep->sline.version, 1, 0); + } mb = httpReplyPack(rep); - else + } else { + debug(33, 2) ("HTTP/0.9 response, disable everything\n"); + http->request->flags.chunked_response = 0; + http->request->flags.proxy_keepalive = 0; memBufDefInit(&mb); + } if (Config.onoff.log_mime_hdrs) { http->al.headers.reply = xmalloc(mb.size + 1); xstrncpy(http->al.headers.reply, mb.buf, mb.size); Index: squid/src/enums.h =================================================================== RCS file: /cvsroot/squid/squid/src/enums.h,v retrieving revision 1.245.2.2 retrieving revision 1.245.2.3 diff -u -r1.245.2.2 -r1.245.2.3 --- squid/src/enums.h 27 May 2008 12:49:39 -0000 1.245.2.2 +++ squid/src/enums.h 25 Sep 2008 02:33:37 -0000 1.245.2.3 @@ -1,6 +1,6 @@ /* - * $Id: enums.h,v 1.245.2.2 2008/05/27 12:49:39 hno Exp $ + * $Id: enums.h,v 1.245.2.3 2008/09/25 02:33:37 hno Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -261,6 +261,7 @@ #endif HDR_X_ERROR_URL, /* errormap, requested URL */ HDR_X_ERROR_STATUS, /* errormap, received HTTP status line */ + HDR_X_HTTP09_FIRST_LINE, /* internal, first line of HTTP/0.9 response */ HDR_FRONT_END_HTTPS, HDR_PROXY_SUPPORT, HDR_KEEP_ALIVE, Index: squid/src/http.c =================================================================== RCS file: /cvsroot/squid/squid/src/http.c,v retrieving revision 1.439.2.6 retrieving revision 1.439.2.7 diff -u -r1.439.2.6 -r1.439.2.7 --- squid/src/http.c 25 Jun 2008 22:14:02 -0000 1.439.2.6 +++ squid/src/http.c 25 Sep 2008 02:33:37 -0000 1.439.2.7 @@ -1,6 +1,6 @@ /* - * $Id: http.c,v 1.439.2.6 2008/06/25 22:14:02 hno Exp $ + * $Id: http.c,v 1.439.2.7 2008/09/25 02:33:37 hno Exp $ * * DEBUG: section 11 Hypertext Transfer Protocol (HTTP) * AUTHOR: Harvest Derived @@ -432,6 +432,18 @@ hdr_len = httpState->reply_hdr.size; if (hdr_len > 4 && strncmp(httpState->reply_hdr.buf, "HTTP/", 5)) { debug(11, 3) ("httpProcessReplyHeader: Non-HTTP-compliant header: '%s'\n", httpState->reply_hdr.buf); + { + char *t, *t2; + t = xstrdup(httpState->reply_hdr.buf); + t2 = strchr(t, '\n'); + if (t2) + *t2 = '\0'; + t2 = strchr(t, '\r'); + if (t2) + *t2 = '\0'; + httpHeaderPutStr(&reply->header, HDR_X_HTTP09_FIRST_LINE, t); + safe_free(t); + } httpState->reply_hdr_state += 2; httpState->chunk_size = -1; /* Terminated by EOF */ httpState->reply_hdr.size = old_size; @@ -972,7 +984,6 @@ } else if (s == HTTP_INVALID_HEADER) { MemBuf mb; HttpReply *reply = entry->mem_obj->reply; - httpReplyReset(reply); httpBuildVersion(&reply->sline.version, 0, 9); reply->sline.status = HTTP_OK; httpHeaderPutTime(&reply->header, HDR_DATE, squid_curtime); Index: squid/src/structs.h =================================================================== RCS file: /cvsroot/squid/squid/src/structs.h,v retrieving revision 1.538.2.15 retrieving revision 1.538.2.16 diff -u -r1.538.2.15 -r1.538.2.16 --- squid/src/structs.h 21 Jul 2008 20:18:50 -0000 1.538.2.15 +++ squid/src/structs.h 25 Sep 2008 02:33:37 -0000 1.538.2.16 @@ -1,6 +1,6 @@ /* - * $Id: structs.h,v 1.538.2.15 2008/07/21 20:18:50 hno Exp $ + * $Id: structs.h,v 1.538.2.16 2008/09/25 02:33:37 hno Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -737,6 +737,7 @@ #endif acl_access *vary_encoding; acl_access *auth_ip_shortcircuit; + acl_access *upgrade_http09; } accessList; acl_deny_info_list *denyInfoList; struct _authConfig { ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org