Mailinglist Archive: opensuse-commit (1003 mails)
| < Previous | Next > |
commit squid-beta
- From: root@xxxxxxxxxxxxxxx (h_root)
- Date: Thu, 14 Jun 2007 16:34:37 +0200
- Message-id: <20070614143438.116AF678182@xxxxxxxxxxxxxxx>
Hello community,
here is the log from the commit of package squid-beta
checked in at Thu Jun 14 16:34:37 CEST 2007.
--------
--- squid-beta/squid-beta.changes 2007-05-24 16:11:50.000000000 +0200
+++ /mounts/work_src_done/STABLE/squid-beta/squid-beta.changes 2007-06-14 16:25:09.288763000 +0200
@@ -1,0 +2,314 @@
+Thu Jun 14 16:12:56 CEST 2007 - kssingvo@xxxxxxx
+
+- update to version 3.0PRE6:
+ * Preparing to release Squid-3.0.PRE6
+ * ICAPModXact needs to use the new AUTHUSERREQUESTLOCK() macro
+ * Fixed NULL pointer passed to xstrdup in AuthUser::username().
+ * Bug #1951: NTLM authentication does not work
+ * Fixed assertion at src/ACLChecklist.cc:200
+ * Fixed free() errors in AuthUser::~AuthUser()
+ * Fixed NULL pointer bug in new version of auth_ntlm.cc.
+ * Port of 2.6/changesets/11280.patch
+ * Removed auth_user_request_t typedef. Just use AuthUserRequest.
+ * Removed auth_user_request_t typedef. Just use AuthUserRequest.
+ * Removed unused ICAPClientStream code.
+ * Bug #1819 fix: retry the ICAP transaction when its pconn fails.
+ * Two unrelated changes: A failed ICAP RESPMOD transaction could
+ leave
+ * Make sure the entire response body gets to ICAP, even when the
+ * Bug #1819 fix in three parts: Retry failed ICAP pconns.
+ * If a consumer leaves without consuming anything, do not tell
+ * Added cbdataProtected parameter to control the last eventAdd
+ * Updated NTLM/Negotiate test clients, explaining a bit of their
+ use.
+ * Added HTTP status code 307 (Temporary Redirect) to
+ cacheableReply()
+ * Bug #1752: cbdata problems with storeRegisterAbort()
+ * FtpState should not call StoreEntry::unregisterAbort()
+ * Bug #1950: cachemgr requests for auth helper stats can crash
+ Squid
+ * Bug #1950: cachemgr requests for auth helper stats can crash
+ Squid
+ * Bug #1688: assertion when Squid filters HTTP headers
+ * Add HTTP status codes 416 and 417 to the list that Squid knows
+ about.
+ * FTP will no longer send REST command if offset exceeds size.
+ * Fixed "spec->length >= 0" assertion for FTP request with range
+ * Add HTTP status codes 416 and 417 to the list that Squid knows
+ about.
+ * Removed repeated assertion from httpHdrRangeRespSpecPackInto
+ * Avoid memory leaks when submitting a NULL helper.
+ * Removed casts from numeric types in debugs() statements.
+ * Fixed buffer overflow bug in whois.cc.
+ * Compile error: the address of `void sigusr2_handle(int)', will
+ always evaluate as `true'
+ * The hex/dec I/O format operators is in the std namespace
+ * Convert debug statements to debugs
+ * Adding a comment that tests/testUfs will fail when 'heap' is
+ the only
+ * Change diskd default DebugLevel to 0
+ * Bug #1940: assertion failed: store.cc:850
+ * Amos Jeffries' tidyup of the debugging sections.
+ * unit testing fix for tests/testCoss.cc
+ * Fix tests/testCoss; storeSwapOut is now StoreEntry::swapOut
+ * Fix 'unknown http status code in reply' for status 408 replies
+ * SQUID_HELPER define for including squid.h from helpers
+ * Reserver the oa and ot logformat tags for outgoing address/tos.
+ * Fix for compiling src/unlinkd.cc with kqueue and epoll.
+ * Fix 'make check' for --disable-unlinkd
+ * Fixed "ftpReadTransferDone: Got code 426 after reading data"
+ SEGV
+ * Fix "store_status == STORE_PENDING" assertion in FTP with large
+ responses
+ * Fix compile-time issue related to removing getRaw() uses.
+ * Fix coredump bug when auth header contains invalid characters
+ * Convert most of the debug() to debugs()'s; just to see how
+ difficult it is.
+ * Bugfix from StoreEntry method conversion: hashInsert is now a
+ method
+ * Converted a more StoreEntry functions to class methods:
+ * Fix for --enable-cpu-profiling mode. Do not change PROF_start()
+ arg.
+ * Converted a few more StoreEntry functions to class methods:
+ * Changed storeAbort() into StoreEntry::abort()
+ * Removed some uses of RefCount::getRaw()
+ * Removed some uses of RefCount::getRaw()
+ * Removed some uses of RefCount::getRaw()
+ * Removed a bunch of code marked UNUSED_CODE, OLD, and
+ BROKEN_CODE
+ * Removing storeLowestMemReaderOffset() as unused.
+ * fix tests/testNull after storeSwapOut() becaome
+ StoreEntry::swapOut()
+ * Fix Squid <-> pinger communication.
+ * Fix NULL pointer bug when using netdb and test_reachability.
+ * Short StoreEntry::swapOut() does not compile when
+ SIZEOF_OFF_T==4
+ * Converted contentLen() to a StoreEntry class method.
+ * Converted three store_swapout.cc functions to StoreEntry class
+ methods
+ * unit testing fix for tests/testUfs.cc
+ * unit testing fix for tests/testNull.cc
+ * Imported updated WCCP v2 draft from the authors
+ * Converted contentLen() to a StoreEntry class method.
+ * Converted objectLen() to a StoreEntry class method.
+ * Rename cache_dir option read-only to no-store
+ * Removed FtpStateData::rest_att because is not used anywhere
+ * Add source code comments for retry-related functions in
+ forward.cc
+ * Bug #1935 fix: Do not retry a request after sending [some of]
+ its body.
+ * Remove cppunit from the Squid distribution
+ * Convert Czech/ERR_SHUTTING_DOWN error file from DOS to Unix
+ text format.
+ * Convert Traditional Chinese error files from DOS to Unix text
+ format.
+ * Bug #1630: TPROXY needs porting from 2.6 to 3.x
+ * Added 'store_log_tags' cache manager page. It reports counts of
+ tags that
+ * Added 'service_times' cachemgr page to report service time
+ percentiles
+ * Adding a perl script that can send HTCP queries
+ * - Some test cases were missing AsyncCall.cc source, causing
+ "make check"
+ * The return value of comm_udp_recvfrom() must be stored into a
+ signed
+ * Reverted revision 1.442 change that was supposed to fix
+ * The --enable-truncate and USE_TRUNCATE code has been removed.
+ * Bug #1475: Filedescriptor limit does not need to be hardcoded
+ for kqueue/epoll
+ * fixed cbdata "cookie" assertion. peer_digest was unlocking
+ peer, but did
+ * minor debugging fix. There was newline in <<
+ * Fixed SEGV during reconfigure due to NULL pointer bug in
+ eventDelete()
+ * A fix for the !flags.write_draining assertion. Due to the way
+ diskd
+ * Comment out some debugging messages that are printed before
+ cache_log
+ * solve some strange negative integer to double conversion bug by
+ casting
+ * Fixed disk file leak. UFS-based disk files were not always
+ closed
+ * This change should fix bug #1829.
+ * Added reporting of swap and memory usage (%used, %free) to
+ cachemgr info
+ * This change should fix bug #1837: Segfault on configuration
+ error
+ * This change should fix bug #1898: "assertion failed:
+ tunnel.cc:372"
+ * This change should fix bug #1637.
+ * Fix some HttpMsg lock counting bugs in HTCP.
+ * backout an assertion mistakenly added by last commit
+ * cache.log was being created as root, then would later fail to
+ open
+ * Fixed parsing diskd cache_dir Q1 and Q2 options
+ * Since I changed the semantics of store_dirs_rebuilding
+ yesterday (to match
+ * - Bug #1356: Close open DNS sockets when doing idnsShutdown.
+ Leaving them
+ * store_dirs_rebuilding should be initialized to 1
+ * Forward port of 2.x changes from Duane:
+ * Cosmetic fix: added missing newline in WCCPv2 configuration
+ dump.
+ * Bug #1931: allow_underscore directive not available in Squid
+ 3.0
+ * Fixed build error on Windows
+ * Always use xisxxxx() Squid defined macros instead of ctype
+ functions.
+ * - bootsrap.sh | ./cleanpatch
+ * - Added Axel Westerhold for his ICAP patches.
+ * - ICAP-unrelated improvements from the squid3-icap branch on SF
+ * - Replaced BodyReader with BodyPipe. BodyReader was a
+ * - Added basic support for asynchronous calls. The calls are
+ * - Support printing refcounted pointers to ostreams. When
+ * IPV6 DNS and address formats RFCs
+ * Subversion request methods
+ * Bug #1908: store*DirRebuildFromSwapLog() ignores some
+ SWAP_LOG_DEL entries
+ * Remove more traces of wais
+ * Kill the psuedo-support for wais. Was never really implemented.
+ * automake no longer recommends mkinstalldirs. Remove it from the
+ distribution.
+ * draft-jaganathan-kerberos-http has been published as RFC4559
+ * Bug #1420: 302 responses with an Expires header is always
+ cached
+ * Bug #1787: Objects stuck in cache if origin server clock in
+ future
+ * Clean up relations between TCP probing and DNS checks of peers
+ with no known addresses.
+ * Need to initialize neighbors even if not using ICP.
+ * minor printf typo "%ud" should be "%u"
+ * Two versions of DiskdIOStrategy::send() had a lot of duplicated
+ code.
+ * Bug #1865: deny_info redirection with authentication related
+ acls
+ * unlinkdClose() should be called after (not before)
+ Store::Root().sync()
+ * 2.6.STABLE is in branch SQUID_2_6
+ * Squid-2.6 branched from Squid-2 HEAD
+ * Bug #1873: authenticateNTLMFixErrorHeader: state 4.
+ * Bug #1828: squid.conf docutemtation error for proxy_auth digest
+ * Specifi LDADD for tcp-banger2 as it doesn't have much
+ dependencies
+ * Cleanup of AuthUserRequest->lastReply to keep ACL_AUTHENTICATED
+ state
+ * Move the AuthUser ip_list management to AuthUser where it
+ belongs.
+ * Bug #1792: max_user_ip not working with ntlm_auth
++++ 117 more lines (skipped)
++++ between squid-beta/squid-beta.changes
++++ and /mounts/work_src_done/STABLE/squid-beta/squid-beta.changes
Old:
----
squid-3.0.PRE5-RELEASENOTES.html
squid-3.0.PRE5.tar.bz2
New:
----
10789.patch
10790.patch
10791.patch
10792.patch
10796.patch
10797.patch
10798.patch
10800.patch
10801.patch
10802.patch
10803.patch
10804.patch
10805.patch
10806.patch
10808.patch
10809.patch
10811.patch
10812.patch
10813.patch
10814.patch
10815.patch
10816.patch
10817.patch
10818.patch
10820.patch
10821.patch
10822.patch
10823.patch
10824.patch
10825.patch
10826.patch
10827.patch
10828.patch
10829.patch
10830.patch
10831.patch
10832.patch
10833.patch
10834.patch
10836.patch
10837.patch
10838.patch
10839.patch
10840.patch
10841.patch
10843.patch
10844.patch
10845.patch
10846.patch
10848.patch
squid-3.0.PRE6-RELEASENOTES.html
squid-3.0.PRE6.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ squid-beta.spec ++++++
--- /var/tmp/diff_new_pack.Zx5490/_old 2007-06-14 16:33:26.000000000 +0200
+++ /var/tmp/diff_new_pack.Zx5490/_new 2007-06-14 16:33:26.000000000 +0200
@@ -13,9 +13,9 @@
BuildRequires: expat gcc-c++ krb5 libexpat-devel libxml2-devel openldap2 openldap2-devel opensp-devel pam-devel sharutils
Summary: Squid V3.0 WWW Proxy Server (new version)
Version: 3.0
-Release: 314
+Release: 324
License: GNU General Public License (GPL)
-%define ver PRE5
+%define ver PRE6
URL: http://www.squid-cache.org
Group: Productivity/Networking/Web/Proxy
Requires: logrotate
@@ -32,7 +32,7 @@
#%define squid_ldapauth_version 1.3
#Source1: squid_ldapauth-%{squid_ldapauth_version}.tar.bz2
Source2: rc.squid
-Source3: squid-3.0.PRE5-RELEASENOTES.html
+Source3: squid-3.0.PRE6-RELEASENOTES.html
Source5: pam.squid
Source6: unsquid.pl
Source7: squid.logrotate
@@ -40,72 +40,63 @@
Source10: pconn.h
Patch: squid-2.5.dif
#
-# The following patches are problematic: don't apply, are incomplete, etc.
-# So I choosed to download the latest complete tree for build, instead of
-# individual applying; squid team encouraged me to do so.
+# the following patches are downloaded directly from the webserver
+# don't change the names for easier identification
#
-# So forget the patches, they are only named for the sake of completeness
+# 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/10789.patch
+Patch02: http://www.squid-cache.org/Versions/v3/3.0/changesets/10790.patch
+Patch03: http://www.squid-cache.org/Versions/v3/3.0/changesets/10791.patch
+Patch04: http://www.squid-cache.org/Versions/v3/3.0/changesets/10792.patch
+Patch05: http://www.squid-cache.org/Versions/v3/3.0/changesets/10796.patch
+Patch06: http://www.squid-cache.org/Versions/v3/3.0/changesets/10797.patch
+Patch07: http://www.squid-cache.org/Versions/v3/3.0/changesets/10798.patch
+Patch08: http://www.squid-cache.org/Versions/v3/3.0/changesets/10800.patch
+Patch09: http://www.squid-cache.org/Versions/v3/3.0/changesets/10801.patch
+Patch10: http://www.squid-cache.org/Versions/v3/3.0/changesets/10802.patch
+Patch11: http://www.squid-cache.org/Versions/v3/3.0/changesets/10803.patch
+Patch12: http://www.squid-cache.org/Versions/v3/3.0/changesets/10804.patch
+Patch13: http://www.squid-cache.org/Versions/v3/3.0/changesets/10805.patch
+Patch14: http://www.squid-cache.org/Versions/v3/3.0/changesets/10806.patch
+Patch15: http://www.squid-cache.org/Versions/v3/3.0/changesets/10808.patch
+Patch16: http://www.squid-cache.org/Versions/v3/3.0/changesets/10809.patch
+Patch17: http://www.squid-cache.org/Versions/v3/3.0/changesets/10811.patch
+Patch18: http://www.squid-cache.org/Versions/v3/3.0/changesets/10812.patch
+Patch19: http://www.squid-cache.org/Versions/v3/3.0/changesets/10813.patch
+Patch20: http://www.squid-cache.org/Versions/v3/3.0/changesets/10814.patch
+Patch21: http://www.squid-cache.org/Versions/v3/3.0/changesets/10815.patch
+Patch22: http://www.squid-cache.org/Versions/v3/3.0/changesets/10816.patch
+Patch23: http://www.squid-cache.org/Versions/v3/3.0/changesets/10817.patch
+Patch24: http://www.squid-cache.org/Versions/v3/3.0/changesets/10818.patch
+Patch25: http://www.squid-cache.org/Versions/v3/3.0/changesets/10820.patch
+Patch26: http://www.squid-cache.org/Versions/v3/3.0/changesets/10821.patch
+Patch27: http://www.squid-cache.org/Versions/v3/3.0/changesets/10822.patch
+Patch28: http://www.squid-cache.org/Versions/v3/3.0/changesets/10823.patch
+Patch29: http://www.squid-cache.org/Versions/v3/3.0/changesets/10824.patch
+Patch30: http://www.squid-cache.org/Versions/v3/3.0/changesets/10825.patch
+Patch31: http://www.squid-cache.org/Versions/v3/3.0/changesets/10826.patch
+Patch32: http://www.squid-cache.org/Versions/v3/3.0/changesets/10827.patch
+Patch33: http://www.squid-cache.org/Versions/v3/3.0/changesets/10828.patch
+Patch34: http://www.squid-cache.org/Versions/v3/3.0/changesets/10829.patch
+Patch35: http://www.squid-cache.org/Versions/v3/3.0/changesets/10830.patch
+Patch36: http://www.squid-cache.org/Versions/v3/3.0/changesets/10831.patch
+Patch37: http://www.squid-cache.org/Versions/v3/3.0/changesets/10832.patch
+Patch38: http://www.squid-cache.org/Versions/v3/3.0/changesets/10833.patch
+Patch39: http://www.squid-cache.org/Versions/v3/3.0/changesets/10834.patch
+Patch40: http://www.squid-cache.org/Versions/v3/3.0/changesets/10836.patch
+Patch41: http://www.squid-cache.org/Versions/v3/3.0/changesets/10837.patch
+Patch42: http://www.squid-cache.org/Versions/v3/3.0/changesets/10838.patch
+Patch43: http://www.squid-cache.org/Versions/v3/3.0/changesets/10839.patch
+Patch44: http://www.squid-cache.org/Versions/v3/3.0/changesets/10840.patch
+Patch45: http://www.squid-cache.org/Versions/v3/3.0/changesets/10841.patch
+Patch46: http://www.squid-cache.org/Versions/v3/3.0/changesets/10843.patch
+Patch47: http://www.squid-cache.org/Versions/v3/3.0/changesets/10844.patch
+Patch48: http://www.squid-cache.org/Versions/v3/3.0/changesets/10845.patch
+Patch49: http://www.squid-cache.org/Versions/v3/3.0/changesets/10846.patch
+Patch50: http://www.squid-cache.org/Versions/v3/3.0/changesets/10848.patch
#
-# Patch01: http://www.squid-cache.org/Versions/v3/3.0/bugs/squid-3.0.PRE3-pconn.patch
-# Patch02: http://www.squid-cache.org/Versions/v3/3.0/bugs/squid-3.0.PRE3-accel_cache_peer_name.patch
-# Patch03: http://www.squid-cache.org/Versions/v3/3.0/bugs/squid-3.0.PRE3-endian-bracket.patch
-# Patch04: http://www.squid-cache.org/Versions/v3/3.0/bugs/squid-3.0.PRE3-main-pid.patch
-# Patch05: http://www.squid-cache.org/Versions/v3/3.0/bugs/squid-3.0.PRE3-Solaris-gethostname.patch
-# Patch06: http://www.squid-cache.org/Versions/v3/3.0/bugs/squid-3.0.PRE3-ssl-session-reuse.patch
-# Patch07: squid-3.0.PRE3-hugeobjects-detection.patch
-# Patch08: http://www.squid-cache.org/Versions/v3/3.0/bugs/squid-3.0.PRE3-ncsa_auth_passwdfile.patch
-# Patch09: http://www.squid-cache.org/Versions/v3/3.0/bugs/squid-3.0.PRE3-access_log_none.patch
-# Patch10: http://www.squid-cache.org/Versions/v3/3.0/bugs/squid-3.0.PRE3-inprogressios.patch
-# Patch11: http://www.squid-cache.org/Versions/v3/3.0/bugs/squid-3.0.PRE3-coss-postmerge.patch
-# Patch12: http://www.squid-cache.org/Versions/v3/3.0/bugs/squid-3.0.PRE3-mount-sys-detection.patch
-# Patch13: http://www.squid-cache.org/Versions/v3/3.0/bugs/squid-3.0.PRE3-windows-dup2.patch
-# Patch14: http://www.squid-cache.org/Versions/v3/3.0/bugs/squid-3.0.PRE3-ufs-race.patch
-# Patch15: http://www.squid-cache.org/Versions/v3/3.0/bugs/squid-3.0.PRE3-debug-parsing.patch
-# Patch16: http://www.squid-cache.org/Versions/v3/3.0/bugs/squid-3.0.PRE3-coss-options.patch
-# Patch17: http://www.squid-cache.org/Versions/v3/3.0/bugs/squid-3.0.PRE3-cossParsing.patch
-# Patch18: http://www.squid-cache.org/Versions/v3/3.0/bugs/squid-3.0.PRE3-httpversion.patch
-# Patch19: http://www.squid-cache.org/Versions/v3/3.0/bugs/squid-3.0.PRE3-cbdatadebugleak.patch
-# Patch20: http://www.squid-cache.org/Versions/v3/3.0/bugs/squid-3.0.PRE3-PURIFY.patch
-# Patch21: http://www.squid-cache.org/Versions/v3/3.0/bugs/squid-3.0.PRE3-swapoutcbdata.patch
-# Patch22: http://www.squid-cache.org/Versions/v3/3.0/bugs/squid-3.0.PRE3-ftp_abort_closing.patch
-# Patch23: http://www.squid-cache.org/Versions/v3/3.0/bugs/squid-3.0.PRE3-https_accel_doc.patch
-# Patch24: http://www.squid-cache.org/Versions/v3/3.0/bugs/squid-3.0.PRE3-winbind.patch
-# Patch25: http://www.squid-cache.org/Versions/v3/3.0/bugs/squid-3.0.PRE3-memidle.patch
-# Patch26: http://www.squid-cache.org/Versions/v3/3.0/bugs/squid-3.0.PRE3-fqdnnegcache.patch
-# Patch27: http://www.squid-cache.org/Versions/v3/3.0/bugs/squid-3.0.PRE3-pam_auth.patch
-# Patch28: http://www.squid-cache.org/Versions/v3/3.0/bugs/squid-3.0.PRE3-cachemgr_accel.patch
-# Patch29: http://www.squid-cache.org/Versions/v3/3.0/bugs/squid-3.0.PRE3-digest_auth_pwchange.patch
-# Patch30: http://www.squid-cache.org/Versions/v3/3.0/bugs/squid-3.0.PRE3-originserver_port.patch
-# Patch31: http://www.squid-cache.org/Versions/v3/3.0/bugs/squid-3.0.PRE3-epoll-100cpu.patch
-# Patch32: http://www.squid-cache.org/Versions/v3/3.0/bugs/squid-3.0.PRE3-extacl_auth.patch
-# Patch33: http://www.squid-cache.org/Versions/v3/3.0/bugs/squid-3.0.PRE3-resolver-length.patch
-# Patch34: http://www.squid-cache.org/Versions/v3/3.0/bugs/squid-3.0.PRE3-russian.patch
-# Patch35: http://www.squid-cache.org/Versions/v3/3.0/bugs/squid-3.0.PRE3-synflood.patch
-# Patch36: http://www.squid-cache.org/Versions/v3/3.0/bugs/squid-3.0.PRE3-vary.patch
-# Patch37: http://www.squid-cache.org/Versions/v3/3.0/bugs/squid-3.0.PRE3-pconn-load.patch
-# Patch38: squid-3.0.PRE3-mime.patch
-# Patch39: http://www.squid-cache.org/Versions/v3/3.0/bugs/squid-3.0.PRE3-positive_dns_ttl.patch
-# Patch40: http://www.squid-cache.org/Versions/v3/3.0/bugs/squid-3.0.PRE3-pinger.patch
-# Patch41: http://www.squid-cache.org/Versions/v3/3.0/bugs/squid-3.0.PRE3-cache_peer_access_ntlm.patch
-# Patch42: http://www.squid-cache.org/Versions/v3/3.0/bugs/squid-3.0.PRE3-ldap_tls.patch
-# Patch43: http://www.squid-cache.org/Versions/v3/3.0/bugs/squid-3.0.PRE3-squidclient_auth.patch
-# Patch44: http://www.squid-cache.org/Versions/v3/3.0/bugs/squid-3.0.PRE3-ldap.patch
-# Patch45: http://www.squid-cache.org/Versions/v3/3.0/bugs/squid-3.0.PRE3-pconn_post.patch
-# Patch46: http://www.squid-cache.org/Versions/v3/3.0/bugs/squid-3.0.PRE3-pconn-lifo.patch
-# Patch47: http://www.squid-cache.org/Versions/v3/3.0/bugs/squid-3.0.PRE3-cache_peer_maxconn.patch
-# Patch48: http://www.squid-cache.org/Versions/v3/3.0/bugs/squid-3.0.PRE3-pid_filename_none.patch
-# Patch49: http://www.squid-cache.org/Versions/v3/3.0/bugs/squid-3.0.PRE3-partial_reload.patch
-# Patch50: http://www.squid-cache.org/Versions/v3/3.0/bugs/squid-3.0.PRE3-cache_swap_log.patch
-# Patch51: http://www.squid-cache.org/Versions/v3/3.0/bugs/squid-3.0.PRE3-dns_retransmit.patch
-# Patch52: http://www.squid-cache.org/Versions/v3/3.0/bugs/squid-3.0.PRE3-ftp_put.patch
-# Patch53: http://www.squid-cache.org/Versions/v3/3.0/bugs/squid-3.0.PRE3-ftp_telnet.patch
-# Patch54: http://www.squid-cache.org/Versions/v3/3.0/bugs/squid-3.0.PRE3-icon_urls.patch
-# Patch55: http://www.squid-cache.org/Versions/v3/3.0/bugs/squid-3.0.PRE3-ntlm_warning.patch
-# Patch56: http://www.squid-cache.org/Versions/v3/3.0/bugs/squid-3.0.PRE3-digest_passwd.patch
-# Patch57: http://www.squid-cache.org/Versions/v3/3.0/bugs/squid-3.0.PRE3-gcc34.patch
-# Patch58: http://www.squid-cache.org/Versions/v3/3.0/bugs/squid-3.0.PRE3-dns_error.patch
-# Patch59: http://www.squid-cache.org/Versions/v3/3.0/bugs/squid-3.0.PRE3-rfc1035NameUnpack.patch
-# Patch60: http://www.squid-cache.org/Versions/v3/3.0/bugs/
# Patch100: squid-3.0-gcc.patch
Patch101: squid-beta-3.0-libmxl2.patch
Patch102: squid-beta-3.0-64bit.patch
@@ -131,56 +122,56 @@
%setup -n squid-%{version}.%{ver}
cp -ai %{SOURCE10} src
%patch -p0
-# %patch1 -p1
-# %patch2 -p1
-# %patch3 -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
# %patch4 -p1
# %patch5 -p1
-# %patch6 -p1
+%patch6 -p1
# %patch7 -p1
-# %patch8 -p1
-# %patch9 -p1
-# %patch10 -p1
+%patch8 -p1
+%patch9 -p1
+%patch10 -p1
# %patch11 -p1
-# %patch12 -p1
-# %patch13 -p1
-# %patch14 -p1
-# %patch15 -p1
-# %patch16 -p1
-# %patch17 -p1
-# %patch18 -p1
-# %patch19 -p1
+%patch12 -p1
+%patch13 -p1
+%patch14 -p1
+%patch15 -p1
+%patch16 -p1
+%patch17 -p1
+%patch18 -p1
+%patch19 -p1
# %patch20 -p1
-# %patch21 -p1
-# %patch22 -p1
-# %patch23 -p1
-# %patch24 -p1
-# %patch25 -p1
-# %patch26 -p1
-# %patch27 -p1
-# %patch28 -p1
-# %patch29 -p1
-# %patch30 -p1
-# %patch31 -p1
-# %patch32 -p1
-# %patch33 -p1
-# %patch34 -p1
-# %patch35 -p1
-# %patch36 -p1
-# %patch37 -p1
-# %patch38 -p1
-# %patch39 -p1
-# %patch40 -p1
-# %patch41 -p1
-# %patch42 -p1
-# %patch43 -p1
-# %patch44 -p1
-# %patch45 -p1
-# %patch46 -p1
-# %patch47 -p1
-# %patch48 -p1
-# %patch49 -p1
-# %patch50 -p1
+%patch21 -p1
+%patch22 -p1
+%patch23 -p1
+%patch24 -p1
+%patch25 -p1
+%patch26 -p1
+%patch27 -p1
+%patch28 -p1
+%patch29 -p1
+%patch30 -p1
+%patch31 -p1
+%patch32 -p1
+%patch33 -p1
+%patch34 -p1
+%patch35 -p1
+%patch36 -p1
+%patch37 -p1
+%patch38 -p1
+%patch39 -p1
+%patch40 -p1
+%patch41 -p1
+%patch42 -p1
+%patch43 -p1
+%patch44 -p1
+%patch45 -p1
+%patch46 -p1
+%patch47 -p1
+%patch48 -p1
+%patch49 -p1
+%patch50 -p1
# %patch51 -p1
# %patch52 -p1
# %patch53 -p1
@@ -433,6 +424,317 @@
#%doc squid_ldapauth.conf
%changelog
+* Thu Jun 14 2007 - kssingvo@xxxxxxx
+- update to version 3.0PRE6:
+ * Preparing to release Squid-3.0.PRE6
+ * ICAPModXact needs to use the new AUTHUSERREQUESTLOCK() macro
+ * Fixed NULL pointer passed to xstrdup in AuthUser::username().
+ * Bug #1951: NTLM authentication does not work
+ * Fixed assertion at src/ACLChecklist.cc:200
+ * Fixed free() errors in AuthUser::~AuthUser()
+ * Fixed NULL pointer bug in new version of auth_ntlm.cc.
+ * Port of 2.6/changesets/11280.patch
+ * Removed auth_user_request_t typedef. Just use AuthUserRequest.
+ * Removed auth_user_request_t typedef. Just use AuthUserRequest.
+ * Removed unused ICAPClientStream code.
+ * Bug #1819 fix: retry the ICAP transaction when its pconn fails.
+ * Two unrelated changes: A failed ICAP RESPMOD transaction could
+ leave
+ * Make sure the entire response body gets to ICAP, even when the
+ * Bug #1819 fix in three parts: Retry failed ICAP pconns.
+ * If a consumer leaves without consuming anything, do not tell
+ * Added cbdataProtected parameter to control the last eventAdd
+ * Updated NTLM/Negotiate test clients, explaining a bit of their
+ use.
+ * Added HTTP status code 307 (Temporary Redirect) to
+ cacheableReply()
+ * Bug #1752: cbdata problems with storeRegisterAbort()
+ * FtpState should not call StoreEntry::unregisterAbort()
+ * Bug #1950: cachemgr requests for auth helper stats can crash
+ Squid
+ * Bug #1950: cachemgr requests for auth helper stats can crash
+ Squid
+ * Bug #1688: assertion when Squid filters HTTP headers
+ * Add HTTP status codes 416 and 417 to the list that Squid knows
+ about.
+ * FTP will no longer send REST command if offset exceeds size.
+ * Fixed "spec->length >= 0" assertion for FTP request with range
+ * Add HTTP status codes 416 and 417 to the list that Squid knows
+ about.
+ * Removed repeated assertion from httpHdrRangeRespSpecPackInto
+ * Avoid memory leaks when submitting a NULL helper.
+ * Removed casts from numeric types in debugs() statements.
+ * Fixed buffer overflow bug in whois.cc.
+ * Compile error: the address of `void sigusr2_handle(int)', will
+ always evaluate as `true'
+ * The hex/dec I/O format operators is in the std namespace
+ * Convert debug statements to debugs
+ * Adding a comment that tests/testUfs will fail when 'heap' is
+ the only
+ * Change diskd default DebugLevel to 0
+ * Bug #1940: assertion failed: store.cc:850
+ * Amos Jeffries' tidyup of the debugging sections.
+ * unit testing fix for tests/testCoss.cc
+ * Fix tests/testCoss; storeSwapOut is now StoreEntry::swapOut
+ * Fix 'unknown http status code in reply' for status 408 replies
+ * SQUID_HELPER define for including squid.h from helpers
+ * Reserver the oa and ot logformat tags for outgoing address/tos.
+ * Fix for compiling src/unlinkd.cc with kqueue and epoll.
+ * Fix 'make check' for --disable-unlinkd
+ * Fixed "ftpReadTransferDone: Got code 426 after reading data"
+ SEGV
+ * Fix "store_status == STORE_PENDING" assertion in FTP with large
+ responses
+ * Fix compile-time issue related to removing getRaw() uses.
+ * Fix coredump bug when auth header contains invalid characters
+ * Convert most of the debug() to debugs()'s; just to see how
+ difficult it is.
+ * Bugfix from StoreEntry method conversion: hashInsert is now a
+ method
+ * Converted a more StoreEntry functions to class methods:
+ * Fix for --enable-cpu-profiling mode. Do not change PROF_start()
+ arg.
+ * Converted a few more StoreEntry functions to class methods:
+ * Changed storeAbort() into StoreEntry::abort()
+ * Removed some uses of RefCount::getRaw()
+ * Removed some uses of RefCount::getRaw()
+ * Removed some uses of RefCount::getRaw()
+ * Removed a bunch of code marked UNUSED_CODE, OLD, and
+ BROKEN_CODE
+ * Removing storeLowestMemReaderOffset() as unused.
+ * fix tests/testNull after storeSwapOut() becaome
+ StoreEntry::swapOut()
+ * Fix Squid <-> pinger communication.
+ * Fix NULL pointer bug when using netdb and test_reachability.
+ * Short StoreEntry::swapOut() does not compile when
+ SIZEOF_OFF_T==4
+ * Converted contentLen() to a StoreEntry class method.
+ * Converted three store_swapout.cc functions to StoreEntry class
+ methods
+ * unit testing fix for tests/testUfs.cc
+ * unit testing fix for tests/testNull.cc
+ * Imported updated WCCP v2 draft from the authors
+ * Converted contentLen() to a StoreEntry class method.
+ * Converted objectLen() to a StoreEntry class method.
+ * Rename cache_dir option read-only to no-store
+ * Removed FtpStateData::rest_att because is not used anywhere
+ * Add source code comments for retry-related functions in
+ forward.cc
+ * Bug #1935 fix: Do not retry a request after sending [some of]
+ its body.
+ * Remove cppunit from the Squid distribution
+ * Convert Czech/ERR_SHUTTING_DOWN error file from DOS to Unix
+ text format.
+ * Convert Traditional Chinese error files from DOS to Unix text
+ format.
+ * Bug #1630: TPROXY needs porting from 2.6 to 3.x
+ * Added 'store_log_tags' cache manager page. It reports counts of
+ tags that
+ * Added 'service_times' cachemgr page to report service time
+ percentiles
+ * Adding a perl script that can send HTCP queries
+ * - Some test cases were missing AsyncCall.cc source, causing
+ "make check"
+ * The return value of comm_udp_recvfrom() must be stored into a
+ signed
+ * Reverted revision 1.442 change that was supposed to fix
+ * The --enable-truncate and USE_TRUNCATE code has been removed.
+ * Bug #1475: Filedescriptor limit does not need to be hardcoded
+ for kqueue/epoll
+ * fixed cbdata "cookie" assertion. peer_digest was unlocking
+ peer, but did
+ * minor debugging fix. There was newline in <<
+ * Fixed SEGV during reconfigure due to NULL pointer bug in
+ eventDelete()
+ * A fix for the !flags.write_draining assertion. Due to the way
+ diskd
+ * Comment out some debugging messages that are printed before
+ cache_log
+ * solve some strange negative integer to double conversion bug by
+ casting
+ * Fixed disk file leak. UFS-based disk files were not always
+ closed
+ * This change should fix bug #1829.
+ * Added reporting of swap and memory usage (%%used, %%free) to
+ cachemgr info
+ * This change should fix bug #1837: Segfault on configuration
+ error
+ * This change should fix bug #1898: "assertion failed:
+ tunnel.cc:372"
+ * This change should fix bug #1637.
+ * Fix some HttpMsg lock counting bugs in HTCP.
+ * backout an assertion mistakenly added by last commit
+ * cache.log was being created as root, then would later fail to
+ open
+ * Fixed parsing diskd cache_dir Q1 and Q2 options
+ * Since I changed the semantics of store_dirs_rebuilding
+ yesterday (to match
+ * - Bug #1356: Close open DNS sockets when doing idnsShutdown.
+ Leaving them
+ * store_dirs_rebuilding should be initialized to 1
+ * Forward port of 2.x changes from Duane:
+ * Cosmetic fix: added missing newline in WCCPv2 configuration
+ dump.
+ * Bug #1931: allow_underscore directive not available in Squid
+ 3.0
+ * Fixed build error on Windows
+ * Always use xisxxxx() Squid defined macros instead of ctype
+ functions.
+ * - bootsrap.sh | ./cleanpatch
+ * - Added Axel Westerhold for his ICAP patches.
+ * - ICAP-unrelated improvements from the squid3-icap branch on SF
+ * - Replaced BodyReader with BodyPipe. BodyReader was a
+ * - Added basic support for asynchronous calls. The calls are
+ * - Support printing refcounted pointers to ostreams. When
+ * IPV6 DNS and address formats RFCs
+ * Subversion request methods
+ * Bug #1908: store*DirRebuildFromSwapLog() ignores some
+ SWAP_LOG_DEL entries
+ * Remove more traces of wais
+ * Kill the psuedo-support for wais. Was never really implemented.
+ * automake no longer recommends mkinstalldirs. Remove it from the
+ distribution.
+ * draft-jaganathan-kerberos-http has been published as RFC4559
+ * Bug #1420: 302 responses with an Expires header is always
+ cached
+ * Bug #1787: Objects stuck in cache if origin server clock in
+ future
+ * Clean up relations between TCP probing and DNS checks of peers
+ with no known addresses.
+ * Need to initialize neighbors even if not using ICP.
+ * minor printf typo "%%ud" should be "%%u"
+ * Two versions of DiskdIOStrategy::send() had a lot of duplicated
+ code.
+ * Bug #1865: deny_info redirection with authentication related
+ acls
+ * unlinkdClose() should be called after (not before)
+ Store::Root().sync()
+ * 2.6.STABLE is in branch SQUID_2_6
+ * Squid-2.6 branched from Squid-2 HEAD
+ * Bug #1873: authenticateNTLMFixErrorHeader: state 4.
+ * Bug #1828: squid.conf docutemtation error for proxy_auth digest
+ * Specifi LDADD for tcp-banger2 as it doesn't have much
+ dependencies
+ * Cleanup of AuthUserRequest->lastReply to keep ACL_AUTHENTICATED
+ state
+ * Move the AuthUser ip_list management to AuthUser where it
+ belongs.
+ * Bug #1792: max_user_ip not working with ntlm_auth
+ * Bug #1857: Segmentation fault when accessing certain ftp://
+ URLs
+ * Bug #1858: digest_ldap_auth had some remains of old hash format
+ * Accept large dates >2^31. Seen for example in the Google logo.
+ * Fix the WCCPv2 mask assignment code to not crash as the value
+ assignments are built.
+ * Windows port: Fix build errors when using latest MinGW
+ environment
+ * Windows port: Fixed build error on MinGW using SSL support
+ * Added .cvsignore and config.test files to POP3 helper.
+ * Bug #1584: Unable to register with multiple WCCP2 routers
+ * Bug #1840: Disable digest and netdb queries to multicast peers
+ * Bug #439: Multicast ICP peering is unstable and considers most
+ peers dead
+ * Bug #1853: Support for ARP ACL on NetBSD
+ * Bug #1853: Support for ARP ACL on NetBSD
+ * Kill the obsolete -V command line option. Not working, and not
+ in line
+ * wccp2_router config fixes. Should not need to specify the port.
+ * Build the POP3 helper Makefile
+ * Bug #1839: Cosmetic debug message cleanup in
+ peerHandleHtcpReply.
+ * Simple POP3 basic auth helper querying a POP3 server
+ * Bug #1832: Error building squid-2.6.STABLE5 using
+ --enable-truncate
+ * Remove old/undefined variable from the profiling code.
+ * Add profiling points into the fd code to note how long is being
+ spent in syscalls.
+ * Fix off-by-one in the kqueue event assembly code; remove silly
+ extra comments from when I was <20..
+ * Add in explicit typecast to silence gcc 4.x printf warnings
+ under FreeBSD
+ * High-res profiling changes - nested profiling, recursive
+ profiling and profiling points
+ * Add support for the weight= parameter to round-robin peers
+ * Bug #1823: ntlm_auth/SMB/ntlm_auth.c fails to compile on some
+ platforms due to a syntax error
+ * Bug #1805: assertion failed: StatHist.c:195: "D[i] >= 0"
+ * Remove extra newline in redirect message sent by deny_info
+ http://... aclname
+ * Minor adjustment of the release process to match how the
+ changesets is generated
+ * Add back the -CVS signature on the version number in CVS
+- added the following official patches for this release:
+ * Kill old stale code dealing with deferred reads and delay
+ pools.
+ * Mark kqueue as experimental
+ * Clean up configure magics selecting which comm loop to use,
+ promote epoll to stable
+ * Bug #1939: --enable-epoll causes SSL to occationally hang
+ * Restore the code making helpers run in their own sessions.
+ * Database auth helper using Perl DBI
+ * Bug #1983: Update the read timeout when reading from an CONNECT
+ tunnel
+ * Bug #1983: Update the read timeout when reading from an CONNECT
+ tunnel
+ * Rename more SSL references to Tunnel in tunnel.cc
+ * Make tunnel.cc identify itself as tunnel and not ssl
+ * Bug #1976 fix: Do not check OPTIONS response specifics if the
+ response
+ * Rollback String API changes. Delayed to 3.1.
+ * Added 'clientside_tos' directive and feature.
+ * Adjust refresh_pattern min-age to make 0 mean 0, not 1 second
+ * URI-escape using the recommended upper case
+ * Kill the redundant url_convert_hex function.
+ * Equivalent to rfc1738_unescape
+ * Back out unintentional commit of unrelated url.cc changes
+ * Fix the cppunit tests to use setUp() rather than an static
+ constructor to
+ * Do not reuse a persistent ICAP connection if
+ icap_persistent_connections in
+ * The ICAP minimum for service_revival_delay and other OPTIONS
+ retries is
+ * Bug #1966 fix: Use rounded String MemPool sizes in the
+ hard-coded pool
+ * Bug #1967 fix: avoid new strncmp() that silently converts char*
+ buffers into
+ * Removed hopefully unused SIZEOF_CHUNK macro in preparation for
+ bug #1966 fix.
+ * %%URI external_acl_type tag for referencing the complete URI
+ * SqString.cc:198: error: cannot convert 'unsigned int*' to
+ 'size_t*' for argument '2' to 'void* memAllocString(size_t, si
+ * Load configure defines from src/cf_gen_defines
+ * Fix 1-off bug left after strnlen bug removal.
+ * Implement FreeBSD ipfw based ip transparent interception using
+ * Haren SqStrign copy-constructor.
+ * Fix old bug: append sometimes does not fully copy a string if
+ \0 exists in source
+ * Really remove String.cc and String.cci
+ * Convert three old known points of buffer voilation to use
+ protected code.
+ * Make string handle append (NULL) gracefully instead of core
+ dumping.
+ * Fix: Squid does not compile with --enable-storeio=coss
+ * Fixed assertion related to TCP_RESET feature
+ * Added some debugging to ClientHttpRequest::doCallouts()
+ * Fix compile errors slipped into ICAP on string API patch.
+ * SqString core apparently not automatically added to cvs by
+ patch.
+ * Add string API layer for better string handling.
+ * Add cfgman to Squid-3 snapshot generation
+ * Imported cf.data.pre -> HTML script from Squid-2.
+ * Fix reply header log format %%{header}<h. Was logging the
+ request headers...
+ * logformat %%rp logging the URL-Path only (excluding hostname)
+ * More magic to have the configuration manual published
+ * Move the delay pool parameters up before the MISC section (was
+ in the middle of it..)
+ * Update cfgman directory when making snapshots
+ * Add md5 sums to snapshots
+ * Bug #1957 fix: Close a persistent ICAP connection if we have to
+ open a
+ * Fixed "if (srv->flags.reserved = S_HELPER_FREE)" typo, assuming
+ it should have
+ * Replaced one more mem-> with direct mem_obj-> reference.
* Thu May 24 2007 - kssingvo@xxxxxxx
- moved cachemgr.cgi to %%{_libdir}/squid to make rpmlint happy
- removed errors directory from %%_docdir to make rpmlint happy
++++++ 10789.patch ++++++
---------------------
PatchSet 10789
Date: 2007/05/10 22:40:12
Author: hno
Branch: HEAD
Tag: (none)
Log:
Replaced one more mem-> with direct mem_obj-> reference.
Members:
src/store.cc:1.612->1.613
Index: squid3/src/store.cc
===================================================================
RCS file: /cvsroot/squid/squid3/src/store.cc,v
retrieving revision 1.612
retrieving revision 1.613
diff -u -r1.612 -r1.613
--- squid3/src/store.cc 7 May 2007 21:51:21 -0000 1.612
+++ squid3/src/store.cc 10 May 2007 22:40:12 -0000 1.613
@@ -1,6 +1,6 @@
/*
- * $Id: store.cc,v 1.612 2007/05/07 21:51:21 wessels Exp $
+ * $Id: store.cc,v 1.613 2007/05/10 22:40:12 hno Exp $
*
* DEBUG: section 20 Storage Manager
* AUTHOR: Harvest Derived
@@ -650,7 +650,7 @@
#if MORE_DEBUG_OUTPUT
if (EBIT_TEST(flags, RELEASE_REQUEST))
- debugs(20, 1, "assertion failed: RELEASE key " << key << ", url " << mem->url);
+ debugs(20, 1, "assertion failed: RELEASE key " << key << ", url " << mem_obj->url);
#endif
++++++ 10790.patch ++++++
---------------------
PatchSet 10790
Date: 2007/05/11 04:06:08
Author: rousskov
Branch: HEAD
Tag: (none)
Log:
Fixed "if (srv->flags.reserved = S_HELPER_FREE)" typo, assuming it should have
been "==" and not "!=".
Members:
src/helper.cc:1.84->1.85
Index: squid3/src/helper.cc
===================================================================
RCS file: /cvsroot/squid/squid3/src/helper.cc,v
retrieving revision 1.84
retrieving revision 1.85
diff -u -r1.84 -r1.85
--- squid3/src/helper.cc 9 May 2007 09:07:39 -0000 1.84
+++ squid3/src/helper.cc 11 May 2007 04:06:08 -0000 1.85
@@ -1,6 +1,6 @@
/*
- * $Id: helper.cc,v 1.84 2007/05/09 09:07:39 wessels Exp $
+ * $Id: helper.cc,v 1.85 2007/05/11 04:06:08 rousskov Exp $
*
* DEBUG: section 84 Helper process maintenance
* AUTHOR: Harvest Derived?
@@ -486,8 +486,8 @@
helperStatefulReleaseServer(helper_stateful_server * srv)
{
debugs(84, 3, HERE << "srv-" << srv->index << " flags.reserved = " << srv->flags.reserved);
- if (srv->flags.reserved = S_HELPER_FREE)
- return;
+ if (srv->flags.reserved == S_HELPER_FREE)
+ return;
srv->stats.releases++;
++++++ 10791.patch ++++++
---------------------
PatchSet 10791
Date: 2007/05/11 13:20:57
Author: rousskov
Branch: HEAD
Tag: (none)
Log:
Bug #1957 fix: Close a persistent ICAP connection if we have to open a
new connection because the transaction is not retriable.
This change avoids a growing number of open connections when many
transactions create persistent connections but only few are retriable
and can reuse them.
FwdState was already doing that. I moved FwdState logic to
PconnPool::pop so that any PconnPool user thinks about the problem and
benefits from the common solution. The change should have no material
affect on FwdState.
Members:
src/forward.cc:1.163->1.164
src/pconn.cc:1.50->1.51
src/pconn.h:1.3->1.4
src/ICAP/ICAPXaction.cc:1.14->1.15
Index: squid3/src/forward.cc
===================================================================
RCS file: /cvsroot/squid/squid3/src/forward.cc,v
retrieving revision 1.163
retrieving revision 1.164
diff -u -r1.163 -r1.164
--- squid3/src/forward.cc 30 Apr 2007 16:56:09 -0000 1.163
+++ squid3/src/forward.cc 11 May 2007 13:20:57 -0000 1.164
@@ -1,6 +1,6 @@
/*
- * $Id: forward.cc,v 1.163 2007/04/30 16:56:09 wessels Exp $
+ * $Id: forward.cc,v 1.164 2007/05/11 13:20:57 rousskov Exp $
*
* DEBUG: section 17 Request Forwarding
* AUTHOR: Duane Wessels
@@ -784,27 +784,20 @@
if (ftimeout < ctimeout)
ctimeout = ftimeout;
- if ((fd = fwdPconnPool->pop(host, port, domain, client_addr)) >= 0) {
- if (checkRetriable()) {
- debugs(17, 3, "fwdConnectStart: reusing pconn FD " << fd);
- server_fd = fd;
- n_tries++;
+ fd = fwdPconnPool->pop(host, port, domain, client_addr, checkRetriable());
+ if (fd >= 0) {
+ debugs(17, 3, "fwdConnectStart: reusing pconn FD " << fd);
+ server_fd = fd;
+ n_tries++;
- if (!fs->_peer)
- origin_tries++;
+ if (!fs->_peer)
+ origin_tries++;
- comm_add_close_handler(fd, fwdServerClosedWrapper, this);
+ comm_add_close_handler(fd, fwdServerClosedWrapper, this);
- dispatch();
+ dispatch();
- return;
- } else {
- /* Discard the persistent connection to not cause
- * an imbalance in number of connections open if there
- * is a lot of POST requests
- */
- comm_close(fd);
- }
+ return;
}
#if URL_CHECKSUM_DEBUG
Index: squid3/src/pconn.cc
===================================================================
RCS file: /cvsroot/squid/squid3/src/pconn.cc,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -r1.50 -r1.51
--- squid3/src/pconn.cc 30 Apr 2007 16:56:09 -0000 1.50
+++ squid3/src/pconn.cc 11 May 2007 13:20:57 -0000 1.51
@@ -1,6 +1,6 @@
/*
- * $Id: pconn.cc,v 1.50 2007/04/30 16:56:09 wessels Exp $
+ * $Id: pconn.cc,v 1.51 2007/05/11 13:20:57 rousskov Exp $
*
* DEBUG: section 48 Persistent Connections
* AUTHOR: Duane Wessels
@@ -266,11 +266,16 @@
}
/*
- * return a pconn fd for host:port, or -1 if none are available
+ * Return a pconn fd for host:port if available and retriable.
+ * Otherwise, return -1.
+ *
+ * We close available persistent connection if the caller transaction is not
+ * retriable to avoid having a growing number of open connections when many
+ * transactions create persistent connections but are not retriable.
*/
int
-PconnPool::pop(const char *host, u_short port, const char *domain, struct IN_ADDR *client_address)
+PconnPool::pop(const char *host, u_short port, const char *domain, struct IN_ADDR *client_address, bool isRetriable)
{
IdleConnList *list;
const char * aKey = key(host, port, domain, client_address);
@@ -285,6 +290,11 @@
{
list->clearHandlers(fd);
list->removeFD(fd); /* might delete list */
+
+ if (!isRetriable) {
+ comm_close(fd);
+ return -1;
+ }
}
return fd;
Index: squid3/src/pconn.h
===================================================================
RCS file: /cvsroot/squid/squid3/src/pconn.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- squid3/src/pconn.h 15 Apr 2007 14:46:17 -0000 1.3
+++ squid3/src/pconn.h 11 May 2007 13:20:57 -0000 1.4
@@ -49,7 +49,7 @@
void moduleInit();
void push(int fd, const char *host, u_short port, const char *domain, struct IN_ADDR *client_address);
- int pop(const char *host, u_short port, const char *domain, struct IN_ADDR *client_address);
+ int pop(const char *host, u_short port, const char *domain, struct IN_ADDR *client_address, bool retriable);
void count(int uses);
void dumpHist(StoreEntry *e);
void unlinkList(IdleConnList *list) const;
Index: squid3/src/ICAP/ICAPXaction.cc
===================================================================
RCS file: /cvsroot/squid/squid3/src/ICAP/ICAPXaction.cc,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- squid3/src/ICAP/ICAPXaction.cc 8 May 2007 16:32:12 -0000 1.14
+++ squid3/src/ICAP/ICAPXaction.cc 11 May 2007 13:20:57 -0000 1.15
@@ -102,26 +102,22 @@
const ICAPServiceRep &s = service();
- // if we cannot retry, we must not reuse pconns because of race conditions
- if (isRetriable) {
- // TODO: check whether NULL domain is appropriate here
- connection = icapPconnPool->pop(s.host.buf(), s.port, NULL, NULL);
-
- if (connection >= 0) {
- debugs(93,3, HERE << "reused pconn FD " << connection);
- connector = &ICAPXaction_noteCommConnected; // make doneAll() false
- eventAdd("ICAPXaction::reusedConnection",
- reusedConnection,
- this,
- 0.0,
- 0,
- true);
- return;
- }
-
- disableRetries(); // we only retry pconn failures
+ // TODO: check whether NULL domain is appropriate here
+ connection = icapPconnPool->pop(s.host.buf(), s.port, NULL, NULL, isRetriable);
+ if (connection >= 0) {
+ debugs(93,3, HERE << "reused pconn FD " << connection);
+ connector = &ICAPXaction_noteCommConnected; // make doneAll() false
+ eventAdd("ICAPXaction::reusedConnection",
+ reusedConnection,
+ this,
+ 0.0,
+ 0,
+ true);
+ return;
}
+ disableRetries(); // we only retry pconn failures
+
connection = comm_open(SOCK_STREAM, 0, getOutgoingAddr(NULL), 0,
COMM_NONBLOCKING, s.uri.buf());
++++++ 10792.patch ++++++
---------------------
PatchSet 10792
Date: 2007/05/12 16:36:37
Author: hno
Branch: HEAD
Tag: (none)
Log:
Add md5 sums to snapshots
Members:
mksnapshot-cron.sh:1.16->1.17
Index: squid3/mksnapshot-cron.sh
===================================================================
RCS file: /cvsroot/squid/squid3/mksnapshot-cron.sh,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- squid3/mksnapshot-cron.sh 24 Jan 2007 02:16:48 -0000 1.16
+++ squid3/mksnapshot-cron.sh 12 May 2007 16:36:37 -0000 1.17
@@ -32,17 +32,21 @@
type=`echo $file | sed -e 's/.*\.tar\.gz/.tar.gz/' -e 's/.*\.tar\.bz2/.tar.bz2/' -e 's/.*\.patch/.patch/' -e 's/.*\.diff/.diff/' -e 's/.*-RELEASENOTES.html/-RELEASENOTES.html/' -e 's/^.*ChangeLog.txt$/-ChangeLog.txt/'`
# move tarball
+ rm -f $dst/$file.md5
rm -f $dst/$file
+ md5 $file >$dst/$file.md5
cp -p $file $dst/$file
rm -f $file
# update snapshot symlink
rm -f $dst/squid-$ver.snapshot$type
ln -s $file $dst/squid-$ver.snapshot$type
+ rm -f $dst/squid-$ver.snapshot$type.md5
+ ln -s $file $dst/squid-$ver.snapshot$type.md5
# cleanup old snapshots
ls $dst/*-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]$type | sed -e 's/.*-\([0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'$type'\)/\1/' | sort -r | tail +$save | while read f; do
- rm -f $dst/*-$f
+ rm -f $dst/*-$f $dst/*-$f.md5
done
done
++++++ 10796.patch ++++++
---------------------
PatchSet 10796
Date: 2007/05/13 21:19:25
Author: hno
Branch: HEAD
Tag: (none)
Log:
Update cfgman directory when making snapshots
Members:
mksnapshot-cron.sh:1.18->1.19
Index: squid3/mksnapshot-cron.sh
===================================================================
RCS file: /cvsroot/squid/squid3/mksnapshot-cron.sh,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- squid3/mksnapshot-cron.sh 13 May 2007 11:14:24 -0000 1.18
+++ squid3/mksnapshot-cron.sh 13 May 2007 21:19:25 -0000 1.19
@@ -48,6 +48,14 @@
ls $dst/*-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]$type | sed -e 's/.*-\([0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'$type'\)/\1/' | sort -r | tail +$save | while read f; do
rm -f $dst/*-$f $dst/*-$f.md5
done
+
+ # Special cases
+ case $file in
+ *-cfgman.tar.gz)
+ mkdir -p $dst/cfgman
+ tar -C $dst/cfgman -zxf $dst/$file
+ ;;
+ esac
done
# update web page
++++++ 10797.patch ++++++
---------------------
PatchSet 10797
Date: 2007/05/13 21:27:50
Author: hno
Branch: HEAD
Tag: (none)
Log:
Move the delay pool parameters up before the MISC section (was in the middle of it..)
Members:
src/cf.data.pre:1.433->1.434
Index: squid3/src/cf.data.pre
===================================================================
RCS file: /cvsroot/squid/squid3/src/cf.data.pre,v
retrieving revision 1.433
retrieving revision 1.434
diff -u -r1.433 -r1.434
--- squid3/src/cf.data.pre 16 Apr 2007 22:10:49 -0000 1.433
+++ squid3/src/cf.data.pre 13 May 2007 21:27:50 -0000 1.434
@@ -1,6 +1,6 @@
#
-# $Id: cf.data.pre,v 1.433 2007/04/16 22:10:49 hno Exp $
+# $Id: cf.data.pre,v 1.434 2007/05/13 21:27:50 hno Exp $
#
#
# SQUID Web Proxy Cache http://www.squid-cache.org/
@@ -3221,6 +3221,190 @@
encodings.
DOC_END
+
+COMMENT_START
+ DELAY POOL PARAMETERS (all require DELAY_POOLS compilation option)
+ -----------------------------------------------------------------------------
+COMMENT_END
+
+NAME: delay_pools
+TYPE: delay_pool_count
+DEFAULT: 0
+IFDEF: DELAY_POOLS
+LOC: Config.Delay
+DOC_START
+ This represents the number of delay pools to be used. For example,
+ if you have one class 2 delay pool and one class 3 delays pool, you
+ have a total of 2 delay pools.
+DOC_END
+
+NAME: delay_class
+TYPE: delay_pool_class
+DEFAULT: none
+IFDEF: DELAY_POOLS
+LOC: Config.Delay
+DOC_START
+ This defines the class of each delay pool. There must be exactly one
+ delay_class line for each delay pool. For example, to define two
+ delay pools, one of class 2 and one of class 3, the settings above
+ and here would be:
+
+Example:
+ delay_pools 4 # 4 delay pools
+ delay_class 1 2 # pool 1 is a class 2 pool
+ delay_class 2 3 # pool 2 is a class 3 pool
+ delay_class 3 4 # pool 3 is a class 4 pool
+ delay_class 4 5 # pool 4 is a class 5 pool
+
+ The delay pool classes are:
+
+ class 1 Everything is limited by a single aggregate
+ bucket.
+
+ class 2 Everything is limited by a single aggregate
+ bucket as well as an "individual" bucket chosen
+ from bits 25 through 32 of the IP address.
+
+ class 3 Everything is limited by a single aggregate
+ bucket as well as a "network" bucket chosen
+ from bits 17 through 24 of the IP address and a
+ "individual" bucket chosen from bits 17 through
+ 32 of the IP address.
+
+ class 4 Everything in a class 3 delay pool, with an
+ additional limit on a per user basis. This
+ only takes effect if the username is established
+ in advance - by forcing authentication in your
+ http_access rules.
+
+ class 5 Requests are grouped according their tag (see
+ external_acl's tag= reply).
+
+ NOTE: If an IP address is a.b.c.d
+ -> bits 25 through 32 are "d"
+ -> bits 17 through 24 are "c"
+ -> bits 17 through 32 are "c * 256 + d"
+DOC_END
+
+NAME: delay_access
+TYPE: delay_pool_access
+DEFAULT: none
+IFDEF: DELAY_POOLS
+LOC: Config.Delay
+DOC_START
+ This is used to determine which delay pool a request falls into.
+
+ delay_access is sorted per pool and the matching starts with pool 1,
+ then pool 2, ..., and finally pool N. The first delay pool where the
+ request is allowed is selected for the request. If it does not allow
+ the request to any pool then the request is not delayed (default).
+
+ For example, if you want some_big_clients in delay
+ pool 1 and lotsa_little_clients in delay pool 2:
+
+Example:
+ delay_access 1 allow some_big_clients
+ delay_access 1 deny all
+ delay_access 2 allow lotsa_little_clients
+ delay_access 2 deny all
+ delay_access 3 allow authenticated_clients
+DOC_END
+
+NAME: delay_parameters
+TYPE: delay_pool_rates
+DEFAULT: none
+IFDEF: DELAY_POOLS
+LOC: Config.Delay
+DOC_START
+ This defines the parameters for a delay pool. Each delay pool has
+ a number of "buckets" associated with it, as explained in the
+ description of delay_class. For a class 1 delay pool, the syntax is:
+
+delay_parameters pool aggregate
+
+ For a class 2 delay pool:
+
+delay_parameters pool aggregate individual
+
+ For a class 3 delay pool:
+
+delay_parameters pool aggregate network individual
+
+ For a class 4 delay pool:
+
+delay_parameters pool aggregate network individual user
+
+ For a class 5 delay pool:
+
+delay_parameters pool tag
+
+ The variables here are:
+
+ pool a pool number - ie, a number between 1 and the
+ number specified in delay_pools as used in
+ delay_class lines.
+
+ aggregate the "delay parameters" for the aggregate bucket
+ (class 1, 2, 3).
+
+ individual the "delay parameters" for the individual
+ buckets (class 2, 3).
+
+ network the "delay parameters" for the network buckets
+ (class 3).
+
+ user the delay parameters for the user buckets
+ (class 4).
+
+ tag the delay parameters for the tag buckets
+ (class 5).
+
+ A pair of delay parameters is written restore/maximum, where restore is
+ the number of bytes (not bits - modem and network speeds are usually
+ quoted in bits) per second placed into the bucket, and maximum is the
+ maximum number of bytes which can be in the bucket at any time.
+
+ For example, if delay pool number 1 is a class 2 delay pool as in the
+ above example, and is being used to strictly limit each host to 64kbps
+ (plus overheads), with no overall limit, the line is:
+
+delay_parameters 1 -1/-1 8000/8000
+
+ Note that the figure -1 is used to represent "unlimited".
+
+ And, if delay pool number 2 is a class 3 delay pool as in the above
+ example, and you want to limit it to a total of 256kbps (strict limit)
+ with each 8-bit network permitted 64kbps (strict limit) and each
+ individual host permitted 4800bps with a bucket maximum size of 64kb
+ to permit a decent web page to be downloaded at a decent speed
+ (if the network is not being limited due to overuse) but slow down
+ large downloads more significantly:
+
+delay_parameters 2 32000/32000 8000/8000 600/8000
+
+ There must be one delay_parameters line for each delay pool.
+
+ Finally, for a class 4 delay pool as in the example - each user will
+ be limited to 128Kb no matter how many workstations they are logged into.:
+
+delay_parameters 4 32000/32000 8000/8000 600/64000 16000/16000
+DOC_END
+
+NAME: delay_initial_bucket_level
+COMMENT: (percent, 0-100)
+TYPE: ushort
+DEFAULT: 50
+IFDEF: DELAY_POOLS
+LOC: Config.Delay.initial
+DOC_START
+ The initial bucket percentage is used to determine how much is put
+ in each bucket when squid starts, is reconfigured, or first notices
+ a host accessing it (in class 2 and class 3, individual hosts and
+ networks only have buckets associated with them once they have been
+ "seen" by squid).
+DOC_END
+
+
COMMENT_START
MISCELLANEOUS
-----------------------------------------------------------------------------
@@ -4234,188 +4418,6 @@
DOC_END
-COMMENT_START
- DELAY POOL PARAMETERS (all require DELAY_POOLS compilation option)
- -----------------------------------------------------------------------------
-COMMENT_END
-
-NAME: delay_pools
-TYPE: delay_pool_count
-DEFAULT: 0
-IFDEF: DELAY_POOLS
-LOC: Config.Delay
-DOC_START
- This represents the number of delay pools to be used. For example,
- if you have one class 2 delay pool and one class 3 delays pool, you
- have a total of 2 delay pools.
-DOC_END
-
-NAME: delay_class
-TYPE: delay_pool_class
-DEFAULT: none
-IFDEF: DELAY_POOLS
-LOC: Config.Delay
-DOC_START
- This defines the class of each delay pool. There must be exactly one
- delay_class line for each delay pool. For example, to define two
- delay pools, one of class 2 and one of class 3, the settings above
- and here would be:
-
-Example:
- delay_pools 4 # 4 delay pools
- delay_class 1 2 # pool 1 is a class 2 pool
- delay_class 2 3 # pool 2 is a class 3 pool
- delay_class 3 4 # pool 3 is a class 4 pool
- delay_class 4 5 # pool 4 is a class 5 pool
-
- The delay pool classes are:
-
- class 1 Everything is limited by a single aggregate
- bucket.
-
- class 2 Everything is limited by a single aggregate
- bucket as well as an "individual" bucket chosen
- from bits 25 through 32 of the IP address.
-
- class 3 Everything is limited by a single aggregate
- bucket as well as a "network" bucket chosen
- from bits 17 through 24 of the IP address and a
- "individual" bucket chosen from bits 17 through
- 32 of the IP address.
-
- class 4 Everything in a class 3 delay pool, with an
- additional limit on a per user basis. This
- only takes effect if the username is established
- in advance - by forcing authentication in your
- http_access rules.
-
- class 5 Requests are grouped according their tag (see
- external_acl's tag= reply).
-
- NOTE: If an IP address is a.b.c.d
- -> bits 25 through 32 are "d"
- -> bits 17 through 24 are "c"
- -> bits 17 through 32 are "c * 256 + d"
-DOC_END
-
-NAME: delay_access
-TYPE: delay_pool_access
-DEFAULT: none
-IFDEF: DELAY_POOLS
-LOC: Config.Delay
-DOC_START
- This is used to determine which delay pool a request falls into.
-
- delay_access is sorted per pool and the matching starts with pool 1,
- then pool 2, ..., and finally pool N. The first delay pool where the
- request is allowed is selected for the request. If it does not allow
- the request to any pool then the request is not delayed (default).
-
- For example, if you want some_big_clients in delay
- pool 1 and lotsa_little_clients in delay pool 2:
-
-Example:
- delay_access 1 allow some_big_clients
- delay_access 1 deny all
- delay_access 2 allow lotsa_little_clients
- delay_access 2 deny all
- delay_access 3 allow authenticated_clients
-DOC_END
-
-NAME: delay_parameters
-TYPE: delay_pool_rates
-DEFAULT: none
-IFDEF: DELAY_POOLS
-LOC: Config.Delay
-DOC_START
- This defines the parameters for a delay pool. Each delay pool has
- a number of "buckets" associated with it, as explained in the
- description of delay_class. For a class 1 delay pool, the syntax is:
-
-delay_parameters pool aggregate
-
- For a class 2 delay pool:
-
-delay_parameters pool aggregate individual
-
- For a class 3 delay pool:
-
-delay_parameters pool aggregate network individual
-
- For a class 4 delay pool:
-
-delay_parameters pool aggregate network individual user
-
- For a class 5 delay pool:
-
-delay_parameters pool tag
-
- The variables here are:
-
- pool a pool number - ie, a number between 1 and the
- number specified in delay_pools as used in
- delay_class lines.
-
- aggregate the "delay parameters" for the aggregate bucket
- (class 1, 2, 3).
-
- individual the "delay parameters" for the individual
- buckets (class 2, 3).
-
- network the "delay parameters" for the network buckets
- (class 3).
-
- user the delay parameters for the user buckets
- (class 4).
-
- tag the delay parameters for the tag buckets
- (class 5).
-
- A pair of delay parameters is written restore/maximum, where restore is
- the number of bytes (not bits - modem and network speeds are usually
- quoted in bits) per second placed into the bucket, and maximum is the
- maximum number of bytes which can be in the bucket at any time.
-
- For example, if delay pool number 1 is a class 2 delay pool as in the
- above example, and is being used to strictly limit each host to 64kbps
- (plus overheads), with no overall limit, the line is:
-
-delay_parameters 1 -1/-1 8000/8000
-
- Note that the figure -1 is used to represent "unlimited".
-
- And, if delay pool number 2 is a class 3 delay pool as in the above
- example, and you want to limit it to a total of 256kbps (strict limit)
- with each 8-bit network permitted 64kbps (strict limit) and each
- individual host permitted 4800bps with a bucket maximum size of 64kb
- to permit a decent web page to be downloaded at a decent speed
- (if the network is not being limited due to overuse) but slow down
- large downloads more significantly:
-
-delay_parameters 2 32000/32000 8000/8000 600/8000
-
- There must be one delay_parameters line for each delay pool.
-
- Finally, for a class 4 delay pool as in the example - each user will
- be limited to 128Kb no matter how many workstations they are logged into.:
-
-delay_parameters 4 32000/32000 8000/8000 600/64000 16000/16000
-DOC_END
-
-NAME: delay_initial_bucket_level
-COMMENT: (percent, 0-100)
-TYPE: ushort
-DEFAULT: 50
-IFDEF: DELAY_POOLS
-LOC: Config.Delay.initial
-DOC_START
- The initial bucket percentage is used to determine how much is put
- in each bucket when squid starts, is reconfigured, or first notices
- a host accessing it (in class 2 and class 3, individual hosts and
- networks only have buckets associated with them once they have been
- "seen" by squid).
-DOC_END
-
NAME: incoming_icp_average
TYPE: int
DEFAULT: 6
++++++ 10798.patch ++++++
---------------------
PatchSet 10798
Date: 2007/05/13 22:35:04
Author: hno
Branch: HEAD
Tag: (none)
Log:
More magic to have the configuration manual published
Members:
mksnapshot-cron.sh:1.19->1.20
Index: squid3/mksnapshot-cron.sh
===================================================================
RCS file: /cvsroot/squid/squid3/mksnapshot-cron.sh,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- squid3/mksnapshot-cron.sh 13 May 2007 21:19:25 -0000 1.19
+++ squid3/mksnapshot-cron.sh 13 May 2007 22:35:04 -0000 1.20
@@ -55,6 +55,14 @@
mkdir -p $dst/cfgman
tar -C $dst/cfgman -zxf $dst/$file
;;
+ *-cfgman.html)
+ rm -f cfgman.html
+ ln -s $dst/$file cfgman.html
+ ;;
+ *-cfgman.html.gz)
+ rm -f cfgman.html.gz
+ ln -s $dst/$file cfgman.html.gz
+ ;;
esac
done
++++++ 10800.patch ++++++
---------------------
PatchSet 10800
Date: 2007/05/17 19:55:52
Author: hno
Branch: HEAD
Tag: (none)
Log:
Author: Emilio Casbas <ecasbas@xxxxxxx>
logformat %rp logging the URL-Path only (excluding hostname)
we need a "%ru" parameter like the httpd native log, that is showing;
/SI/images/servicios/normasdeuso/normas.swf instead of
http://X.X.X.60/SI/images/servicios/normasdeuso/normas.swf
I have done a small patch to have a new "rp" format code in order to
show only the urlpath in the access log.
Members:
src/access_log.cc:1.122->1.123
src/cf.data.pre:1.434->1.435
Index: squid3/src/access_log.cc
===================================================================
RCS file: /cvsroot/squid/squid3/src/access_log.cc,v
retrieving revision 1.122
retrieving revision 1.123
diff -u -r1.122 -r1.123
--- squid3/src/access_log.cc 28 Apr 2007 22:26:37 -0000 1.122
+++ squid3/src/access_log.cc 17 May 2007 19:55:52 -0000 1.123
@@ -1,6 +1,6 @@
/*
- * $Id: access_log.cc,v 1.122 2007/04/28 22:26:37 hno Exp $
+ * $Id: access_log.cc,v 1.123 2007/05/17 19:55:52 hno Exp $
*
* DEBUG: section 46 Access Log
* AUTHOR: Duane Wessels
@@ -364,6 +364,7 @@
LFT_REQUEST_METHOD,
LFT_REQUEST_URI,
+ LFT_REQUEST_URLPATH,
/*LFT_REQUEST_QUERY, * // * this is not needed. see strip_query_terms */
LFT_REQUEST_VERSION,
@@ -482,6 +483,7 @@
{"rm", LFT_REQUEST_METHOD},
{"ru", LFT_REQUEST_URI}, /* doesn't include the query-string */
+ {"rp", LFT_REQUEST_URLPATH}, /* doesn't include the host */
/* { "rq", LFT_REQUEST_QUERY }, * / / * the query-string, INCLUDING the leading ? */
{">v", LFT_REQUEST_VERSION},
{"rv", LFT_REQUEST_VERSION},
@@ -763,6 +765,13 @@
break;
+ case LFT_REQUEST_URLPATH:
+ if (al->request) {
+ out = al->request->urlpath.buf();
+ quote = 1;
+ }
+ break;
+
case LFT_REQUEST_VERSION:
snprintf(tmp, sizeof(tmp), "%d.%d", (int) al->http.version.major, (int) al->http.version.minor);
Index: squid3/src/cf.data.pre
===================================================================
RCS file: /cvsroot/squid/squid3/src/cf.data.pre,v
retrieving revision 1.434
retrieving revision 1.435
diff -u -r1.434 -r1.435
--- squid3/src/cf.data.pre 13 May 2007 21:27:50 -0000 1.434
+++ squid3/src/cf.data.pre 17 May 2007 19:55:52 -0000 1.435
@@ -1,6 +1,6 @@
#
-# $Id: cf.data.pre,v 1.434 2007/05/13 21:27:50 hno Exp $
+# $Id: cf.data.pre,v 1.435 2007/05/17 19:55:52 hno Exp $
#
#
# SQUID Web Proxy Cache http://www.squid-cache.org/
@@ -1235,6 +1235,7 @@
mt MIME content type
rm Request method (GET/POST etc)
ru Request URL
+ rp Request URL-Path excluding hostname
rv Request protocol version
et Tag returned by external acl
ea Log string returned by external acl
++++++ 10801.patch ++++++
---------------------
PatchSet 10801
Date: 2007/05/17 19:59:41
Author: hno
Branch: HEAD
Tag: (none)
Log:
Fix reply header log format %{header}<h. Was logging the request headers...
Members:
src/access_log.cc:1.123->1.124
Index: squid3/src/access_log.cc
===================================================================
RCS file: /cvsroot/squid/squid3/src/access_log.cc,v
retrieving revision 1.123
retrieving revision 1.124
diff -u -r1.123 -r1.124
--- squid3/src/access_log.cc 17 May 2007 19:55:52 -0000 1.123
+++ squid3/src/access_log.cc 17 May 2007 19:59:41 -0000 1.124
@@ -1,6 +1,6 @@
/*
- * $Id: access_log.cc,v 1.123 2007/05/17 19:55:52 hno Exp $
+ * $Id: access_log.cc,v 1.124 2007/05/17 19:59:41 hno Exp $
*
* DEBUG: section 46 Access Log
* AUTHOR: Duane Wessels
@@ -636,7 +636,7 @@
case LFT_REPLY_HEADER:
if (al->reply)
- sb = al->request->header.getByName(fmt->data.header.header);
+ sb = al->reply->header.getByName(fmt->data.header.header);
out = sb.buf();
@@ -656,7 +656,7 @@
case LFT_REPLY_HEADER_ELEM:
if (al->reply)
- sb = al->request->header.getByNameListMember(fmt->data.header.header, fmt->data.header.element, fmt->data.header.separator);
+ sb = al->reply->header.getByNameListMember(fmt->data.header.header, fmt->data.header.element, fmt->data.header.separator);
out = sb.buf();
++++++ 10802.patch ++++++
---------------------
PatchSet 10802
Date: 2007/05/18 00:43:28
Author: hno
Branch: HEAD
Tag: (none)
Log:
Imported cf.data.pre -> HTML script from Squid-2.
Imported changes:
2007/05/13 12:18:00 adrian +114 -0 Flesh out the beginnings of a cf.data.pre -> web interface.
2007/05/13 12:34:31 adrian +23 -2 Flesh out a little more for testing. I need to treat NAME entries with
2007/05/13 13:49:56 adrian +18 -2 Handle name aliases right.
2007/05/13 14:02:40 hno +6 -1 Add --out and --verbose command line options
2007/05/13 14:04:40 adrian +33 -32 Prepare for the actual page generating code.
2007/05/13 14:33:12 adrian +72 -19 Begin writing pages.
2007/05/13 14:43:50 adrian +8 -7 More HTML generation fixes.
2007/05/13 14:46:32 adrian +3 -2 Fix escaping.
2007/05/13 14:51:55 adrian +20 -3 Add in some more "full" template..
2007/05/13 14:58:40 adrian +15 -6 * try to show the aliases in the output; they're not yet working
2007/05/13 17:01:45 hno +133 -54 Get the ToC running, with raw section separators.
2007/05/13 21:12:56 hno +8 -0 Dump out the config manual while making snapshots
2007/05/13 21:13:14 hno +5 -3 Pick up the templates relative to the script location
2007/05/13 22:16:56 hno +108 -34 Hacked up a single page document mode
2007/05/13 22:28:49 hno +2 -0 Build single-page config manual as well as part of the snapshot process
2007/05/13 22:34:18 hno +2 -1 Compress the single-page config manual
2007/05/13 22:38:26 hno +1 -1 Correct format of single page configuration manual
2007/05/14 14:34:21 amosjeffries +102 -67 Fancy-Up the squid.conf documentation output.
2007/05/14 14:51:26 adrian +11 -2 Fix the templates to <pre>'ify suggested config.
2007/05/14 14:55:48 adrian +11 -1 Use the new format CSS now.
2007/05/14 15:16:31 adrian +16 -29 * remove the CSS stuff for now; eww.
2007/05/15 11:45:59 amosjeffries +9 -9 Fixed HTML structure somehow broken: <td> =>
Members:
scripts/www/build-cfg-help.pl:INITIAL->1.1
scripts/www/template.html:INITIAL->1.1
scripts/www/template_single.html:INITIAL->1.1
--- /dev/null Fri May 18 00:52:30 2007
+++ squid3/scripts/www/build-cfg-help.pl Fri May 18 00:52:30 2007
@@ -0,0 +1,348 @@
+#!/usr/bin/perl -w
+
+use strict;
+use IO::File;
+use Getopt::Long;
+
+# This mess is designed to parse the squid config template file
+# cf.data.pre and generate a set of HTML pages to use as documentation.
+#
+# Adrian Chadd <adrian@xxxxxxxxxxxxxxx>
+#
+# $Id: build-cfg-help.pl,v 1.1 2007/05/18 00:43:28 hno Exp $
+
+#
+# The template file is reasonably simple to parse. There's a number of
+# directives which delineate sections but there's no section delineation.
+# A section will "look" somewhat like this, most of the time:
+# NAME: <name>
+# IFDEF: <the ifdef bit>
+# TYPE: <the config type>
+# DEFAULT: <the default value>
+# LOC: <location in the Config struct>
+# DOC_START
+# documentation goes here
+# NOCOMMENT_START
+# stuff which goes verbatim into the config file goes here
+# NOCOMMENT_END
+# DOC_END
+#
+# Now, we can't assume its going to be nicely nested, so I'll say that
+# sections are delineated by NAME: lines, and then stuff is marked up
+# appropriately.
+#
+# Then we have to fake paragraph markups as well for the documentation.
+# We can at least use <PRE> type markups for the NOCOMMENT_START/_END stuff.
+
+#
+# Configuration sections are actually broken up by COMMENT_START/COMMENT_END
+# bits, which we can use in the top-level index page. Nifty!
+#
+
+# XXX NAME: can actually have multiple entries on it; we should generate
+# XXX a configuration index entry for each, linking back to the one entry.
+# XXX I'll probably just choose the first entry in the list.
+
+#
+# This code is ugly, but meh. We'll keep reading, line by line, and appending
+# lines into 'state' variables until the next NAME comes up. We'll then
+# shuffle everything off to a function to generate the page.
+
+
+my ($state) = "";
+my (%option);
+my (%all_names);
+my ($comment);
+
+my $version = "2.HEAD";
+my $verbose = '';
+my $path = "/tmp";
+my $format = "splithtml";
+my $pagetemplate;
+
+my ($index) = new IO::File;
+
+my $top = $0;
+$top =~ s%[^/]*$%%;
+
+GetOptions(
+ 'verbose' => \$verbose, 'v' => \$verbose,
+ 'out=s' => \$path,
+ 'version=s' => \$version,
+ 'format=s' => \$format
+ );
+
+if ($format eq "splithtml") {
+ $pagetemplate = "template.html";
+} elsif ($format eq "singlehtml") {
+ $pagetemplate = "template_single.html";
+}
+
+# XXX should implement this!
+sub uriescape($)
+{
+ my ($line) = @_;
+ return $line;
+}
+
+sub filename($)
+{
+ my ($name) = @_;
+ return $path . "/" . $name . ".html";
+}
+
+sub htmlescape($)
+{
+ my ($line) = @_;
+ return "" if !defined $line;
+ $line =~ s/([^\w\s])/sprintf ("&#%d;", ord ($1))/ge;
+ return $line;
+}
+
+sub section_link($)
+{
+ return uriescape($_[0]).".html" if $format eq "splithtml";
+ return "#".$_[0] if $format eq "singlehtml";
+}
+
+sub toc_link($)
+{
+ return "index.html#toc_".uriescape($_[0]) if $format eq "splithtml";
+ return "#toc_".uriescape($_[0]) if $format eq "singlehtml";
+}
+
+sub alpha_link($)
+{
+ return "index_all.html#toc_".uriescape($_[0]);
+}
+
+#
+# Yes, we could just read the template file in once..!
+#
+sub generate_page($$)
+{
+ my ($template, $data) = @_;
+ my $fh;
+ my $fh_open = 0;
+ # XXX should make sure the config option is a valid unix filename!
+ if ($format eq "splithtml") {
+ my ($fn) = filename($data->{'name'});
+ $fh = new IO::File;
+ $fh->open($fn, "w") || die "Couldn't open $fn: $!\n";
+ $fh_open = 1;
+ } else {
+ $fh = $index;
+ }
+
+
+ my ($th) = new IO::File;
+ $th->open($template, "r") || die "Couldn't open $template: $!\n";
+
+ # add in the local variables
+ $data->{"title"} = $data->{"name"};
+ $data->{"ldoc"} = $data->{"doc"};
+ $data->{"toc_link"} = toc_link($data->{"name"});
+ $data->{"alpha_link"} = alpha_link($data->{"name"});
+ if (exists $data->{"aliases"}) {
+ $data->{"aliaslist"} = join(", ", @{$data->{"aliases"}});
+ }
+ # XXX can't do this and then HTML escape..
+ # $data->{"ldoc"} =~ s/\n\n/<\/p>\n<p>\n/;
+ # XXX and the end-of-line formatting to turn single \n's into <BR>\n's.
+
+ while (<$th>) {
+ # Do variable substitution
+ s/%(.*?)%/htmlescape($data->{$1})/ge;
+ print $fh $_;
+ }
+ close $th;
+ undef $th;
+
+ if ($fh_open) {
+ close $fh;
+ undef $fh;
+ }
+}
+
+$index->open(filename("index"), "w") || die "Couldn't open ".filename("index").": $!\n" if ($format eq "splithtml");
+$index->open($path, "w") || die "Couldn't open ".filename("index").": $!\n" if ($format eq "singlehtml");
+print $index <<EOF
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="content-type" content="text/html; charset=utf-8" />
+ <title>Squid $version configuration file</title>
+ <meta name="keywords" content="squid squid.conf config configure" />
+ <meta name="description" content="Squid $version" />
+</head>
+<body>
+EOF
+;
+
+
+my ($name, $data);
+my (@chained);
+
+my $in_options = 0;
+sub start_option($)
+{
+ my ($name) = @_;
+ if (!$in_options) {
+ print $index "<ul>\n";
+ $in_options = 1;
+ }
+ print $index ' <li><a href="' . htmlescape(section_link($name)) . '" name="toc_' . htmlescape($name) . '">' . htmlescape($name) . "</a></li>\n";
+}
+sub end_options()
+{
+ return if !$in_options;
+ print $index "</ul>\n";
+ $in_options = 0;
+}
+while (<>) {
+ chomp;
+ last if (/^EOF$/);
+ if ($_ =~ /^NAME: (.*)$/) {
+ my (@aliases) = split(/ /, $1);
+ $data = {};
+ $data->{'version'} = $version;
+ foreach (@aliases) {
+ $all_names{$_} = $data;
+ }
+
+ $name = shift @aliases;
+
+ $option{$name} = $data;
+ $data->{'name'} = $name;
+ $data->{'aliases'} = \@aliases;
+
+ start_option($name);
+ print "DEBUG: new option: $name\n" if $verbose;
+ } elsif ($_ =~ /^COMMENT: (.*)$/) {
+ $data->{"comment"} = $1;
+ } elsif ($_ =~ /^TYPE: (.*)$/) {
+ $data->{"type"} = $1;
+ } elsif ($_ =~ /^DEFAULT: (.*)$/) {
+ if ($1 eq "none") {
+ $data->{"default"} = "$1";
+ } else {
+ $data->{"default"} = "$name $1";
+ }
+ } elsif ($_ =~ /^LOC:(.*)$/) {
+ $data->{"loc"} = $1;
+ $data->{"loc"} =~ s/^[\s\t]*//;
+ } elsif ($_ =~ /^DOC_START$/) {
+ $state = "doc";
+ } elsif ($_ =~ /^DOC_END$/) {
+ $state = "";
+ my $othername;
+ foreach $othername (@chained) {
+ $option{$othername}{'doc'} = $data->{'doc'};
+ }
+ undef @chained;
+ } elsif ($_ =~ /^DOC_NONE$/) {
+ push(@chained, $name);
+ } elsif ($_ =~ /^NOCOMMENT_START$/) {
+ $state = "nocomment";
+ } elsif ($_ =~ /^DEFAULT_IF_NONE: (.*)$/) {
+ $data->{"default_if_none"} = $1;
+ } elsif ($_ =~ /^NOCOMMENT_END$/) {
+ $state = "";
+ } elsif ($_ =~ /^IFDEF: (.*)$/) {
+ $data->{"ifdef"} = $1;
+ } elsif ($_ =~ /^#/ && $state eq "doc") {
+ $data->{"config"} .= $_ . "\n";
+ } elsif ($state eq "nocomment") {
+ $data->{"config"} .= $_ . "\n";
+ } elsif ($state eq "doc") {
+ $data->{"doc"} .= $_ . "\n";
+ } elsif ($_ =~ /^COMMENT_START$/) {
+ end_options;
+ $state = "comment";
+ $comment = "";
+ } elsif ($_ =~ /^COMMENT_END$/) {
+ print $index "<pre>\n";
+ print $index $comment;
+ print $index "</pre>\n";
+ } elsif ($state eq "comment") {
+ $comment .= $_ . "\n";
+ } elsif (/^#/) {
+ next;
+ } elsif ($_ ne "") {
+ print "NOTICE: unknown line '$_'\n";
+ }
+}
+end_options;
+print $index "</ul>\n";
+print $index "<p><a href=\"index_all.html\">Alphabetic index</a></p>\n" if $format eq "splithtml";
+print $index "<p><a href=\"#index\">Alphabetic index</a></p>\n" if $format eq "singlehtml";
+print $index "<hr />\n" if $format eq "singlehtml";
+
+# and now, build the option pages
+my (@names) = keys %option;
+foreach $name (@names) {
+ generate_page("${top}${pagetemplate}", $option{$name});
+}
+
+# and now, the alpabetic index file!
+my $fh;
+my $fh_open = 0;
+
+if ($format eq "splithtml") {
+ $fh = new IO::File;
+ my ($indexname) = filename("index_all");
+ $fh->open($indexname, "w") || die "Couldn't open $indexname for writing: $!\n";
+ $fh_open = 1;
+ print $fh <<EOF
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="content-type" content="text/html; charset=utf-8" />
+ <title>Squid $version configuration file</title>
+ <meta name="keywords" content="squid squid.conf config configure" />
+ <meta name="description" content="Squid $version" />
+</head>
+<body>
+ <div id="header">
+ <div id="logo">
+ <h1><a href="http://www.squid-cache.org/"><span>Squid-</span>Cache.org</a></h1>
+ <h2>Optimising Web Delivery</h2>
+ </div>
+ </div>
+
+ <p>| <a href="index.html">Table of contents</a> |</p>
+
+ <h1>Alphabetic index of all options</h1>
+EOF
+;
+} elsif ($format eq "singlehtml") {
+ $fh = $index;
+ print $fh "<h2><a name=\"index\">Alphabetic index of all options</a></h2>\n";
+}
+
+print $fh "<ul>\n";
+
+foreach $name (sort keys %all_names) {
+ my ($data) = $all_names{$name};
+ print $fh ' <li><a href="' . uriescape($data->{'name'}) . '.html" name="toc_' . htmlescape($name) . '">' . htmlescape($name) . "</a></li>\n";
+}
+
+print $fh "</ul>\n";
+if ($fh_open) {
+print $fh <<EOF
+ <p>| <a href="index.html">Table of contents</a> |</p>
+ </body>
+</html>
+EOF
+;
+$fh->close;
+}
+undef $fh;
+
+print $index <<EOF
+ </body>
+</html>
+EOF
+;
+$index->close;
+undef $index;
--- /dev/null Fri May 18 00:52:30 2007
+++ squid3/scripts/www/template.html Fri May 18 00:52:30 2007
@@ -0,0 +1,54 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+ <title>Squid %version% Configuration File: %title%</title>
+ <meta name="keywords" content="squid squid.conf config configure %name%" />
+ <meta name="description" content="Squid %version% %name% " />
+</head>
+
+<body>
+
+ <p>
+ | <a href="%toc_link%">Index</a>
+ | <a href="%alpha_link%">Alphabetical Index</a> |
+ </p>
+
+ <table summary="%name%">
+ <tr>
+ <th>Option Name:</th><td><a name="%name%">%name%</a></td>
+ </tr>
+ <tr>
+ <th>Also Known As:</th><td>%aliaslist%</td>
+ </tr>
+ <tr>
+ <th>Requires:</th><td>%ifdef%</td>
+ </tr>
+ <tr>
+ <th>Default Value:</th><td>%default%</td>
+ </tr>
+ <tr>
+ <th>Suggested Config:</th>
+ <td>
+ <pre>
+%config%
+ </pre>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <pre>
+%ldoc%
+ </pre>
+ </td>
+ </tr>
+ <tr class="spacer"><td> </td></tr>
+ </table>
+
+ <p>
+ | <a href="%toc_link%">Index</a>
+ | <a href="%alpha_link%">Alphabetical Index</a> |
+ </p>
+
+ </body>
+</html>
--- /dev/null Fri May 18 00:52:30 2007
+++ squid3/scripts/www/template_single.html Fri May 18 00:52:30 2007
@@ -0,0 +1,32 @@
+
+ <h2>Option: <a href="%toc_link%" name="%name%">%name%</a></h2>
+ <table summary="%name%">
+ <tr>
+ <th>Option Name:</th><td><a name="%name%">%name%</a></td>
+ </tr>
+ <tr>
+ <th>Also Known As:</th><td>%aliaslist%</td>
+ </tr>
+ <tr>
+ <th>Compile Requires:</th><td>%ifdef%</td>
+ </tr>
+ <tr>
+ <th>Default Value:</th><td>%default%</td>
+ </tr>
+ <tr>
+ <th>Suggested Config:</th>
+ <td>
+ <pre>
+%config%
+ </pre>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <pre>
+%ldoc%
+ </pre>
+ </td>
+ </tr>
+ <tr class="spacer"><td> </td></tr>
+ </table>
++++++ 10803.patch ++++++
---------------------
PatchSet 10803
Date: 2007/05/18 01:26:43
Author: hno
Branch: HEAD
Tag: (none)
Log:
Add cfgman to Squid-3 snapshot generation
Members:
mksnapshot.sh:1.16->1.17
Index: squid3/mksnapshot.sh
===================================================================
RCS file: /cvsroot/squid/squid3/mksnapshot.sh,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- squid3/mksnapshot.sh 30 Dec 2005 02:26:32 -0000 1.16
+++ squid3/mksnapshot.sh 18 May 2007 01:26:43 -0000 1.17
@@ -47,6 +47,10 @@
else
cvs -q rdiff -u -r SQUID_`echo $VERSION | tr .- __` -r $tag $module >>${PACKAGE}-${VERSION}-${date}.diff || true
fi
+elif [ -f STABLE_BRANCH ]; then
+ stable=`cat STABLE_BRANCH`
+ echo "Differences from ${stable} to ${PACKAGE}-${VERSION}-${date}" >${PACKAGE}-${VERSION}-${date}.diff
+ cvs -q rdiff -u -r $stable -r $tag $module >>${PACKAGE}-${VERSION}-${date}.diff
fi
cd $startdir
@@ -70,3 +74,14 @@
fi
cp -p $tmpdir/ChangeLog ${PACKAGE}-${VERSION}-${date}-ChangeLog.txt
echo ${PACKAGE}-${VERSION}-${date}-ChangeLog.txt >>${tag}.out
+
+if [ -x $tmpdir/scripts/www/build-cfg-help.pl ]; then
+ make -C $tmpdir/src cf.data
+ mkdir -p $tmpdir/doc/cfgman
+ $tmpdir/scripts/www/build-cfg-help.pl -o $tmpdir/doc/cfgman $tmpdir/src/cf.data
+ sh -c "cd $tmpdir/doc/cfgman && tar -zcf $PWD/${PACKAGE}-${VERSION}-${date}-cfgman.tar.gz *"
+ echo ${PACKAGE}-${VERSION}-${date}-cfgman.tar.gz >>${tag}.out
+ $tmpdir/scripts/www/build-cfg-help.pl -o ${PACKAGE}-${VERSION}-${date}-cfgman.html -f singlehtml $tmpdir/src/cf.data
+ gzip -f -9 ${PACKAGE}-${VERSION}-${date}-cfgman.html
+ echo ${PACKAGE}-${VERSION}-${date}-cfgman.html.gz >>${tag}.out
+fi
++++++ 10804.patch ++++++
++++ 6685 lines (skipped)
++++++ 10805.patch ++++++
++++ 735 lines (skipped)
++++++ 10806.patch ++++++
---------------------
PatchSet 10806
Date: 2007/05/18 16:56:18
Author: amosjeffries
Branch: HEAD
Tag: (none)
Log:
Author: Tsantilos Christos <chtsanti@xxxxxxxxxxxxxxxxxxxxx>
Fix compile errors slipped into ICAP on string API patch.
Members:
src/SqString.cc:1.1->1.2
src/SqString.h:1.1->1.2
src/ICAP/ICAPXaction.cc:1.16->1.17
Index: squid3/src/SqString.cc
===================================================================
RCS file: /cvsroot/squid/squid3/src/SqString.cc,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- squid3/src/SqString.cc 18 May 2007 06:44:35 -0000 1.1
+++ squid3/src/SqString.cc 18 May 2007 16:56:18 -0000 1.2
@@ -1,6 +1,6 @@
/*
- * $Id: SqString.cc,v 1.1 2007/05/18 06:44:35 amosjeffries Exp $
+ * $Id: SqString.cc,v 1.2 2007/05/18 16:56:18 amosjeffries Exp $
*
* DEBUG: section 67 String
* AUTHOR: Duane Wessels
@@ -234,6 +234,14 @@
append (old.c_str(), old.len_);
}
+const char&
+SqString::operator [](unsigned int pos) const
+{
+ assert(pos < size_ );
+
+ return buf_[pos];
+}
+
char&
SqString::operator [](unsigned int pos)
{
Index: squid3/src/SqString.h
===================================================================
RCS file: /cvsroot/squid/squid3/src/SqString.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- squid3/src/SqString.h 18 May 2007 06:44:35 -0000 1.1
+++ squid3/src/SqString.h 18 May 2007 16:56:18 -0000 1.2
@@ -1,6 +1,6 @@
/*
- * $Id: SqString.h,v 1.1 2007/05/18 06:44:35 amosjeffries Exp $
+ * $Id: SqString.h,v 1.2 2007/05/18 16:56:18 amosjeffries Exp $
*
* DEBUG: section 67 String
* AUTHOR: Duane Wessels
@@ -99,6 +99,7 @@
_SQUID_INLINE_ int size() const;
_SQUID_INLINE_ char const * c_str() const;
+ const char& operator [](unsigned int) const;
char& operator [](unsigned int);
void clear();
Index: squid3/src/ICAP/ICAPXaction.cc
===================================================================
RCS file: /cvsroot/squid/squid3/src/ICAP/ICAPXaction.cc,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- squid3/src/ICAP/ICAPXaction.cc 18 May 2007 06:41:30 -0000 1.16
+++ squid3/src/ICAP/ICAPXaction.cc 18 May 2007 16:56:18 -0000 1.17
@@ -103,7 +103,7 @@
const ICAPServiceRep &s = service();
// TODO: check whether NULL domain is appropriate here
- connection = icapPconnPool->pop(s.host.buf(), s.port, NULL, NULL, isRetriable);
+ connection = icapPconnPool->pop(s.host.c_str(), s.port, NULL, NULL, isRetriable);
if (connection >= 0) {
debugs(93,3, HERE << "reused pconn FD " << connection);
connector = &ICAPXaction_noteCommConnected; // make doneAll() false
@@ -118,14 +118,8 @@
disableRetries(); // we only retry pconn failures
-<<<<<<< ICAPXaction.cc
- if (connection < 0) {
- connection = comm_open(SOCK_STREAM, 0, getOutgoingAddr(NULL), 0,
- COMM_NONBLOCKING, s.uri.c_str());
-=======
connection = comm_open(SOCK_STREAM, 0, getOutgoingAddr(NULL), 0,
- COMM_NONBLOCKING, s.uri.buf());
->>>>>>> 1.15
+ COMM_NONBLOCKING, s.uri.c_str());
if (connection < 0)
dieOnConnectionFailure(); // throws
@@ -173,12 +167,8 @@
if (reuseConnection) {
debugs(93,3, HERE << "pushing pconn" << status());
commSetTimeout(connection, -1, NULL, NULL);
-<<<<<<< ICAPXaction.cc
icapPconnPool->push(connection, theService->host.c_str(), theService->port, NULL, NULL);
-=======
- icapPconnPool->push(connection, theService->host.buf(), theService->port, NULL, NULL);
disableRetries();
->>>>>>> 1.15
} else {
debugs(93,3, HERE << "closing pconn" << status());
// comm_close will clear timeout
++++++ 10808.patch ++++++
---------------------
PatchSet 10808
Date: 2007/05/18 18:26:01
Author: wessels
Branch: HEAD
Tag: (none)
Log:
Added some debugging to ClientHttpRequest::doCallouts()
Members:
src/client_side_request.cc:1.86->1.87
Index: squid3/src/client_side_request.cc
===================================================================
RCS file: /cvsroot/squid/squid3/src/client_side_request.cc,v
retrieving revision 1.86
retrieving revision 1.87
diff -u -r1.86 -r1.87
--- squid3/src/client_side_request.cc 18 May 2007 06:41:23 -0000 1.86
+++ squid3/src/client_side_request.cc 18 May 2007 18:26:01 -0000 1.87
@@ -1,6 +1,6 @@
/*
- * $Id: client_side_request.cc,v 1.86 2007/05/18 06:41:23 amosjeffries Exp $
+ * $Id: client_side_request.cc,v 1.87 2007/05/18 18:26:01 wessels Exp $
*
* DEBUG: section 85 Client-side Request Routines
* AUTHOR: Robert Collins (Originally Duane Wessels in client_side.c)
@@ -1005,6 +1005,7 @@
assert(calloutContext);
if (!calloutContext->http_access_done) {
+ debugs(83, 3, HERE << "Doing calloutContext->clientAccessCheck()");
calloutContext->http_access_done = true;
calloutContext->clientAccessCheck();
return;
@@ -1012,6 +1013,7 @@
#if ICAP_CLIENT
if (TheICAPConfig.onoff && !calloutContext->icap_acl_check_done) {
+ debugs(83, 3, HERE << "Doing calloutContext->icapAccessCheck()");
calloutContext->icap_acl_check_done = true;
calloutContext->icapAccessCheck();
return;
@@ -1024,6 +1026,7 @@
assert(calloutContext->redirect_state == REDIRECT_NONE);
if (Config.Program.redirect) {
+ debugs(83, 3, HERE << "Doing calloutContext->clientRedirectStart()");
calloutContext->redirect_state = REDIRECT_PENDING;
calloutContext->clientRedirectStart();
return;
@@ -1031,6 +1034,7 @@
}
if (!calloutContext->interpreted_req_hdrs) {
+ debugs(83, 3, HERE << "Doing clientInterpretRequestHeaders()");
calloutContext->interpreted_req_hdrs = 1;
clientInterpretRequestHeaders(this);
}
@@ -1039,6 +1043,7 @@
calloutContext->no_cache_done = true;
if (Config.accessList.noCache && request->flags.cachable) {
+ debugs(83, 3, HERE << "Doing calloutContext->checkNoCache()");
calloutContext->checkNoCache();
return;
}
@@ -1052,6 +1057,7 @@
headersLog(0, 1, request->method, request);
#endif
+ debugs(83, 3, HERE << "calling processRequest()");
processRequest();
}
++++++ 10809.patch ++++++
---------------------
PatchSet 10809
Date: 2007/05/18 18:30:41
Author: wessels
Branch: HEAD
Tag: (none)
Log:
Fixed assertion related to TCP_RESET feature
When 'deny_info TCP_RESET' was used (and triggered), Squid asserted
in connNoteUseOfBuffer(). Because we called comm_reset_close() in
clientReplyContext::sendMoreData(), the ClientHttpRequest was freed
before http->doCallouts() returned. Thus we were accessing freed
memory and passing a bad value to connNoteUseOfBuffer().
I've moved the comm_reset_close() call from there to
clientProcessRequest(). I dont really like having it in
clientProcessRequest(), but it seems to be the only place that will
work. At least this way we can avoid the destroying ClientHttpRequest
before clientProcessRequest() reaches 'finish'.
Members:
src/client_side.cc:1.754->1.755
src/client_side_reply.cc:1.127->1.128
Index: squid3/src/client_side.cc
===================================================================
RCS file: /cvsroot/squid/squid3/src/client_side.cc,v
retrieving revision 1.754
retrieving revision 1.755
diff -u -r1.754 -r1.755
--- squid3/src/client_side.cc 18 May 2007 06:41:23 -0000 1.754
+++ squid3/src/client_side.cc 18 May 2007 18:30:41 -0000 1.755
@@ -1,6 +1,6 @@
/*
- * $Id: client_side.cc,v 1.754 2007/05/18 06:41:23 amosjeffries Exp $
+ * $Id: client_side.cc,v 1.755 2007/05/18 18:30:41 wessels Exp $
*
* DEBUG: section 33 Client-side Routines
* AUTHOR: Duane Wessels
@@ -2279,10 +2279,23 @@
http->calloutContext = new ClientRequestContext(http);
http->doCallouts();
-
+
finish:
if (!notedUseOfBuffer)
connNoteUseOfBuffer(conn.getRaw(), http->req_sz);
+
+ /*
+ * DPW 2007-05-18
+ * Moved the TCP_RESET feature from clientReplyContext::sendMoreData
+ * to here because calling comm_reset_close() causes http to
+ * be freed and the above connNoteUseOfBuffer() would hit an
+ * assertion, not to mention that we were accessing freed memory.
+ */
+ if (http->request->flags.resetTCP() && conn->fd > -1) {
+ debugs(33, 3, HERE << "Sending TCP RST on FD " << conn->fd);
+ comm_reset_close(conn->fd);
+ return;
+ }
}
static void
Index: squid3/src/client_side_reply.cc
===================================================================
RCS file: /cvsroot/squid/squid3/src/client_side_reply.cc,v
retrieving revision 1.127
retrieving revision 1.128
diff -u -r1.127 -r1.128
--- squid3/src/client_side_reply.cc 18 May 2007 06:41:23 -0000 1.127
+++ squid3/src/client_side_reply.cc 18 May 2007 18:30:41 -0000 1.128
@@ -1,6 +1,6 @@
/*
- * $Id: client_side_reply.cc,v 1.127 2007/05/18 06:41:23 amosjeffries Exp $
+ * $Id: client_side_reply.cc,v 1.128 2007/05/18 18:30:41 wessels Exp $
*
* DEBUG: section 88 Client-side Reply Routines
* AUTHOR: Robert Collins (Originally Duane Wessels in client_side.c)
@@ -1922,15 +1922,6 @@
/* update size of the request */
reqsize = reqofs;
- if (http->request->flags.resetTCP()) {
- /* yuck. FIXME: move to client_side.c */
-
- if (fd != -1)
- comm_reset_close(fd);
-
- return;
- }
-
if (errorInStream(result, reqofs)) {
sendStreamError(result);
return;
++++++ 10811.patch ++++++
---------------------
PatchSet 10811
Date: 2007/05/19 05:03:48
Author: amosjeffries
Branch: HEAD
Tag: (none)
Log:
Fix: Squid does not compile with --enable-storeio=coss
Members:
src/DiskIO/AIO/AIODiskFile.cc:1.4->1.5
Index: squid3/src/DiskIO/AIO/AIODiskFile.cc
===================================================================
RCS file: /cvsroot/squid/squid3/src/DiskIO/AIO/AIODiskFile.cc,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- squid3/src/DiskIO/AIO/AIODiskFile.cc 28 Apr 2007 22:26:40 -0000 1.4
+++ squid3/src/DiskIO/AIO/AIODiskFile.cc 19 May 2007 05:03:48 -0000 1.5
@@ -1,6 +1,6 @@
/*
- * $Id: AIODiskFile.cc,v 1.4 2007/04/28 22:26:40 hno Exp $
+ * $Id: AIODiskFile.cc,v 1.5 2007/05/19 05:03:48 amosjeffries Exp $
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
* ----------------------------------------------------------
@@ -85,10 +85,10 @@
{
/* Simulate async calls */
#ifdef _SQUID_WIN32_
- fd = aio_open(path.buf(), flags);
+ fd = aio_open(path.c_str(), flags);
#else
- fd = file_open(path.buf() , flags);
+ fd = file_open(path.c_str() , flags);
#endif
ioRequestor = callback;
++++++ 10812.patch ++++++
---------------------
PatchSet 10812
Date: 2007/05/19 06:31:00
Author: amosjeffries
Branch: HEAD
Tag: (none)
Log:
Make string handle append(NULL) gracefully instead of core dumping.
Members:
src/SqString.cc:1.2->1.3
Index: squid3/src/SqString.cc
===================================================================
RCS file: /cvsroot/squid/squid3/src/SqString.cc,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- squid3/src/SqString.cc 18 May 2007 16:56:18 -0000 1.2
+++ squid3/src/SqString.cc 19 May 2007 06:31:00 -0000 1.3
@@ -1,6 +1,6 @@
/*
- * $Id: SqString.cc,v 1.2 2007/05/18 16:56:18 amosjeffries Exp $
+ * $Id: SqString.cc,v 1.3 2007/05/19 06:31:00 amosjeffries Exp $
*
* DEBUG: section 67 String
* AUTHOR: Duane Wessels
@@ -215,7 +215,7 @@
void
SqString::append(char const *str)
{
- assert (str);
+ if(!str) return;
append (str, strlen(str));
}
++++++ 10813.patch ++++++
---------------------
PatchSet 10813
Date: 2007/05/19 06:49:12
Author: amosjeffries
Branch: HEAD
Tag: (none)
Log:
Convert three old known points of buffer voilation to use protected code.
Members:
src/SqString.cci:1.1->1.2
Index: squid3/src/SqString.cci
===================================================================
RCS file: /cvsroot/squid/squid3/src/SqString.cci,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- squid3/src/SqString.cci 18 May 2007 06:44:35 -0000 1.1
+++ squid3/src/SqString.cci 19 May 2007 06:49:12 -0000 1.2
@@ -1,6 +1,6 @@
/*
- * $Id: SqString.cci,v 1.1 2007/05/18 06:44:35 amosjeffries Exp $
+ * $Id: SqString.cci,v 1.2 2007/05/19 06:49:12 amosjeffries Exp $
*
* DEBUG: section 67 String
* AUTHOR: Duane Wessels
@@ -142,25 +142,22 @@
return strcmp(c_str(), aString.c_str());
}
-/* FIXME: this is can perform buffer overflows and underflows! */
void
SqString::set (char const *loc, char const ch)
{
- buf_[loc-buf_] = ch;
+ operator[](loc-buf_) = ch;
}
-/* FIXME: this is can perform buffer overflows and underflows! */
void
SqString::cut (size_t newLength)
{
+ operator[](newLength) = '\0';
len_ = newLength;
- buf_[newLength] = '\0';
}
-/* FIXME: this is can perform buffer overflows and underflows! */
void
SqString::cutPointer (char const *loc)
{
+ operator[](loc-buf_) = '\0';
len_ = loc-buf_;
- buf_[len_] = '\0';
}
++++++ 10814.patch ++++++
---------------------
PatchSet 10814
Date: 2007/05/19 09:36:43
Author: serassio
Branch: HEAD
Tag: (none)
Log:
Really remove String.cc and String.cci
Members:
src/String.cc:1.24->1.25(DEAD)
src/String.cci:1.7->1.8(DEAD)
++++++ 10815.patch ++++++
---------------------
PatchSet 10815
Date: 2007/05/19 14:51:14
Author: amosjeffries
Branch: HEAD
Tag: (none)
Log:
Fix old bug: append sometimes does not fully copy a string if \0 exists in source
This bug exists in the basic implementation of strncat(dst,src,len) which will only copy EITHER to len or first \0 character, whichever comes first.
In squid this only occurs only if the string internal buffer is large enough to hold the existing plus the new strings.
The buffer re-allocation code used proper xmemcpy which does not have this limitation.
Have now set both append() branches to use the same copy mechanism.
Members:
src/SqString.cc:1.3->1.4
Index: squid3/src/SqString.cc
===================================================================
RCS file: /cvsroot/squid/squid3/src/SqString.cc,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- squid3/src/SqString.cc 19 May 2007 06:31:00 -0000 1.3
+++ squid3/src/SqString.cc 19 May 2007 14:51:14 -0000 1.4
@@ -1,6 +1,6 @@
/*
- * $Id: SqString.cc,v 1.3 2007/05/19 06:31:00 amosjeffries Exp $
+ * $Id: SqString.cc,v 1.4 2007/05/19 14:51:14 amosjeffries Exp $
*
* DEBUG: section 67 String
* AUTHOR: Duane Wessels
@@ -186,7 +186,8 @@
return;
if (len_ + len < size_) {
- strncat(buf_, str, len);
+ operator[](len_+len) = '\0';
+ xmemcpy(buf_+len_, str, len);
len_ += len;
} else {
unsigned int ssz = len_ + len;
++++++ 10816.patch ++++++
---------------------
PatchSet 10816
Date: 2007/05/20 04:22:06
Author: amosjeffries
Branch: HEAD
Tag: (none)
Log:
Haren SqStrign copy-constructor.
Members:
src/SqString.cc:1.4->1.5
Index: squid3/src/SqString.cc
===================================================================
RCS file: /cvsroot/squid/squid3/src/SqString.cc,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- squid3/src/SqString.cc 19 May 2007 14:51:14 -0000 1.4
+++ squid3/src/SqString.cc 20 May 2007 04:22:06 -0000 1.5
@@ -1,6 +1,6 @@
/*
- * $Id: SqString.cc,v 1.4 2007/05/19 14:51:14 amosjeffries Exp $
+ * $Id: SqString.cc,v 1.5 2007/05/20 04:22:06 amosjeffries Exp $
*
* DEBUG: section 67 String
* AUTHOR: Duane Wessels
@@ -168,7 +168,7 @@
{
memset(this, 0, sizeof(SqString));
- init (old.c_str());
+ operator=(old);
#if DEBUGSTRINGS
SqStringRegistry::Instance().add(this);
++++++ 10817.patch ++++++
---------------------
PatchSet 10817
Date: 2007/05/20 04:22:43
Author: adrian
Branch: HEAD
Tag: (none)
Log:
Implement FreeBSD ipfw based ip transparent interception using
the getsockname() syscall. This returns the original destination
IP rather than the local server IP.
This behaviour existed in Squid-2 in the past; but was removed for some
reason.
Members:
configure.in:1.454->1.455
include/autoconf.h.in:1.167->1.168
src/IPInterception.cc:1.16->1.17
Index: squid3/configure.in
===================================================================
RCS file: /cvsroot/squid/squid3/configure.in,v
retrieving revision 1.454
retrieving revision 1.455
diff -u -r1.454 -r1.455
--- squid3/configure.in 13 May 2007 10:57:41 -0000 1.454
+++ squid3/configure.in 20 May 2007 04:22:43 -0000 1.455
@@ -1140,6 +1140,18 @@
AC_DEFINE(HTTP_VIOLATIONS, 0)
fi
+dnl Enable IPFW Transparent Proxy
+AC_ARG_ENABLE(ipfw-transparent,
+[ --enable-ipfw-transparent
+ Enable Transparent Proxy support for systems
+ using FreeBSD IPFW style redirection.],
+[ if test "$enableval" = "yes" ; then
+ echo "IPFW Transparent Proxy enabled"
+ AC_DEFINE(IPFW_TRANSPARENT,1,[Enable support for Transparent Proxy on systems using FreeBSD IPFW address redirection.])
+ IPFW_TRANSPARENT="yes"
+ fi
+])
+
dnl Enable IP-Filter Transparent Proxy
AC_ARG_ENABLE(ipf-transparent,
[ --enable-ipf-transparent
Index: squid3/include/autoconf.h.in
===================================================================
RCS file: /cvsroot/squid/squid3/include/autoconf.h.in,v
retrieving revision 1.167
retrieving revision 1.168
diff -u -r1.167 -r1.168
--- squid3/include/autoconf.h.in 15 Apr 2007 14:49:55 -0000 1.167
+++ squid3/include/autoconf.h.in 20 May 2007 04:22:44 -0000 1.168
@@ -725,6 +725,10 @@
/* Enable ICAP client features in Squid */
#undef ICAP_CLIENT
+/* Enable support for Transparent Proxy on systems using FreeBSD IPFW address
+ redirection. */
+#undef IPFW_TRANSPARENT
+
/* Enable support for Transparent Proxy on systems using IP-Filter address
redirection. This provides "masquerading" support for non Linux system. */
#undef IPF_TRANSPARENT
Index: squid3/src/IPInterception.cc
===================================================================
RCS file: /cvsroot/squid/squid3/src/IPInterception.cc,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- squid3/src/IPInterception.cc 28 Apr 2007 22:26:37 -0000 1.16
+++ squid3/src/IPInterception.cc 20 May 2007 04:22:45 -0000 1.17
@@ -1,6 +1,6 @@
/*
- * $Id: IPInterception.cc,v 1.16 2007/04/28 22:26:37 hno Exp $
+ * $Id: IPInterception.cc,v 1.17 2007/05/20 04:22:45 adrian Exp $
*
* DEBUG: section 89 NAT / IP Interception
* AUTHOR: Robert Collins
@@ -282,14 +282,29 @@
}
}
-#else
+#elif IPFW_TRANSPARENT
int
-
clientNatLookup(int fd, struct sockaddr_in me, struct sockaddr_in peer, struct sockaddr_in *dst)
{
- debugs(89, 1, "WARNING: transparent proxying not supported");
- return -1;
+ int ret;
+ struct sockaddr_in s;
+ int slen = sizeof(struct sockaddr_in);
+
+ ret = getsockname(fd, (struct sockaddr *) &s, (socklen_t * )&slen);
+ if (ret < 0) {
+ debugs(89, 1, "clientNatLookup: getpeername failed (fd " << fd << "), errstr " << xstrerror());
+ return -1;
+ }
+ *dst = s;
+ return 0;
}
+#else
+int
+clientNatLookup(int fd, struct sockaddr_in me, struct sockaddr_in peer, struct sockaddr_in *dst)
+{
+ debugs(89, 1, "WARNING: transparent proxying not supported");
+ return -1;
+}
#endif
++++++ 10818.patch ++++++
---------------------
PatchSet 10818
Date: 2007/05/20 08:29:44
Author: amosjeffries
Branch: HEAD
Tag: (none)
Log:
Fix 1-off bug left after strnlen bug removal.
Also:
* Harden memory allocations to SqString.
* Added more unit tests for strings.
Members:
src/SqString.cc:1.5->1.6
src/SqString.h:1.2->1.3
src/tests/testString.cc:1.3->1.4
src/tests/testString.h:1.2->1.3
Index: squid3/src/SqString.cc
===================================================================
RCS file: /cvsroot/squid/squid3/src/SqString.cc,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- squid3/src/SqString.cc 20 May 2007 04:22:06 -0000 1.5
+++ squid3/src/SqString.cc 20 May 2007 08:29:44 -0000 1.6
@@ -1,6 +1,6 @@
/*
- * $Id: SqString.cc,v 1.5 2007/05/20 04:22:06 amosjeffries Exp $
+ * $Id: SqString.cc,v 1.6 2007/05/20 08:29:44 amosjeffries Exp $
*
* DEBUG: section 67 String
* AUTHOR: Duane Wessels
@@ -40,16 +40,19 @@
void
SqString::initBuf(size_t sz)
{
+ size_t bsz;
PROF_start(StringInitBuf);
clear();
- buf_ = (char *)memAllocString(sz, &sz);
assert(sz < 65536);
- size_ = sz;
+ buf_ = (char *)memAllocString(sz, &bsz);
+ assert(bsz < 65536);
+ assert(bsz >= sz);
+ size_ = bsz;
PROF_stop(StringInitBuf);
}
void
-SqString::limitInit(const char *str, int len)
+SqString::limitInit(const char *str, unsigned int len)
{
PROF_start(StringLimitInit);
assert(this && str);
@@ -185,15 +188,16 @@
if(len < 1 || str == NULL)
return;
- if (len_ + len < size_) {
+ if ( (len_ + len +1) < size_) {
operator[](len_+len) = '\0';
xmemcpy(buf_+len_, str, len);
len_ += len;
} else {
unsigned int ssz = len_ + len;
unsigned int bsz = len_ + len + 1;
- char* tmp = (char *)memAllocString(ssz, &bsz);
+ char* tmp = (char *)memAllocString(bsz, &bsz);
assert(bsz < 65536);
+ assert(bsz > ssz);
if (buf_)
xmemcpy(tmp, buf_, len_);
@@ -201,7 +205,7 @@
if (len)
xmemcpy(tmp + len_, str, len);
- tmp[ssz + 1] = '\0';
+ tmp[ssz] = '\0';
clear();
@@ -232,7 +236,7 @@
void
SqString::append(SqString const &old)
{
- append (old.c_str(), old.len_);
+ append (old.c_str(), old.size());
}
const char&
Index: squid3/src/SqString.h
===================================================================
RCS file: /cvsroot/squid/squid3/src/SqString.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- squid3/src/SqString.h 18 May 2007 16:56:18 -0000 1.2
+++ squid3/src/SqString.h 20 May 2007 08:29:44 -0000 1.3
@@ -1,6 +1,6 @@
/*
- * $Id: SqString.h,v 1.2 2007/05/18 16:56:18 amosjeffries Exp $
+ * $Id: SqString.h,v 1.3 2007/05/20 08:29:44 amosjeffries Exp $
*
* DEBUG: section 67 String
* AUTHOR: Duane Wessels
@@ -135,7 +135,7 @@
#endif
- void limitInit(const char *str, int len);
+ void limitInit(const char *str, unsigned int len);
private:
void initBuf(size_t sz);
void init (char const *);
Index: squid3/src/tests/testString.cc
===================================================================
RCS file: /cvsroot/squid/squid3/src/tests/testString.cc,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- squid3/src/tests/testString.cc 18 May 2007 06:41:33 -0000 1.3
+++ squid3/src/tests/testString.cc 20 May 2007 08:29:44 -0000 1.4
@@ -123,7 +123,55 @@
cStr.append("rld\0 untroubled by things such as null termination", 10);
CPPUNIT_ASSERT( !cStr.empty() );
CPPUNIT_ASSERT_EQUAL( 18, cStr.size() );
- CPPUNIT_ASSERT_EQUAL( (string)"hello world\0 untr", cStr );
+ CPPUNIT_ASSERT( memcmp("hello world", cStr.c_str(), 11) == 0 );
+ CPPUNIT_ASSERT( memcmp("hello world\0", cStr.c_str(), 12) == 0 );
+ CPPUNIT_ASSERT( memcmp("hello world\0 untro", cStr.c_str(), 18) == 0 );
+ CPPUNIT_ASSERT( memcmp("hello world\0 untro\0", cStr.c_str(), 19) == 0 );
+}
+
+void
+testString::testAccess()
+{
+ string test;
+ test = "123456789a"; // to get a predictable length buffer.
+
+ CPPUNIT_ASSERT_EQUAL( test.size(), 10 );
+
+/* FIXME: flow checks do not seem to catch assert() sent from within code. */
+ /* underflow handling test: _should_ fail with core dump. */
+ /* this SHOULD be impossible due to unsigned type of parameter. */
+// CPPUNIT_ASSERT_ASSERTION_FAIL( CPPUNIT_ASSERT( test[-1] ) );
+
+ /* overflow handling test: _should_ fail with core dump. */
+// CPPUNIT_ASSERT_ASSERTION_FAIL( CPPUNIT_ASSERT( test[test.size()+10] ) );
+
+ /* [] access method (read and write) */
+ CPPUNIT_ASSERT( test[0] == '1' );
+ CPPUNIT_ASSERT( test[9] == 'a' );
+ CPPUNIT_ASSERT( test[10] == '\0' );
+
+ test.append('T');
+ CPPUNIT_ASSERT( test[10] == 'T' );
+ CPPUNIT_ASSERT( test[11] == '\0' );
+ CPPUNIT_ASSERT_EQUAL((string)"123456789aT", test);
+
+ /* Random access inside buffer. */
+ test[5] = 't';
+ CPPUNIT_ASSERT( test[5] == 't' );
+ CPPUNIT_ASSERT( test[11] == '\0' );
+ CPPUNIT_ASSERT_EQUAL((string)"12345t789aT", test);
+
+ /* border case at last position of string */
+ test[9] = 'E';
+ CPPUNIT_ASSERT( test[9] == 'E' );
+ CPPUNIT_ASSERT( test[11] == '\0' );
+ CPPUNIT_ASSERT_EQUAL((string)"12345t789ET", test);
+
+ /* border case at EOS position */
+ test[11] = 'F';
+ CPPUNIT_ASSERT( test[11] == 'F' );
+ CPPUNIT_ASSERT( test[12] == '\0' );
+ CPPUNIT_ASSERT_EQUAL((string)"12345t789ETF", test);
}
void
Index: squid3/src/tests/testString.h
===================================================================
RCS file: /cvsroot/squid/squid3/src/tests/testString.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- squid3/src/tests/testString.h 18 May 2007 06:41:33 -0000 1.2
+++ squid3/src/tests/testString.h 20 May 2007 08:29:44 -0000 1.3
@@ -20,6 +20,7 @@
CPPUNIT_TEST( testBooleans );
CPPUNIT_TEST( testAppend );
CPPUNIT_TEST( testAssignments );
+ CPPUNIT_TEST( testAccess );
CPPUNIT_TEST( testCstrMethods );
CPPUNIT_TEST( testSearch );
CPPUNIT_TEST_SUITE_END();
@@ -36,6 +37,7 @@
void testBooleans();
void testAppend();
void testAssignments();
+ void testAccess();
void testCstrMethods();
void testSearch();
};
++++++ 10820.patch ++++++
---------------------
PatchSet 10820
Date: 2007/05/21 23:31:37
Author: hno
Branch: HEAD
Tag: (none)
Log:
Load configure defines from src/cf_gen_defines
Members:
scripts/www/build-cfg-help.pl:1.1->1.2
Index: squid3/scripts/www/build-cfg-help.pl
===================================================================
RCS file: /cvsroot/squid/squid3/scripts/www/build-cfg-help.pl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- squid3/scripts/www/build-cfg-help.pl 18 May 2007 00:43:28 -0000 1.1
+++ squid3/scripts/www/build-cfg-help.pl 21 May 2007 23:31:37 -0000 1.2
@@ -3,13 +3,14 @@
use strict;
use IO::File;
use Getopt::Long;
+use File::Basename;
# This mess is designed to parse the squid config template file
# cf.data.pre and generate a set of HTML pages to use as documentation.
#
# Adrian Chadd <adrian@xxxxxxxxxxxxxxx>
#
-# $Id: build-cfg-help.pl,v 1.1 2007/05/18 00:43:28 hno Exp $
+# $Id: build-cfg-help.pl,v 1.2 2007/05/21 23:31:37 hno Exp $
#
# The template file is reasonably simple to parse. There's a number of
@@ -53,6 +54,7 @@
my (%option);
my (%all_names);
my ($comment);
+my (%defines);
my $version = "2.HEAD";
my $verbose = '';
@@ -62,8 +64,7 @@
my ($index) = new IO::File;
-my $top = $0;
-$top =~ s%[^/]*$%%;
+my $top = dirname($0);
GetOptions(
'verbose' => \$verbose, 'v' => \$verbose,
@@ -78,6 +79,16 @@
$pagetemplate = "template_single.html";
}
+# Load defines
+my ($df) = new IO::File;
+
+$df->open("$top/../../src/cf_gen_defines", "r") || die;
+while(<$df>) {
+ $defines{$1} = $2 if /define\["([^"]*)"\]="([^"]*)"/;
+}
+close $df;
+undef $df;
+
# XXX should implement this!
sub uriescape($)
{
@@ -134,6 +145,7 @@
$fh = $index;
}
+ $data->{"ifdef"} = $defines{$data->{"ifdef"}} if (exists $data->{"ifdef"} && exists $defines{$data->{"ifdef"}});
my ($th) = new IO::File;
$th->open($template, "r") || die "Couldn't open $template: $!\n";
@@ -199,6 +211,13 @@
print $index "</ul>\n";
$in_options = 0;
}
+sub section_heading($)
+{
+ my ($comment) = @_;
+ print $index "<pre>\n";
+ print $index $comment;
+ print $index "</pre>\n";
+}
while (<>) {
chomp;
last if (/^EOF$/);
@@ -261,9 +280,7 @@
$state = "comment";
$comment = "";
} elsif ($_ =~ /^COMMENT_END$/) {
- print $index "<pre>\n";
- print $index $comment;
- print $index "</pre>\n";
+ section_heading($comment);
} elsif ($state eq "comment") {
$comment .= $_ . "\n";
} elsif (/^#/) {
@@ -273,7 +290,6 @@
}
}
end_options;
-print $index "</ul>\n";
print $index "<p><a href=\"index_all.html\">Alphabetic index</a></p>\n" if $format eq "splithtml";
print $index "<p><a href=\"#index\">Alphabetic index</a></p>\n" if $format eq "singlehtml";
print $index "<hr />\n" if $format eq "singlehtml";
@@ -281,7 +297,7 @@
# and now, build the option pages
my (@names) = keys %option;
foreach $name (@names) {
- generate_page("${top}${pagetemplate}", $option{$name});
+ generate_page("${top}/${pagetemplate}", $option{$name});
}
# and now, the alpabetic index file!
++++++ 10821.patch ++++++
---------------------
PatchSet 10821
Date: 2007/05/22 01:15:55
Author: hno
Branch: HEAD
Tag: (none)
Log:
SqString.cc:198: error: cannot convert 'unsigned int*' to 'size_t*' for argument '2' to 'void* memAllocString(size_t, size_t*)'
Members:
src/SqString.cc:1.6->1.7
Index: squid3/src/SqString.cc
===================================================================
RCS file: /cvsroot/squid/squid3/src/SqString.cc,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- squid3/src/SqString.cc 20 May 2007 08:29:44 -0000 1.6
+++ squid3/src/SqString.cc 22 May 2007 01:15:55 -0000 1.7
@@ -1,6 +1,6 @@
/*
- * $Id: SqString.cc,v 1.6 2007/05/20 08:29:44 amosjeffries Exp $
+ * $Id: SqString.cc,v 1.7 2007/05/22 01:15:55 hno Exp $
*
* DEBUG: section 67 String
* AUTHOR: Duane Wessels
@@ -193,8 +193,8 @@
xmemcpy(buf_+len_, str, len);
len_ += len;
} else {
- unsigned int ssz = len_ + len;
- unsigned int bsz = len_ + len + 1;
+ size_t ssz = len_ + len;
+ size_t bsz = len_ + len + 1;
char* tmp = (char *)memAllocString(bsz, &bsz);
assert(bsz < 65536);
assert(bsz > ssz);
++++++ 10822.patch ++++++
---------------------
PatchSet 10822
Date: 2007/05/22 01:16:39
Author: hno
Branch: HEAD
Tag: (none)
Log:
%URI external_acl_type tag for referencing the complete URI
Members:
src/cf.data.pre:1.435->1.436
src/external_acl.cc:1.78->1.79
Index: squid3/src/cf.data.pre
===================================================================
RCS file: /cvsroot/squid/squid3/src/cf.data.pre,v
retrieving revision 1.435
retrieving revision 1.436
diff -u -r1.435 -r1.436
--- squid3/src/cf.data.pre 17 May 2007 19:55:52 -0000 1.435
+++ squid3/src/cf.data.pre 22 May 2007 01:16:39 -0000 1.436
@@ -1,6 +1,6 @@
#
-# $Id: cf.data.pre,v 1.435 2007/05/17 19:55:52 hno Exp $
+# $Id: cf.data.pre,v 1.436 2007/05/22 01:16:39 hno Exp $
#
#
# SQUID Web Proxy Cache http://www.squid-cache.org/
@@ -2050,6 +2050,7 @@
%IDENT Ident user name
%SRC Client IP
%SRCPORT Client source port
+ %URI Requested URI
%DST Requested host
%PROTO Requested protocol
%PORT Requested port
Index: squid3/src/external_acl.cc
===================================================================
RCS file: /cvsroot/squid/squid3/src/external_acl.cc,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -r1.78 -r1.79
--- squid3/src/external_acl.cc 18 May 2007 06:41:24 -0000 1.78
+++ squid3/src/external_acl.cc 22 May 2007 01:16:40 -0000 1.79
@@ -1,6 +1,6 @@
/*
- * $Id: external_acl.cc,v 1.78 2007/05/18 06:41:24 amosjeffries Exp $
+ * $Id: external_acl.cc,v 1.79 2007/05/22 01:16:40 hno Exp $
*
* DEBUG: section 82 External ACL
* AUTHOR: Henrik Nordstrom, MARA Systems AB
@@ -143,6 +143,7 @@
EXT_ACL_SRCPORT,
EXT_ACL_MYADDR,
EXT_ACL_MYPORT,
+ EXT_ACL_URI,
EXT_ACL_DST,
EXT_ACL_PROTO,
EXT_ACL_PORT,
@@ -337,6 +338,8 @@
format->type = _external_acl_format::EXT_ACL_MYADDR;
else if (strcmp(token, "%MYPORT") == 0)
format->type = _external_acl_format::EXT_ACL_MYPORT;
+ else if (strcmp(token, "%URI") == 0)
+ format->type = _external_acl_format::EXT_ACL_URI;
else if (strcmp(token, "%DST") == 0)
format->type = _external_acl_format::EXT_ACL_DST;
else if (strcmp(token, "%PROTO") == 0)
@@ -450,6 +453,7 @@
DUMP_EXT_ACL_TYPE(SRCPORT);
DUMP_EXT_ACL_TYPE(MYADDR);
DUMP_EXT_ACL_TYPE(MYPORT);
+ DUMP_EXT_ACL_TYPE(URI);
DUMP_EXT_ACL_TYPE(DST);
DUMP_EXT_ACL_TYPE(PROTO);
DUMP_EXT_ACL_TYPE(PORT);
@@ -798,6 +802,10 @@
str = buf;
break;
+ case _external_acl_format::EXT_ACL_URI:
+ str = urlCanonical(request);
+ break;
+
case _external_acl_format::EXT_ACL_DST:
str = request->host;
break;
++++++ 10823.patch ++++++
---------------------
PatchSet 10823
Date: 2007/05/22 03:44:34
Author: rousskov
Branch: HEAD
Tag: (none)
Log:
Removed hopefully unused SIZEOF_CHUNK macro in preparation for bug #1966 fix.
Members:
include/MemPool.h:1.15->1.16
Index: squid3/include/MemPool.h
===================================================================
RCS file: /cvsroot/squid/squid3/include/MemPool.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- squid3/include/MemPool.h 20 Sep 2006 00:59:26 -0000 1.15
+++ squid3/include/MemPool.h 22 May 2007 03:44:34 -0000 1.16
@@ -298,8 +298,6 @@
int mem_idle_limit;
};
-#define SIZEOF_CHUNK ( ( sizeof(MemChunk) + sizeof(double) -1) / sizeof(double) ) * sizeof(double);
-
#define memPoolCreate MemPools::GetInstance().create
/* Allocator API */
++++++ 10824.patch ++++++
---------------------
PatchSet 10824
Date: 2007/05/22 16:37:26
Author: rousskov
Branch: HEAD
Tag: (none)
Log:
Bug #1967 fix: avoid new strncmp() that silently converts char* buffers into
Strings because String length is limited by 64KB and because it is an
expensive conversion.
All similar conversions should be removed, but that is bug #1970.
Members:
src/HttpReply.cc:1.93->1.94
Index: squid3/src/HttpReply.cc
===================================================================
RCS file: /cvsroot/squid/squid3/src/HttpReply.cc,v
retrieving revision 1.93
retrieving revision 1.94
diff -u -r1.93 -r1.94
--- squid3/src/HttpReply.cc 18 May 2007 06:41:22 -0000 1.93
+++ squid3/src/HttpReply.cc 22 May 2007 16:37:26 -0000 1.94
@@ -1,6 +1,6 @@
/*
- * $Id: HttpReply.cc,v 1.93 2007/05/18 06:41:22 amosjeffries Exp $
+ * $Id: HttpReply.cc,v 1.94 2007/05/22 16:37:26 rousskov Exp $
*
* DEBUG: section 58 HTTP Reply (Response)
* AUTHOR: Alex Rousskov
@@ -433,7 +433,7 @@
bool HttpReply::sanityCheckStartLine(MemBuf *buf, http_status *error)
{
- if (buf->contentSize() >= protoPrefix.size() && strncmp(protoPrefix, buf->content(), protoPrefix.size()) != 0) {
+ if (buf->contentSize() >= protoPrefix.size() && protoPrefix.compare(buf->content(), protoPrefix.size()) != 0) {
debugs(58, 3, "HttpReply::sanityCheckStartLine: missing protocol prefix (" << protoPrefix << ") in '" << buf->content() << "'");
*error = HTTP_INVALID_HEADER;
return false;
++++++ 10825.patch ++++++
---------------------
PatchSet 10825
Date: 2007/05/22 16:40:05
Author: rousskov
Branch: HEAD
Tag: (none)
Log:
Bug #1966 fix: Use rounded String MemPool sizes in the hard-coded pool
config to avoid warnings that the configured pool size does not match the
actual size.
Members:
include/MemPool.h:1.16->1.17
lib/MemPool.cc:1.6->1.7
src/mem.cc:1.104->1.105
Index: squid3/include/MemPool.h
===================================================================
RCS file: /cvsroot/squid/squid3/include/MemPool.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- squid3/include/MemPool.h 22 May 2007 03:44:34 -0000 1.16
+++ squid3/include/MemPool.h 22 May 2007 16:40:05 -0000 1.17
@@ -112,6 +112,9 @@
virtual int getInUseCount() = 0;
int inUseCount();
virtual void setChunkSize(size_t chunksize) {}
+
+ // smallest size divisible by sizeof(void*) and at least minSize
+ static size_t RoundedSize(size_t minSize);
private:
const char *label;
};
Index: squid3/lib/MemPool.cc
===================================================================
RCS file: /cvsroot/squid/squid3/lib/MemPool.cc,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- squid3/lib/MemPool.cc 20 Sep 2006 00:59:26 -0000 1.6
+++ squid3/lib/MemPool.cc 22 May 2007 16:40:06 -0000 1.7
@@ -1,6 +1,6 @@
/*
- * $Id: MemPool.cc,v 1.6 2006/09/20 00:59:26 adrian Exp $
+ * $Id: MemPool.cc,v 1.7 2007/05/22 16:40:06 rousskov Exp $
*
* DEBUG: section 63 Low Level Memory Pool Management
* AUTHOR: Alex Rousskov, Andres Kroonmaa, Robert Collins
@@ -836,6 +836,11 @@
{
}
+size_t MemAllocator::RoundedSize(size_t s)
+{
+ return ((s + sizeof(void*) - 1) / sizeof(void*)) * sizeof(void*);
+}
+
MemMalloc::MemMalloc(char const *label, size_t aSize) : MemImplementingAllocator(label, aSize) { inuse = 0; }
bool
@@ -923,7 +928,7 @@
next(NULL),
alloc_calls(0),
free_calls(0),
- obj_size(((aSize + sizeof(void *) - 1) / sizeof(void *)) * sizeof(void *))
+ obj_size(RoundedSize(aSize))
{
}
Index: squid3/src/mem.cc
===================================================================
RCS file: /cvsroot/squid/squid3/src/mem.cc,v
retrieving revision 1.104
retrieving revision 1.105
diff -u -r1.104 -r1.105
--- squid3/src/mem.cc 28 Apr 2007 22:26:37 -0000 1.104
+++ squid3/src/mem.cc 22 May 2007 16:40:06 -0000 1.105
@@ -1,6 +1,6 @@
/*
- * $Id: mem.cc,v 1.104 2007/04/28 22:26:37 hno Exp $
+ * $Id: mem.cc,v 1.105 2007/05/22 16:40:06 rousskov Exp $
*
* DEBUG: section 13 High Level Memory Pool Management
* AUTHOR: Harvest Derived
@@ -69,13 +69,13 @@
StrPoolsAttrs[mem_str_pool_count] = {
{
- "Short Strings", 36,
+ "Short Strings", MemAllocator::RoundedSize(36),
}, /* to fit rfc1123 and similar */
{
- "Medium Strings", 128,
+ "Medium Strings", MemAllocator::RoundedSize(128),
}, /* to fit most urls */
{
- "Long Strings", 512
+ "Long Strings", MemAllocator::RoundedSize(512)
} /* other */
};
++++++ 10826.patch ++++++
---------------------
PatchSet 10826
Date: 2007/05/22 17:12:38
Author: rousskov
Branch: HEAD
Tag: (none)
Log:
The ICAP minimum for service_revival_delay and other OPTIONS retries is
currntly 30 and not 60 seconds.
Members:
src/cf.data.pre:1.436->1.437
Index: squid3/src/cf.data.pre
===================================================================
RCS file: /cvsroot/squid/squid3/src/cf.data.pre,v
retrieving revision 1.436
retrieving revision 1.437
diff -u -r1.436 -r1.437
--- squid3/src/cf.data.pre 22 May 2007 01:16:39 -0000 1.436
+++ squid3/src/cf.data.pre 22 May 2007 17:12:38 -0000 1.437
@@ -1,6 +1,6 @@
#
-# $Id: cf.data.pre,v 1.436 2007/05/22 01:16:39 hno Exp $
+# $Id: cf.data.pre,v 1.437 2007/05/22 17:12:38 rousskov Exp $
#
#
# SQUID Web Proxy Cache http://www.squid-cache.org/
@@ -5017,7 +5017,7 @@
fetched.
The actual delay cannot be smaller than the hardcoded minimum
- delay of 60 seconds.
+ delay of 30 seconds.
DOC_END
NAME: icap_preview_enable
++++++ 10827.patch ++++++
---------------------
PatchSet 10827
Date: 2007/05/22 17:43:40
Author: rousskov
Branch: HEAD
Tag: (none)
Log:
Do not reuse a persistent ICAP connection if icap_persistent_connections in
squid.conf (i.e., TheICAPConfig.reuse_connections) is off. We were probably
not reusing before this change except shortly after reconfiguration and in
cases where an ICAP server does not respond with Connection: close when our
request has Connection: close.
Members:
src/ICAP/ICAPXaction.cc:1.17->1.18
Index: squid3/src/ICAP/ICAPXaction.cc
===================================================================
RCS file: /cvsroot/squid/squid3/src/ICAP/ICAPXaction.cc,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- squid3/src/ICAP/ICAPXaction.cc 18 May 2007 16:56:18 -0000 1.17
+++ squid3/src/ICAP/ICAPXaction.cc 22 May 2007 17:43:40 -0000 1.18
@@ -6,6 +6,7 @@
#include "comm.h"
#include "HttpMsg.h"
#include "ICAPXaction.h"
+#include "ICAPConfig.h"
#include "TextException.h"
#include "pconn.h"
#include "fde.h"
@@ -102,6 +103,9 @@
const ICAPServiceRep &s = service();
+ if (!TheICAPConfig.reuse_connections)
+ disableRetries(); // this will also safely drain pconn pool
+
// TODO: check whether NULL domain is appropriate here
connection = icapPconnPool->pop(s.host.c_str(), s.port, NULL, NULL, isRetriable);
if (connection >= 0) {
++++++ 10828.patch ++++++
---------------------
PatchSet 10828
Date: 2007/05/23 20:59:14
Author: hno
Branch: HEAD
Tag: (none)
Log:
Fix the cppunit tests to use setUp() rather than an static constructor to
initialize memory pools etc.
Static constructors is dangerous in that you don't know for sure
in which order they will be called. The recent String pool change
where the object size is dynamically calculated on startup is and
example, where the requested pool size had not yet been calculated
before the pools was created.
Members:
src/gopher.cc:1.205->1.206
src/protos.h:1.543->1.544
src/url.cc:1.158->1.159
src/tests/testCacheManager.cc:1.2->1.3
src/tests/testCacheManager.h:1.1->1.2
src/tests/testDiskIO.cc:1.1->1.2
src/tests/testDiskIO.h:1.1->1.2
src/tests/testEvent.cc:1.4->1.5
src/tests/testEvent.h:1.1->1.2
src/tests/testEventLoop.cc:1.4->1.5
src/tests/testEventLoop.h:1.3->1.4
src/tests/testHttpRequest.cc:1.2->1.3
src/tests/testHttpRequest.h:1.1->1.2
src/tests/testStoreEntryStream.cc:1.3->1.4
src/tests/testStoreEntryStream.h:1.1->1.2
src/tests/testString.cc:1.4->1.5
src/tests/testString.h:1.3->1.4
src/tests/testURL.cc:1.2->1.3
src/tests/testURL.h:1.1->1.2
Index: squid3/src/gopher.cc
===================================================================
RCS file: /cvsroot/squid/squid3/src/gopher.cc,v
retrieving revision 1.205
retrieving revision 1.206
diff -u -r1.205 -r1.206
--- squid3/src/gopher.cc 18 May 2007 06:41:24 -0000 1.205
+++ squid3/src/gopher.cc 23 May 2007 20:59:14 -0000 1.206
@@ -1,6 +1,6 @@
/*
- * $Id: gopher.cc,v 1.205 2007/05/18 06:41:24 amosjeffries Exp $
+ * $Id: gopher.cc,v 1.206 2007/05/23 20:59:14 hno Exp $
*
* DEBUG: section 10 Gopher
* AUTHOR: Harvest Derived
@@ -248,7 +248,7 @@
if (request) {
xstrncpy(request, path + 1, MAX_URL);
/* convert %xx to char */
- url_convert_hex(request, 0);
+ rfc1738_unescape(request);
}
}
Index: squid3/src/protos.h
===================================================================
RCS file: /cvsroot/squid/squid3/src/protos.h,v
retrieving revision 1.543
retrieving revision 1.544
diff -u -r1.543 -r1.544
--- squid3/src/protos.h 18 May 2007 06:41:25 -0000 1.543
+++ squid3/src/protos.h 23 May 2007 20:59:14 -0000 1.544
@@ -1,6 +1,6 @@
/*
- * $Id: protos.h,v 1.543 2007/05/18 06:41:25 amosjeffries Exp $
+ * $Id: protos.h,v 1.544 2007/05/23 20:59:14 hno Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
@@ -624,8 +624,6 @@
SQUIDCEXTERN void unlinkdUnlink(const char *);
#endif
-SQUIDCEXTERN char *url_convert_hex(char *org_url, int allocate);
-SQUIDCEXTERN char *url_escape(const char *url);
SQUIDCEXTERN protocol_t urlParseProtocol(const char *, const char *e = NULL);
SQUIDCEXTERN void urlInitialize(void);
SQUIDCEXTERN HttpRequest *urlParse(method_t, char *, HttpRequest *request = NULL);
Index: squid3/src/url.cc
===================================================================
RCS file: /cvsroot/squid/squid3/src/url.cc,v
retrieving revision 1.158
retrieving revision 1.159
diff -u -r1.158 -r1.159
--- squid3/src/url.cc 18 May 2007 06:41:25 -0000 1.158
+++ squid3/src/url.cc 23 May 2007 20:59:14 -0000 1.159
@@ -1,6 +1,6 @@
/*
- * $Id: url.cc,v 1.158 2007/05/18 06:41:25 amosjeffries Exp $
+ * $Id: url.cc,v 1.159 2007/05/23 20:59:14 hno Exp $
*
* DEBUG: section 23 URL Parsing
* AUTHOR: Duane Wessels
@@ -49,38 +49,6 @@
"0123456789-."
;
-/* convert %xx in url string to a character
- * Allocate a new string and return a pointer to converted string */
-
-char *
-url_convert_hex(char *org_url, int allocate)
-{
- static char code[] = "00";
- char *url = NULL;
- char *s = NULL;
- char *t = NULL;
- url = allocate ? (char *) xstrdup(org_url) : org_url;
-
- if ((int) strlen(url) < 3 || !strchr(url, '%'))
- return url;
-
- for (s = t = url; *s; s++) {
- if (*s == '%' && *(s + 1) && *(s + 2)) {
- code[0] = *(++s);
- code[1] = *(++s);
- *t++ = (char) strtol(code, NULL, 16);
- } else {
- *t++ = *s;
- }
- }
-
- do {
- *t++ = *s;
- } while (*s++);
-
- return url;
-}
-
void
urlInitialize(void)
{
Index: squid3/src/tests/testCacheManager.cc
===================================================================
RCS file: /cvsroot/squid/squid3/src/tests/testCacheManager.cc,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- squid3/src/tests/testCacheManager.cc 18 May 2007 06:41:33 -0000 1.2
+++ squid3/src/tests/testCacheManager.cc 23 May 2007 20:59:15 -0000 1.3
@@ -17,12 +17,10 @@
/* init memory pools */
-struct Initer
+void testCacheManager::setUp()
{
- Initer() {Mem::Init();}
-};
-
-static Initer ensure_mempools;
+ Mem::Init();
+}
/*
* Test creating a CacheManager
Index: squid3/src/tests/testCacheManager.h
===================================================================
RCS file: /cvsroot/squid/squid3/src/tests/testCacheManager.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- squid3/src/tests/testCacheManager.h 29 May 2006 00:15:09 -0000 1.1
+++ squid3/src/tests/testCacheManager.h 23 May 2007 20:59:15 -0000 1.2
@@ -16,6 +16,7 @@
CPPUNIT_TEST_SUITE_END();
public:
+ void setUp();
protected:
void testCreate();
Index: squid3/src/tests/testDiskIO.cc
===================================================================
RCS file: /cvsroot/squid/squid3/src/tests/testDiskIO.cc,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- squid3/src/tests/testDiskIO.cc 14 Sep 2006 08:34:51 -0000 1.1
+++ squid3/src/tests/testDiskIO.cc 23 May 2007 20:59:15 -0000 1.2
@@ -16,14 +16,12 @@
CPPUNIT_TEST_SUITE_REGISTRATION( testDiskIO );
-struct Initer {
- Initer() {
+void
+testDiskIO::setUp()
+{
Mem::Init();
DiskIOModule::SetupAllModules();
- };
-};
-
-Initer ensure_inited;
+}
void
testDiskIO::testFindDefault()
Index: squid3/src/tests/testDiskIO.h
===================================================================
RCS file: /cvsroot/squid/squid3/src/tests/testDiskIO.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- squid3/src/tests/testDiskIO.h 14 Sep 2006 08:34:51 -0000 1.1
+++ squid3/src/tests/testDiskIO.h 23 May 2007 20:59:15 -0000 1.2
@@ -15,6 +15,7 @@
CPPUNIT_TEST_SUITE_END();
public:
+ void setUp();
protected:
void testFindDefault();
Index: squid3/src/tests/testEvent.cc
===================================================================
RCS file: /cvsroot/squid/squid3/src/tests/testEvent.cc,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- squid3/src/tests/testEvent.cc 18 May 2007 06:41:33 -0000 1.4
+++ squid3/src/tests/testEvent.cc 23 May 2007 20:59:15 -0000 1.5
@@ -19,16 +19,12 @@
/* init legacy static-initialized modules */
-struct Initer
+void
+testEvent::setUp()
{
- Initer()
- {
- Mem::Init();
- statInit();
- }
-};
-
-static Initer ensure_mempools;
+ Mem::Init();
+ statInit();
+}
/*
* Test creating a EventDispatcher and Scheduler
Index: squid3/src/tests/testEvent.h
===================================================================
RCS file: /cvsroot/squid/squid3/src/tests/testEvent.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- squid3/src/tests/testEvent.h 7 Aug 2006 02:28:26 -0000 1.1
+++ squid3/src/tests/testEvent.h 23 May 2007 20:59:15 -0000 1.2
@@ -21,6 +21,7 @@
CPPUNIT_TEST_SUITE_END();
public:
+ void setUp();
protected:
void testCreate();
Index: squid3/src/tests/testEventLoop.cc
===================================================================
RCS file: /cvsroot/squid/squid3/src/tests/testEventLoop.cc,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- squid3/src/tests/testEventLoop.cc 2 Sep 2006 19:26:46 -0000 1.4
+++ squid3/src/tests/testEventLoop.cc 23 May 2007 20:59:15 -0000 1.5
@@ -20,16 +20,12 @@
/* init legacy static-initialized modules */
-struct Initer
+void
+testEventLoop::setUp()
{
- Initer()
- {
- Mem::Init();
- statInit();
- }
-};
-
-static Initer ensure_mempools;
+ Mem::Init();
+ statInit();
+}
/*
* Test creating a EventLoop
Index: squid3/src/tests/testEventLoop.h
===================================================================
RCS file: /cvsroot/squid/squid3/src/tests/testEventLoop.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- squid3/src/tests/testEventLoop.h 19 Aug 2006 12:31:26 -0000 1.3
+++ squid3/src/tests/testEventLoop.h 23 May 2007 20:59:16 -0000 1.4
@@ -22,6 +22,7 @@
CPPUNIT_TEST_SUITE_END();
public:
+ void setUp();
protected:
void testCreate();
Index: squid3/src/tests/testHttpRequest.cc
===================================================================
RCS file: /cvsroot/squid/squid3/src/tests/testHttpRequest.cc,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- squid3/src/tests/testHttpRequest.cc 18 May 2007 06:41:33 -0000 1.2
+++ squid3/src/tests/testHttpRequest.cc 23 May 2007 20:59:16 -0000 1.3
@@ -17,12 +17,11 @@
/* init memory pools */
-struct Initer
+void
+testHttpRequest::setUp()
{
- Initer() {Mem::Init();}
-};
-
-static Initer ensure_mempools;
+ Mem::Init();
+}
/*
* Test creating an HttpRequest object from a Url and method
Index: squid3/src/tests/testHttpRequest.h
===================================================================
RCS file: /cvsroot/squid/squid3/src/tests/testHttpRequest.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- squid3/src/tests/testHttpRequest.h 3 May 2006 14:04:45 -0000 1.1
+++ squid3/src/tests/testHttpRequest.h 23 May 2007 20:59:16 -0000 1.2
@@ -16,6 +16,7 @@
CPPUNIT_TEST_SUITE_END();
public:
+ void setUp();
protected:
void testCreateFromUrlAndMethod();
Index: squid3/src/tests/testStoreEntryStream.cc
===================================================================
RCS file: /cvsroot/squid/squid3/src/tests/testStoreEntryStream.cc,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- squid3/src/tests/testStoreEntryStream.cc 18 May 2007 06:41:33 -0000 1.3
+++ squid3/src/tests/testStoreEntryStream.cc 23 May 2007 20:59:16 -0000 1.4
@@ -14,12 +14,10 @@
/* init memory pools */
-struct Initer
+void testStoreEntryStream::setUp()
{
- Initer() {Mem::Init();}
-};
-
-static Initer ensure_mempools;
+ Mem::Init();
+}
void
testStoreEntryStream::testGetStream()
Index: squid3/src/tests/testStoreEntryStream.h
===================================================================
RCS file: /cvsroot/squid/squid3/src/tests/testStoreEntryStream.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- squid3/src/tests/testStoreEntryStream.h 3 May 2006 14:04:45 -0000 1.1
+++ squid3/src/tests/testStoreEntryStream.h 23 May 2007 20:59:16 -0000 1.2
@@ -15,6 +15,7 @@
CPPUNIT_TEST_SUITE_END();
public:
+ void setUp();
protected:
void testGetStream();
Index: squid3/src/tests/testString.cc
===================================================================
RCS file: /cvsroot/squid/squid3/src/tests/testString.cc,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- squid3/src/tests/testString.cc 20 May 2007 08:29:44 -0000 1.4
+++ squid3/src/tests/testString.cc 23 May 2007 20:59:16 -0000 1.5
@@ -13,12 +13,11 @@
/* init memory pools */
-struct Initer
+void
+testString::setUp()
{
- Initer() {Mem::Init();}
-};
-
-static Initer ensure_mempools;
+ Mem::Init();
+}
void
testString::testDefaults()
Index: squid3/src/tests/testString.h
===================================================================
RCS file: /cvsroot/squid/squid3/src/tests/testString.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- squid3/src/tests/testString.h 20 May 2007 08:29:44 -0000 1.3
+++ squid3/src/tests/testString.h 23 May 2007 20:59:16 -0000 1.4
@@ -26,6 +26,7 @@
CPPUNIT_TEST_SUITE_END();
public:
+ void setUp();
protected:
Index: squid3/src/tests/testURL.cc
===================================================================
RCS file: /cvsroot/squid/squid3/src/tests/testURL.cc,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- squid3/src/tests/testURL.cc 2 Sep 2006 03:54:27 -0000 1.2
+++ squid3/src/tests/testURL.cc 23 May 2007 20:59:16 -0000 1.3
@@ -18,12 +18,11 @@
/* init memory pools */
-struct Initer
+void
+testURL::setUp()
{
- Initer() {Mem::Init();}
-};
-
-static Initer ensure_mempools;
+ Mem::Init();
+}
/*
* we can construct a URL with a URLScheme.
Index: squid3/src/tests/testURL.h
===================================================================
RCS file: /cvsroot/squid/squid3/src/tests/testURL.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- squid3/src/tests/testURL.h 8 May 2006 23:38:36 -0000 1.1
+++ squid3/src/tests/testURL.h 23 May 2007 20:59:16 -0000 1.2
@@ -16,6 +16,7 @@
CPPUNIT_TEST_SUITE_END();
public:
+ void setUp();
protected:
++++++ 10829.patch ++++++
---------------------
PatchSet 10829
Date: 2007/05/23 21:07:43
Author: hno
Branch: HEAD
Tag: (none)
Log:
Back out unintentional commit of unrelated url.cc changes
Members:
src/gopher.cc:1.206->1.207
src/protos.h:1.544->1.545
src/url.cc:1.159->1.160
Index: squid3/src/gopher.cc
===================================================================
RCS file: /cvsroot/squid/squid3/src/gopher.cc,v
retrieving revision 1.206
retrieving revision 1.207
diff -u -r1.206 -r1.207
--- squid3/src/gopher.cc 23 May 2007 20:59:14 -0000 1.206
+++ squid3/src/gopher.cc 23 May 2007 21:07:43 -0000 1.207
@@ -1,6 +1,6 @@
/*
- * $Id: gopher.cc,v 1.206 2007/05/23 20:59:14 hno Exp $
+ * $Id: gopher.cc,v 1.207 2007/05/23 21:07:43 hno Exp $
*
* DEBUG: section 10 Gopher
* AUTHOR: Harvest Derived
@@ -248,7 +248,7 @@
if (request) {
xstrncpy(request, path + 1, MAX_URL);
/* convert %xx to char */
- rfc1738_unescape(request);
+ url_convert_hex(request, 0);
}
}
Index: squid3/src/protos.h
===================================================================
RCS file: /cvsroot/squid/squid3/src/protos.h,v
retrieving revision 1.544
retrieving revision 1.545
diff -u -r1.544 -r1.545
--- squid3/src/protos.h 23 May 2007 20:59:14 -0000 1.544
+++ squid3/src/protos.h 23 May 2007 21:07:43 -0000 1.545
@@ -1,6 +1,6 @@
/*
- * $Id: protos.h,v 1.544 2007/05/23 20:59:14 hno Exp $
+ * $Id: protos.h,v 1.545 2007/05/23 21:07:43 hno Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
@@ -624,6 +624,8 @@
SQUIDCEXTERN void unlinkdUnlink(const char *);
#endif
+SQUIDCEXTERN char *url_convert_hex(char *org_url, int allocate);
+SQUIDCEXTERN char *url_escape(const char *url);
SQUIDCEXTERN protocol_t urlParseProtocol(const char *, const char *e = NULL);
SQUIDCEXTERN void urlInitialize(void);
SQUIDCEXTERN HttpRequest *urlParse(method_t, char *, HttpRequest *request = NULL);
Index: squid3/src/url.cc
===================================================================
RCS file: /cvsroot/squid/squid3/src/url.cc,v
retrieving revision 1.159
retrieving revision 1.160
diff -u -r1.159 -r1.160
--- squid3/src/url.cc 23 May 2007 20:59:14 -0000 1.159
+++ squid3/src/url.cc 23 May 2007 21:07:43 -0000 1.160
@@ -1,6 +1,6 @@
/*
- * $Id: url.cc,v 1.159 2007/05/23 20:59:14 hno Exp $
+ * $Id: url.cc,v 1.160 2007/05/23 21:07:43 hno Exp $
*
* DEBUG: section 23 URL Parsing
* AUTHOR: Duane Wessels
@@ -49,6 +49,38 @@
"0123456789-."
;
+/* convert %xx in url string to a character
+ * Allocate a new string and return a pointer to converted string */
+
+char *
+url_convert_hex(char *org_url, int allocate)
+{
+ static char code[] = "00";
+ char *url = NULL;
+ char *s = NULL;
+ char *t = NULL;
+ url = allocate ? (char *) xstrdup(org_url) : org_url;
+
+ if ((int) strlen(url) < 3 || !strchr(url, '%'))
+ return url;
+
+ for (s = t = url; *s; s++) {
+ if (*s == '%' && *(s + 1) && *(s + 2)) {
+ code[0] = *(++s);
+ code[1] = *(++s);
+ *t++ = (char) strtol(code, NULL, 16);
+ } else {
+ *t++ = *s;
+ }
+ }
+
+ do {
+ *t++ = *s;
+ } while (*s++);
+
+ return url;
+}
+
void
urlInitialize(void)
{
++++++ 10830.patch ++++++
---------------------
PatchSet 10830
Date: 2007/05/23 21:10:06
Author: hno
Branch: HEAD
Tag: (none)
Log:
Kill the redundant url_convert_hex function. Equivalent to rfc1738_unescape
Members:
src/gopher.cc:1.207->1.208
src/protos.h:1.545->1.546
src/url.cc:1.160->1.161
Index: squid3/src/gopher.cc
===================================================================
RCS file: /cvsroot/squid/squid3/src/gopher.cc,v
retrieving revision 1.207
retrieving revision 1.208
diff -u -r1.207 -r1.208
--- squid3/src/gopher.cc 23 May 2007 21:07:43 -0000 1.207
+++ squid3/src/gopher.cc 23 May 2007 21:10:06 -0000 1.208
@@ -1,6 +1,6 @@
/*
- * $Id: gopher.cc,v 1.207 2007/05/23 21:07:43 hno Exp $
+ * $Id: gopher.cc,v 1.208 2007/05/23 21:10:06 hno Exp $
*
* DEBUG: section 10 Gopher
* AUTHOR: Harvest Derived
@@ -248,7 +248,7 @@
if (request) {
xstrncpy(request, path + 1, MAX_URL);
/* convert %xx to char */
- url_convert_hex(request, 0);
+ rfc1738_unescape(request);
}
}
Index: squid3/src/protos.h
===================================================================
RCS file: /cvsroot/squid/squid3/src/protos.h,v
retrieving revision 1.545
retrieving revision 1.546
diff -u -r1.545 -r1.546
--- squid3/src/protos.h 23 May 2007 21:07:43 -0000 1.545
+++ squid3/src/protos.h 23 May 2007 21:10:07 -0000 1.546
@@ -1,6 +1,6 @@
/*
- * $Id: protos.h,v 1.545 2007/05/23 21:07:43 hno Exp $
+ * $Id: protos.h,v 1.546 2007/05/23 21:10:07 hno Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
@@ -624,8 +624,6 @@
SQUIDCEXTERN void unlinkdUnlink(const char *);
#endif
-SQUIDCEXTERN char *url_convert_hex(char *org_url, int allocate);
-SQUIDCEXTERN char *url_escape(const char *url);
SQUIDCEXTERN protocol_t urlParseProtocol(const char *, const char *e = NULL);
SQUIDCEXTERN void urlInitialize(void);
SQUIDCEXTERN HttpRequest *urlParse(method_t, char *, HttpRequest *request = NULL);
Index: squid3/src/url.cc
===================================================================
RCS file: /cvsroot/squid/squid3/src/url.cc,v
retrieving revision 1.160
retrieving revision 1.161
diff -u -r1.160 -r1.161
--- squid3/src/url.cc 23 May 2007 21:07:43 -0000 1.160
+++ squid3/src/url.cc 23 May 2007 21:10:07 -0000 1.161
@@ -1,6 +1,6 @@
/*
- * $Id: url.cc,v 1.160 2007/05/23 21:07:43 hno Exp $
+ * $Id: url.cc,v 1.161 2007/05/23 21:10:07 hno Exp $
*
* DEBUG: section 23 URL Parsing
* AUTHOR: Duane Wessels
@@ -49,38 +49,6 @@
"0123456789-."
;
-/* convert %xx in url string to a character
- * Allocate a new string and return a pointer to converted string */
-
-char *
-url_convert_hex(char *org_url, int allocate)
-{
- static char code[] = "00";
- char *url = NULL;
- char *s = NULL;
- char *t = NULL;
- url = allocate ? (char *) xstrdup(org_url) : org_url;
-
- if ((int) strlen(url) < 3 || !strchr(url, '%'))
- return url;
-
- for (s = t = url; *s; s++) {
- if (*s == '%' && *(s + 1) && *(s + 2)) {
- code[0] = *(++s);
- code[1] = *(++s);
- *t++ = (char) strtol(code, NULL, 16);
- } else {
- *t++ = *s;
- }
- }
-
- do {
- *t++ = *s;
- } while (*s++);
-
- return url;
-}
-
void
urlInitialize(void)
{
++++++ 10831.patch ++++++
---------------------
PatchSet 10831
Date: 2007/05/23 21:59:44
Author: hno
Branch: HEAD
Tag: (none)
Log:
URI-escape using the recommended upper case
Members:
lib/rfc1738.c:1.26->1.27
Index: squid3/lib/rfc1738.c
===================================================================
RCS file: /cvsroot/squid/squid3/lib/rfc1738.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- squid3/lib/rfc1738.c 19 Dec 2003 06:12:40 -0000 1.26
+++ squid3/lib/rfc1738.c 23 May 2007 21:59:44 -0000 1.27
@@ -1,5 +1,5 @@
/*
- * $Id: rfc1738.c,v 1.26 2003/12/19 06:12:40 wessels Exp $
+ * $Id: rfc1738.c,v 1.27 2007/05/23 21:59:44 hno Exp $
*
* DEBUG:
* AUTHOR: Harvest Derived
@@ -136,7 +136,7 @@
* allocated - KA */
if (do_escape == 1) {
- (void) sprintf(q, "%%%02x", (unsigned char) *p);
+ (void) sprintf(q, "%%%02X", (unsigned char) *p);
q += sizeof(char) * 2;
} else {
*q = *p;
++++++ 10832.patch ++++++
---------------------
PatchSet 10832
Date: 2007/05/24 01:45:03
Author: hno
Branch: HEAD
Tag: (none)
Log:
Adjust refresh_pattern min-age to make 0 mean 0, not 1 second
Members:
src/refresh.cc:1.75->1.76
Index: squid3/src/refresh.cc
===================================================================
RCS file: /cvsroot/squid/squid3/src/refresh.cc,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -r1.75 -r1.76
--- squid3/src/refresh.cc 30 Apr 2007 16:56:09 -0000 1.75
+++ squid3/src/refresh.cc 24 May 2007 01:45:03 -0000 1.76
@@ -1,6 +1,6 @@
/*
- * $Id: refresh.cc,v 1.75 2007/04/30 16:56:09 wessels Exp $
+ * $Id: refresh.cc,v 1.76 2007/05/24 01:45:03 hno Exp $
*
* DEBUG: section 22 Refresh Calculation
* AUTHOR: Harvest Derived
@@ -216,13 +216,13 @@
* If we are here, staleness is determined by the refresh_pattern
* configured minimum age.
*/
- if (age <= R->min) {
- debugs(22, 3, "FRESH: age " << age << " <= min " << R->min);
+ if (age < R->min) {
+ debugs(22, 3, "FRESH: age " << age << " < min " << R->min);
sf->min = true;
return -1;
}
- debugs(22, 3, "STALE: age " << age << " > min " << R->min);
+ debugs(22, 3, "STALE: age " << age << " >= min " << R->min);
return (age - R->min);
}
++++++ 10833.patch ++++++
---------------------
PatchSet 10833
Date: 2007/05/26 06:38:03
Author: wessels
Branch: HEAD
Tag: (none)
Log:
Added 'clientside_tos' directive and feature.
Much like 'tcp_outgoing_tos' except that this affect connections
between Squid and its clients instead of server-side connections.
Members:
src/ClientRequestContext.h:1.3->1.4
src/cf.data.pre:1.437->1.438
src/client_side_request.cc:1.87->1.88
src/comm.cc:1.430->1.431
src/comm.h:1.28->1.29
src/forward.cc:1.164->1.165
src/structs.h:1.556->1.557
Index: squid3/src/ClientRequestContext.h
===================================================================
RCS file: /cvsroot/squid/squid3/src/ClientRequestContext.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- squid3/src/ClientRequestContext.h 11 Jan 2006 21:14:33 -0000 1.3
+++ squid3/src/ClientRequestContext.h 26 May 2007 06:38:03 -0000 1.4
@@ -38,6 +38,7 @@
bool redirect_done;
bool no_cache_done;
bool interpreted_req_hdrs;
+ bool clientside_tos_done;
private:
CBDATA_CLASS(ClientRequestContext);
Index: squid3/src/cf.data.pre
===================================================================
RCS file: /cvsroot/squid/squid3/src/cf.data.pre,v
retrieving revision 1.437
retrieving revision 1.438
diff -u -r1.437 -r1.438
--- squid3/src/cf.data.pre 22 May 2007 17:12:38 -0000 1.437
+++ squid3/src/cf.data.pre 26 May 2007 06:38:03 -0000 1.438
@@ -1,6 +1,6 @@
#
-# $Id: cf.data.pre,v 1.437 2007/05/22 17:12:38 rousskov Exp $
+# $Id: cf.data.pre,v 1.438 2007/05/26 06:38:03 wessels Exp $
#
#
# SQUID Web Proxy Cache http://www.squid-cache.org/
@@ -2922,6 +2922,16 @@
matching line.
DOC_END
+NAME: clientside_tos
+TYPE: acl_tos
+DEFAULT: none
+LOC: Config.accessList.clientside_tos
+DOC_START
+ Allows you to select a TOS/Diffserv value to mark client-side
+ connections with, based on the username or source address
+ making the request.
+DOC_END
+
NAME: tcp_outgoing_address
TYPE: acl_address
DEFAULT: none
Index: squid3/src/client_side_request.cc
===================================================================
RCS file: /cvsroot/squid/squid3/src/client_side_request.cc,v
retrieving revision 1.87
retrieving revision 1.88
diff -u -r1.87 -r1.88
--- squid3/src/client_side_request.cc 18 May 2007 18:26:01 -0000 1.87
+++ squid3/src/client_side_request.cc 26 May 2007 06:38:04 -0000 1.88
@@ -1,6 +1,6 @@
/*
- * $Id: client_side_request.cc,v 1.87 2007/05/18 18:26:01 wessels Exp $
+ * $Id: client_side_request.cc,v 1.88 2007/05/26 06:38:04 wessels Exp $
*
* DEBUG: section 85 Client-side Request Routines
* AUTHOR: Robert Collins (Originally Duane Wessels in client_side.c)
@@ -999,6 +999,8 @@
* the callout. This is strictly for convenience.
*/
+extern int aclMapTOS (acl_tos * head, ACLChecklist * ch);
+
void
ClientHttpRequest::doCallouts()
{
@@ -1049,6 +1051,20 @@
}
}
+ if (!calloutContext->clientside_tos_done) {
+ calloutContext->clientside_tos_done = true;
+ if (getConn() != NULL) {
+ ACLChecklist ch;
+ ch.src_addr = request->client_addr;
+ ch.my_addr = request->my_addr;
+ ch.my_port = request->my_port;
+ ch.request = HTTPMSGLOCK(request);
+ int tos = aclMapTOS(Config.accessList.clientside_tos, &ch);
+ if (tos)
+ comm_set_tos(getConn()->fd, tos);
+ }
+ }
+
cbdataReferenceDone(calloutContext->http);
delete calloutContext;
calloutContext = NULL;
Index: squid3/src/comm.cc
===================================================================
RCS file: /cvsroot/squid/squid3/src/comm.cc,v
retrieving revision 1.430
retrieving revision 1.431
diff -u -r1.430 -r1.431
--- squid3/src/comm.cc 30 Apr 2007 16:56:09 -0000 1.430
+++ squid3/src/comm.cc 26 May 2007 06:38:04 -0000 1.431
@@ -1,6 +1,6 @@
/*
- * $Id: comm.cc,v 1.430 2007/04/30 16:56:09 wessels Exp $
+ * $Id: comm.cc,v 1.431 2007/05/26 06:38:04 wessels Exp $
*
* DEBUG: section 5 Socket Functions
* AUTHOR: Harvest Derived
@@ -822,6 +822,21 @@
return anErrno == ENFILE || anErrno == EMFILE;
}
+int
+comm_set_tos(int fd, int tos)
+{
+#ifdef IP_TOS
+ int x = setsockopt(fd, IPPROTO_IP, IP_TOS, (char *) &tos, sizeof(int));
+ if (x < 0)
+ debugs(50, 1, "comm_set_tos: setsockopt(IP_TOS) on FD " << fd << ": " << xstrerror());
+ return x;
+#else
+ debugs(50, 0, "comm_set_tos: setsockopt(IP_TOS) not supported on this platform");
+ return -1
+#endif
+}
+
+
/* Create a socket. Default is blocking, stream (TCP) socket. IO_TYPE
* is OR of flags specified in defines.h:COMM_* */
int
Index: squid3/src/comm.h
===================================================================
RCS file: /cvsroot/squid/squid3/src/comm.h,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- squid3/src/comm.h 31 Oct 2006 23:30:57 -0000 1.28
+++ squid3/src/comm.h 26 May 2007 06:38:04 -0000 1.29
@@ -53,6 +53,7 @@
SQUIDCEXTERN int comm_openex(int, int, struct IN_ADDR, u_short, int, unsigned char TOS, const char *);
SQUIDCEXTERN u_short comm_local_port(int fd);
+SQUIDCEXTERN int comm_set_tos(int fd, int tos);
SQUIDCEXTERN void commSetSelect(int, unsigned int, PF *, void *, time_t);
Index: squid3/src/forward.cc
===================================================================
RCS file: /cvsroot/squid/squid3/src/forward.cc,v
retrieving revision 1.164
retrieving revision 1.165
diff -u -r1.164 -r1.165
--- squid3/src/forward.cc 11 May 2007 13:20:57 -0000 1.164
+++ squid3/src/forward.cc 26 May 2007 06:38:04 -0000 1.165
@@ -1,6 +1,6 @@
/*
- * $Id: forward.cc,v 1.164 2007/05/11 13:20:57 rousskov Exp $
+ * $Id: forward.cc,v 1.165 2007/05/26 06:38:04 wessels Exp $
*
* DEBUG: section 17 Request Forwarding
* AUTHOR: Duane Wessels
@@ -1197,7 +1197,11 @@
return addr;
}
-static int
+/*
+ * DPW 2007-05-19
+ * Formerly static, but now used by client_side_request.cc
+ */
+int
aclMapTOS(acl_tos * head, ACLChecklist * ch)
{
acl_tos *l;
Index: squid3/src/structs.h
===================================================================
RCS file: /cvsroot/squid/squid3/src/structs.h,v
retrieving revision 1.556
retrieving revision 1.557
diff -u -r1.556 -r1.557
--- squid3/src/structs.h 18 May 2007 06:41:25 -0000 1.556
+++ squid3/src/structs.h 26 May 2007 06:38:05 -0000 1.557
@@ -1,6 +1,6 @@
/*
- * $Id: structs.h,v 1.556 2007/05/18 06:41:25 amosjeffries Exp $
+ * $Id: structs.h,v 1.557 2007/05/26 06:38:05 wessels Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
@@ -584,6 +584,7 @@
acl_access *reply;
acl_address *outgoing_address;
acl_tos *outgoing_tos;
+ acl_tos *clientside_tos;
#if USE_HTCP
acl_access *htcp;
++++++ 10834.patch ++++++
++++ 7455 lines (skipped)
++++++ 10836.patch ++++++
---------------------
PatchSet 10836
Date: 2007/05/30 20:22:30
Author: rousskov
Branch: HEAD
Tag: (none)
Log:
Bug #1976 fix: Do not check OPTIONS response specifics if the response
is invalid in some way. Squid should now handle 404 Not Found and other
"invalid" ICAP OPTIONS responses by marking the ICAP service down.
OPTIONS error setting needs more work, but reporting the last error should
work for now.
Thanks to Christos Tsantilas for reporting and investigating this bug.
Members:
src/ICAP/ICAPServiceRep.cc:1.14->1.15
Index: squid3/src/ICAP/ICAPServiceRep.cc
===================================================================
RCS file: /cvsroot/squid/squid3/src/ICAP/ICAPServiceRep.cc,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- squid3/src/ICAP/ICAPServiceRep.cc 29 May 2007 13:31:44 -0000 1.14
+++ squid3/src/ICAP/ICAPServiceRep.cc 30 May 2007 20:22:30 -0000 1.15
@@ -354,6 +354,12 @@
if (theOptions == NULL)
return;
+ if (!theOptions->valid()) {
+ debugs(93,1, "WARNING: Squid got an invalid ICAP OPTIONS response " <<
+ "from service " << uri << "; error: " << theOptions->error);
+ return;
+ }
+
/*
* Issue a warning if the ICAP server returned methods in the
* options response that don't match the method from squid.conf.
++++++ 10837.patch ++++++
++++ 707 lines (skipped)
++++++ 10838.patch ++++++
---------------------
PatchSet 10838
Date: 2007/06/02 11:54:26
Author: hno
Branch: HEAD
Tag: (none)
Log:
Rename more SSL references to Tunnel in tunnel.cc
Members:
src/tunnel.cc:1.169->1.170
Index: squid3/src/tunnel.cc
===================================================================
RCS file: /cvsroot/squid/squid3/src/tunnel.cc,v
retrieving revision 1.169
retrieving revision 1.170
diff -u -r1.169 -r1.170
--- squid3/src/tunnel.cc 2 Jun 2007 11:50:32 -0000 1.169
+++ squid3/src/tunnel.cc 2 Jun 2007 11:54:26 -0000 1.170
@@ -1,6 +1,6 @@
/*
- * $Id: tunnel.cc,v 1.169 2007/06/02 11:50:32 hno Exp $
+ * $Id: tunnel.cc,v 1.170 2007/06/02 11:54:26 hno Exp $
*
* DEBUG: section 26 Secure Sockets Layer Proxy
* AUTHOR: Duane Wessels
@@ -47,7 +47,7 @@
#include "MemBuf.h"
#include "http.h"
-class SslStateData
+class TunnelStateData
{
public:
@@ -106,7 +106,7 @@
void copyRead(Connection &from, IOCB *completion);
private:
- CBDATA_CLASS(SslStateData);
+ CBDATA_CLASS(TunnelStateData);
void copy (size_t len, comm_err_t errcode, int xerrno, Connection &from, Connection &to, IOCB *);
void readServer(char *buf, size_t len, comm_err_t errcode, int xerrno);
void readClient(char *buf, size_t len, comm_err_t errcode, int xerrno);
@@ -122,14 +122,14 @@
static PF tunnelClientClosed;
static PF tunnelTimeout;
static PSC tunnelPeerSelectComplete;
-static void tunnelStateFree(SslStateData * tunnelState);
+static void tunnelStateFree(TunnelStateData * tunnelState);
static void tunnelConnected(int fd, void *);
static void tunnelProxyConnected(int fd, void *);
static void
tunnelServerClosed(int fd, void *data)
{
- SslStateData *tunnelState = (SslStateData *)data;
+ TunnelStateData *tunnelState = (TunnelStateData *)data;
debugs(26, 3, "tunnelServerClosed: FD " << fd);
assert(fd == tunnelState->server.fd());
tunnelState->server.fd(-1);
@@ -141,7 +141,7 @@
static void
tunnelClientClosed(int fd, void *data)
{
- SslStateData *tunnelState = (SslStateData *)data;
+ TunnelStateData *tunnelState = (TunnelStateData *)data;
debugs(26, 3, "tunnelClientClosed: FD " << fd);
assert(fd == tunnelState->client.fd());
tunnelState->client.fd(-1);
@@ -151,7 +151,7 @@
}
static void
-tunnelStateFree(SslStateData * tunnelState)
+tunnelStateFree(TunnelStateData * tunnelState)
{
debugs(26, 3, "tunnelStateFree: tunnelState=" << tunnelState);
assert(tunnelState != NULL);
@@ -163,13 +163,13 @@
delete tunnelState;
}
-SslStateData::Connection::~Connection()
+TunnelStateData::Connection::~Connection()
{
safe_free (buf);
}
int
-SslStateData::Connection::bytesWanted(int lowerbound, int upperbound) const
+TunnelStateData::Connection::bytesWanted(int lowerbound, int upperbound) const
{
#if DELAY_POOLS
return delayId.bytesWanted(lowerbound, upperbound);
@@ -180,7 +180,7 @@
}
void
-SslStateData::Connection::bytesIn(int const &count)
+TunnelStateData::Connection::bytesIn(int const &count)
{
#if DELAY_POOLS
delayId.bytesIn(count);
@@ -190,7 +190,7 @@
}
int
-SslStateData::Connection::debugLevelForError(int const xerrno) const
+TunnelStateData::Connection::debugLevelForError(int const xerrno) const
{
#ifdef ECONNRESET
@@ -207,9 +207,9 @@
/* Read from server side and queue it for writing to the client */
void
-SslStateData::ReadServer(int fd, char *buf, size_t len, comm_err_t errcode, int xerrno, void *data)
+TunnelStateData::ReadServer(int fd, char *buf, size_t len, comm_err_t errcode, int xerrno, void *data)
{
- SslStateData *tunnelState = (SslStateData *)data;
+ TunnelStateData *tunnelState = (TunnelStateData *)data;
assert (cbdataReferenceValid (tunnelState));
assert(fd == tunnelState->server.fd());
@@ -217,7 +217,7 @@
}
void
-SslStateData::readServer(char *buf, size_t len, comm_err_t errcode, int xerrno)
+TunnelStateData::readServer(char *buf, size_t len, comm_err_t errcode, int xerrno)
{
/*
* Bail out early on COMM_ERR_CLOSING
@@ -239,7 +239,7 @@
}
void
-SslStateData::Connection::error(int const xerrno)
+TunnelStateData::Connection::error(int const xerrno)
{
/* XXX fixme xstrerror and xerrno... */
errno = xerrno;
@@ -256,9 +256,9 @@
/* Read from client side and queue it for writing to the server */
void
-SslStateData::ReadClient(int fd, char *buf, size_t len, comm_err_t errcode, int xerrno, void *data)
+TunnelStateData::ReadClient(int fd, char *buf, size_t len, comm_err_t errcode, int xerrno, void *data)
{
- SslStateData *tunnelState = (SslStateData *)data;
+ TunnelStateData *tunnelState = (TunnelStateData *)data;
assert (cbdataReferenceValid (tunnelState));
assert(fd == tunnelState->client.fd());
@@ -266,7 +266,7 @@
}
void
-SslStateData::readClient(char *buf, size_t len, comm_err_t errcode, int xerrno)
+TunnelStateData::readClient(char *buf, size_t len, comm_err_t errcode, int xerrno)
{
/*
* Bail out early on COMM_ERR_CLOSING
@@ -287,7 +287,7 @@
}
void
-SslStateData::copy (size_t len, comm_err_t errcode, int xerrno, Connection &from, Connection &to, IOCB *completion)
+TunnelStateData::copy (size_t len, comm_err_t errcode, int xerrno, Connection &from, Connection &to, IOCB *completion)
{
/* I think this is to prevent free-while-in-a-callback behaviour
* - RBC 20030229
@@ -311,9 +311,9 @@
/* Writes data from the client buffer to the server side */
void
-SslStateData::WriteServerDone(int fd, char *buf, size_t len, comm_err_t flag, int xerrno, void *data)
+TunnelStateData::WriteServerDone(int fd, char *buf, size_t len, comm_err_t flag, int xerrno, void *data)
{
- SslStateData *tunnelState = (SslStateData *)data;
+ TunnelStateData *tunnelState = (TunnelStateData *)data;
assert (cbdataReferenceValid (tunnelState));
assert(fd == tunnelState->server.fd());
@@ -321,7 +321,7 @@
}
void
-SslStateData::writeServerDone(char *buf, size_t len, comm_err_t flag, int xerrno)
+TunnelStateData::writeServerDone(char *buf, size_t len, comm_err_t flag, int xerrno)
{
debugs(26, 3, "tunnelWriteServer: FD " << server.fd() << ", " << len << " bytes written");
@@ -358,9 +358,9 @@
/* Writes data from the server buffer to the client side */
void
-SslStateData::WriteClientDone(int fd, char *buf, size_t len, comm_err_t flag, int xerrno, void *data)
+TunnelStateData::WriteClientDone(int fd, char *buf, size_t len, comm_err_t flag, int xerrno, void *data)
{
- SslStateData *tunnelState = (SslStateData *)data;
+ TunnelStateData *tunnelState = (TunnelStateData *)data;
assert (cbdataReferenceValid (tunnelState));
assert(fd == tunnelState->client.fd());
@@ -368,7 +368,7 @@
}
void
-SslStateData::Connection::dataSent (size_t amount)
+TunnelStateData::Connection::dataSent (size_t amount)
{
assert(amount == (size_t)len);
len =0;
@@ -379,7 +379,7 @@
}
void
-SslStateData::writeClientDone(char *buf, size_t len, comm_err_t flag, int xerrno)
+TunnelStateData::writeClientDone(char *buf, size_t len, comm_err_t flag, int xerrno)
{
debugs(26, 3, "tunnelWriteClient: FD " << client.fd() << ", " << len << " bytes written");
@@ -416,7 +416,7 @@
static void
tunnelTimeout(int fd, void *data)
{
- SslStateData *tunnelState = (SslStateData *)data;
+ TunnelStateData *tunnelState = (TunnelStateData *)data;
debugs(26, 3, "tunnelTimeout: FD " << fd);
/* Temporary lock to protect our own feets (comm_close -> tunnelClientClosed -> Free) */
cbdataInternalLock(tunnelState);
@@ -427,14 +427,14 @@
}
void
-SslStateData::Connection::closeIfOpen()
+TunnelStateData::Connection::closeIfOpen()
{
if (fd() != -1)
comm_close(fd());
}
void
-SslStateData::copyRead(Connection &from, IOCB *completion)
+TunnelStateData::copyRead(Connection &from, IOCB *completion)
{
assert(from.len == 0);
comm_read(from.fd(), from.buf, from.bytesWanted(1, SQUID_TCP_SO_RCVBUF), completion, this);
@@ -443,7 +443,7 @@
static void
tunnelConnectTimeout(int fd, void *data)
{
- SslStateData *tunnelState = (SslStateData *)data;
+ TunnelStateData *tunnelState = (TunnelStateData *)data;
HttpRequest *request = tunnelState->request;
ErrorState *err = NULL;
@@ -477,7 +477,7 @@
static void
tunnelConnectedWriteDone(int fd, char *buf, size_t size, comm_err_t flag, int xerrno, void *data)
{
- SslStateData *tunnelState = (SslStateData *)data;
+ TunnelStateData *tunnelState = (TunnelStateData *)data;
if (flag != COMM_OK) {
tunnelErrorComplete(fd, data, 0);
@@ -485,8 +485,8 @@
}
if (cbdataReferenceValid(tunnelState)) {
- tunnelState->copyRead(tunnelState->server, SslStateData::ReadServer);
- tunnelState->copyRead(tunnelState->client, SslStateData::ReadClient);
+ tunnelState->copyRead(tunnelState->server, TunnelStateData::ReadServer);
+ tunnelState->copyRead(tunnelState->client, TunnelStateData::ReadClient);
}
}
@@ -502,7 +502,7 @@
static void
tunnelConnected(int fd, void *data)
{
- SslStateData *tunnelState = (SslStateData *)data;
+ TunnelStateData *tunnelState = (TunnelStateData *)data;
debugs(26, 3, "tunnelConnected: FD " << fd << " tunnelState=" << tunnelState);
*tunnelState->status_ptr = HTTP_OK;
comm_write(tunnelState->client.fd(), conn_established, strlen(conn_established),
@@ -512,7 +512,7 @@
static void
tunnelErrorComplete(int fdnotused, void *data, size_t sizenotused)
{
- SslStateData *tunnelState = (SslStateData *)data;
+ TunnelStateData *tunnelState = (TunnelStateData *)data;
assert(tunnelState != NULL);
/* temporary lock to save our own feets (comm_close -> tunnelClientClosed -> Free) */
cbdataInternalLock(tunnelState);
@@ -530,7 +530,7 @@
static void
tunnelConnectDone(int fdnotused, comm_err_t status, int xerrno, void *data)
{
- SslStateData *tunnelState = (SslStateData *)data;
+ TunnelStateData *tunnelState = (TunnelStateData *)data;
HttpRequest *request = tunnelState->request;
ErrorState *err = NULL;
@@ -578,7 +578,7 @@
tunnelStart(ClientHttpRequest * http, size_t * size_ptr, int *status_ptr)
{
/* Create state structure. */
- SslStateData *tunnelState = NULL;
+ TunnelStateData *tunnelState = NULL;
int sock;
ErrorState *err = NULL;
int answer;
@@ -633,7 +633,7 @@
return;
}
- tunnelState = new SslStateData;
+ tunnelState = new TunnelStateData;
#if DELAY_POOLS
tunnelState->server.setDelayId(DelayId::DelayClient(http));
@@ -673,7 +673,7 @@
static void
tunnelProxyConnected(int fd, void *data)
{
- SslStateData *tunnelState = (SslStateData *)data;
+ TunnelStateData *tunnelState = (TunnelStateData *)data;
HttpHeader hdr_out(hoRequest);
Packer p;
http_state_flags flags;
@@ -701,7 +701,7 @@
static void
tunnelPeerSelectComplete(FwdServer * fs, void *data)
{
- SslStateData *tunnelState = (SslStateData *)data;
+ TunnelStateData *tunnelState = (TunnelStateData *)data;
HttpRequest *request = tunnelState->request;
peer *g = NULL;
@@ -750,38 +750,38 @@
tunnelState);
}
-CBDATA_CLASS_INIT(SslStateData);
+CBDATA_CLASS_INIT(TunnelStateData);
void *
-SslStateData::operator new (size_t)
+TunnelStateData::operator new (size_t)
{
- CBDATA_INIT_TYPE(SslStateData);
- SslStateData *result = cbdataAlloc(SslStateData);
+ CBDATA_INIT_TYPE(TunnelStateData);
+ TunnelStateData *result = cbdataAlloc(TunnelStateData);
return result;
}
void
-SslStateData::operator delete (void *address)
+TunnelStateData::operator delete (void *address)
{
- SslStateData *t = static_cast<SslStateData *>(address);
+ TunnelStateData *t = static_cast<TunnelStateData *>(address);
cbdataFree(t);
}
void
-SslStateData::Connection::fd(int const newFD)
+TunnelStateData::Connection::fd(int const newFD)
{
fd_ = newFD;
}
bool
-SslStateData::noConnections() const
+TunnelStateData::noConnections() const
{
return (server.fd() == -1) && (client.fd() == -1);
}
#if DELAY_POOLS
void
-SslStateData::Connection::setDelayId(DelayId const &newDelay)
+TunnelStateData::Connection::setDelayId(DelayId const &newDelay)
{
delayId = newDelay;
}
++++++ 10839.patch ++++++
---------------------
PatchSet 10839
Date: 2007/06/02 12:01:34
Author: hno
Branch: HEAD
Tag: (none)
Log:
Bug #1983: Update the read timeout when reading from an CONNECT tunnel
Members:
src/tunnel.cc:1.170->1.171
Index: squid3/src/tunnel.cc
===================================================================
RCS file: /cvsroot/squid/squid3/src/tunnel.cc,v
retrieving revision 1.170
retrieving revision 1.171
diff -u -r1.170 -r1.171
--- squid3/src/tunnel.cc 2 Jun 2007 11:54:26 -0000 1.170
+++ squid3/src/tunnel.cc 2 Jun 2007 12:01:34 -0000 1.171
@@ -1,6 +1,6 @@
/*
- * $Id: tunnel.cc,v 1.170 2007/06/02 11:54:26 hno Exp $
+ * $Id: tunnel.cc,v 1.171 2007/06/02 12:01:34 hno Exp $
*
* DEBUG: section 26 Secure Sockets Layer Proxy
* AUTHOR: Duane Wessels
@@ -229,6 +229,8 @@
debugs(26, 3, "tunnelReadServer: FD " << server.fd() << ", read " << len << " bytes");
+ commSetTimeout(server.fd(), Config.Timeout.read, tunnelTimeout, this);
+
if (len > 0) {
server.bytesIn(len);
kb_incr(&statCounter.server.all.kbytes_in, len);
++++++ 10840.patch ++++++
---------------------
PatchSet 10840
Date: 2007/06/02 12:21:57
Author: hno
Branch: HEAD
Tag: (none)
Log:
Bug #1983: Update the read timeout when reading from an CONNECT tunnel
Also need to deal with the timeout while sending data to the server,
or the timeout might trigger during a large PUT/POST.
Members:
src/tunnel.cc:1.171->1.172
Index: squid3/src/tunnel.cc
===================================================================
RCS file: /cvsroot/squid/squid3/src/tunnel.cc,v
retrieving revision 1.171
retrieving revision 1.172
diff -u -r1.171 -r1.172
--- squid3/src/tunnel.cc 2 Jun 2007 12:01:34 -0000 1.171
+++ squid3/src/tunnel.cc 2 Jun 2007 12:21:57 -0000 1.172
@@ -1,6 +1,6 @@
/*
- * $Id: tunnel.cc,v 1.171 2007/06/02 12:01:34 hno Exp $
+ * $Id: tunnel.cc,v 1.172 2007/06/02 12:21:57 hno Exp $
*
* DEBUG: section 26 Secure Sockets Layer Proxy
* AUTHOR: Duane Wessels
@@ -229,8 +229,6 @@
debugs(26, 3, "tunnelReadServer: FD " << server.fd() << ", read " << len << " bytes");
- commSetTimeout(server.fd(), Config.Timeout.read, tunnelTimeout, this);
-
if (len > 0) {
server.bytesIn(len);
kb_incr(&statCounter.server.all.kbytes_in, len);
@@ -296,6 +294,10 @@
*/
cbdataInternalLock(this); /* ??? should be locked by the caller... */
+ /* Bump the server connection timeout on any activity */
+ if (server.fd() != -1)
+ commSetTimeout(server.fd(), Config.Timeout.read, tunnelTimeout, this);
+
if (len < 0 || errcode)
from.error (xerrno);
else if (len == 0 || to.fd() == -1) {
++++++ 10841.patch ++++++
---------------------
PatchSet 10841
Date: 2007/06/02 23:46:00
Author: hno
Branch: HEAD
Tag: (none)
Log:
Database auth helper using Perl DBI
Members:
configure.in:1.455->1.456
helpers/basic_auth/Makefile.am:1.7->1.8
helpers/basic_auth/DB/Makefile.am:INITIAL->1.1
helpers/basic_auth/DB/db_auth.pl:INITIAL->1.1
helpers/basic_auth/DB/passwd.sql:INITIAL->1.1
Index: squid3/configure.in
===================================================================
RCS file: /cvsroot/squid/squid3/configure.in,v
retrieving revision 1.455
retrieving revision 1.456
diff -u -r1.455 -r1.456
--- squid3/configure.in 20 May 2007 04:22:43 -0000 1.455
+++ squid3/configure.in 2 Jun 2007 23:46:00 -0000 1.456
@@ -3291,6 +3291,7 @@
helpers/basic_auth/multi-domain-NTLM/Makefile \
helpers/basic_auth/SASL/Makefile \
helpers/basic_auth/POP3/Makefile \
+ helpers/basic_auth/DB/Makefile \
helpers/digest_auth/Makefile \
helpers/digest_auth/password/Makefile \
helpers/digest_auth/ldap/Makefile \
Index: squid3/helpers/basic_auth/Makefile.am
===================================================================
RCS file: /cvsroot/squid/squid3/helpers/basic_auth/Makefile.am,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- squid3/helpers/basic_auth/Makefile.am 9 Dec 2006 23:28:23 -0000 1.7
+++ squid3/helpers/basic_auth/Makefile.am 2 Jun 2007 23:49:23 -0000 1.8
@@ -1,7 +1,7 @@
# Makefile for storage modules in the Squid Object Cache server
#
-# $Id: Makefile.am,v 1.7 2006/12/09 23:28:23 hno Exp $
+# $Id: Makefile.am,v 1.8 2007/06/02 23:49:23 hno Exp $
#
-DIST_SUBDIRS = getpwnam LDAP MSNT multi-domain-NTLM NCSA PAM SMB YP SASL mswin_sspi POP3
+DIST_SUBDIRS = getpwnam LDAP MSNT multi-domain-NTLM NCSA PAM SMB YP SASL mswin_sspi POP3 DB
SUBDIRS = @BASIC_AUTH_HELPERS@
--- /dev/null Sat Jun 2 23:49:46 2007
+++ squid3/helpers/basic_auth/DB/Makefile.am Sat Jun 2 23:49:47 2007
@@ -0,0 +1,14 @@
+#
+# Makefile for the Squid Object Cache server
+#
+# $Id: Makefile.am,v 1.1 2007/06/02 23:46:00 hno Exp $
+#
+# Uncomment and customize the following to suit your needs:
+#
+
+libexec_SCRIPTS = \
+ db_auth.pl
+
+EXTRA_DIST = \
+ db_auth.pl \
+ passwd.sql
--- /dev/null Sat Jun 2 23:49:46 2007
+++ squid3/helpers/basic_auth/DB/db_auth.pl Sat Jun 2 23:49:47 2007
@@ -0,0 +1,125 @@
+#!/usr/bin/perl
+use strict;
+use DBI;
+use Getopt::Long;
+use Pod::Usage;
+
+=pod
+
+=head1 NAME
+
+db_auth.pl - Database auth helper for Squid
+
+=cut
+
+my $dsn = "DBI:mysql:database=squid";
+my $db_user = undef;
+my $db_passwd = undef;
+my $db_table = "passwd";
+my $db_usercol = "user";
+my $db_passwdcol = "password";
+my $db_cond = "enabled = 1";
+my $plaintext = 0;
+
+=pod
+
+=head1 SYNOPSIS
+
+db_auth.pl [options]
+
+=head1 DESCRIPTOIN
+
+This program verifies username & password to a database
+
+=over 8
+
+=item B<--dsn>
+
+Database DSN. Default "DBI:mysql:database=squid"
+
+=item B<--user>
+
+Database User
+
+=item B<--password>
+
+Database password
+
+=item B<--table>
+
+Database table. Default "passwd".
+
+=item B<--usercol>
+
+Username column. Default "user".
+
+=item B<--passwdcol>
+
+Password column. Default "password".
+
+=item B<--cond>
+
+Condition, defaults to enabled=1. Specify 1 or "" for no condition
+
+=item B<--plaintext>
+
+Database contains plain-text passwords
+
+=back
+
+=cut
+
+GetOptions(
+ 'dsn=s' => \$dsn,
+ 'user=s' => \$db_user,
+ 'password=s' => \$db_passwd,
+ 'table=s' => \$db_table,
+ 'usercol=s' => \$db_usercol,
+ 'passwdcol=s' => \$db_passwdcol,
+ 'cond=s' => \$db_cond,
+ 'plaintext' => \$plaintext,
+ );
+
+my $dbh = DBI->connect($dsn, $db_user, $db_passwd) || die ("Could not connect to $dsn\n");
+
+my ($sth) = $dbh->prepare("SELECT $db_passwdcol FROM $db_table WHERE $db_usercol = ?" . ($db_cond ne "" ? " AND $db_cond" : "")) || die;
+
+my $status;
+
+sub check_password($$)
+{
+ my ($password, $key) = @_;
+
+ return 1 if crypt($password, $key) eq $key;
+
+ return 1 if $plaintext && $password eq $key;
+
+ return 0;
+}
+while (<>) {
+ my ($user, $password) = split;
+ $status = "ERR";
+ $user =~ s/%(..)/pack("H*", $1)/ge;
+ $password =~ s/%(..)/pack("H*", $1)/ge;
+
+ $status = "ERR internal error";
+ $sth->execute($user) || next;
+ $status = "ERR unknown login";
+ my ($row) = $sth->fetchrow_arrayref() || next;
+ $status = "ERR login failure";
+ next if (!check_password($password, @$row[0]));
+ $status = "OK";
+} continue {
+ print $status . "\n";
+}
+
+=pod
+
+=head1 COPYRIGHT
+
+Copyright (C) 2007 Henrik Nordstrom <henrik@xxxxxxxxxxxxxxxxxxx>
+This program is free software. You may redistribute copies of it under the
+terms of the GNU General Public License version 2, or (at youropinion) any
+later version.
+
+=cut
--- /dev/null Sat Jun 2 23:49:46 2007
+++ squid3/helpers/basic_auth/DB/passwd.sql Sat Jun 2 23:49:47 2007
@@ -0,0 +1,8 @@
+CREATE TABLE `passwd` (
+ `user` varchar(32) NOT NULL default '',
+ `password` varchar(35) NOT NULL default '',
+ `enabled` tinyint(1) NOT NULL default '1',
+ `fullname` varchar(60) default NULL,
+ `comment` varchar(60) default NULL,
+ PRIMARY KEY (`user`)
+);
++++++ 10843.patch ++++++
---------------------
PatchSet 10843
Date: 2007/06/10 10:43:17
Author: hno
Branch: HEAD
Tag: (none)
Log:
Restore the code making helpers run in their own sessions.
Having the helpers in the same session / process group as Squid broke
debugging with Squid running in foreground, which is worth more than
to have the process associations entirely correct.
Members:
src/ipc.cc:1.45->1.46
Index: squid3/src/ipc.cc
===================================================================
RCS file: /cvsroot/squid/squid3/src/ipc.cc,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -r1.45 -r1.46
--- squid3/src/ipc.cc 28 Apr 2007 22:26:37 -0000 1.45
+++ squid3/src/ipc.cc 10 Jun 2007 10:43:17 -0000 1.46
@@ -1,6 +1,6 @@
/*
- * $Id: ipc.cc,v 1.45 2007/04/28 22:26:37 hno Exp $
+ * $Id: ipc.cc,v 1.46 2007/06/10 10:43:17 hno Exp $
*
* DEBUG: section 54 Interprocess Communication
* AUTHOR: Duane Wessels
@@ -386,6 +386,10 @@
squid_signal(SIGHUP, SIG_IGN, SA_RESETHAND);
}
+#if HAVE_SETSID
+ setsid();
+#endif
+
execvp(prog, (char *const *) args);
debug_log = fdopen(2, "a+");
++++++ 10844.patch ++++++
---------------------
PatchSet 10844
Date: 2007/06/10 11:02:23
Author: hno
Branch: HEAD
Tag: (none)
Log:
Bug #1939: --enable-epoll causes SSL to occationally hang
This patch makes comm_epoll support the "read_pending" flag, indicating
data has been buffered at the I/O layer and is immediately available for
processing without having to wait for an I/O event.
kqueue still needs fixing.
Members:
src/comm_epoll.cc:1.15->1.16
src/comm_kqueue.cc:1.15->1.16
src/comm_poll.cc:1.21->1.22
src/comm_select.cc:1.79->1.80
Index: squid3/src/comm_epoll.cc
===================================================================
RCS file: /cvsroot/squid/squid3/src/comm_epoll.cc,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- squid3/src/comm_epoll.cc 28 Apr 2007 22:26:37 -0000 1.15
+++ squid3/src/comm_epoll.cc 10 Jun 2007 11:02:23 -0000 1.16
@@ -1,6 +1,6 @@
/*
- * $Id: comm_epoll.cc,v 1.15 2007/04/28 22:26:37 hno Exp $
+ * $Id: comm_epoll.cc,v 1.16 2007/06/10 11:02:23 hno Exp $
*
* DEBUG: section 5 Socket Functions
*
@@ -152,8 +152,12 @@
// If read is an interest
if (type & COMM_SELECT_READ) {
- if (handler)
+ if (handler) {
+ // Hack to keep the events flowing if there is data immediately ready
+ if (F->flags.read_pending)
+ ev.events |= EPOLLOUT;
ev.events |= EPOLLIN;
+ }
F->read_handler = handler;
@@ -281,17 +285,17 @@
// TODO: add EPOLLPRI??
- if (cevents->events & (EPOLLIN|EPOLLHUP|EPOLLERR)) {
+ if (cevents->events & (EPOLLIN|EPOLLHUP|EPOLLERR) || F->flags.read_pending) {
if ((hdl = F->read_handler) != NULL) {
debugs(5, DEBUG_EPOLL ? 0 : 8, "comm_select(): Calling read handler on FD " << fd);
PROF_start(comm_write_handler);
+ F->flags.read_pending = 0;
F->read_handler = NULL;
hdl(fd, F->read_data);
PROF_stop(comm_write_handler);
statCounter.select_fds++;
} else {
debugs(5, DEBUG_EPOLL ? 0 : 8, "comm_select(): no read handler for FD " << fd);
- fd_table[fd].flags.read_pending = 1;
// remove interest since no handler exist for this event.
commSetSelect(fd, COMM_SELECT_READ, NULL, NULL, 0);
}
@@ -306,7 +310,6 @@
PROF_stop(comm_read_handler);
statCounter.select_fds++;
} else {
- fd_table[fd].flags.write_pending = 1;
debugs(5, DEBUG_EPOLL ? 0 : 8, "comm_select(): no write handler for FD " << fd);
// remove interest since no handler exist for this event.
commSetSelect(fd, COMM_SELECT_WRITE, NULL, NULL, 0);
Index: squid3/src/comm_kqueue.cc
===================================================================
RCS file: /cvsroot/squid/squid3/src/comm_kqueue.cc,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- squid3/src/comm_kqueue.cc 28 Apr 2007 22:26:37 -0000 1.15
+++ squid3/src/comm_kqueue.cc 10 Jun 2007 11:02:23 -0000 1.16
@@ -1,6 +1,6 @@
/*
- * $Id: comm_kqueue.cc,v 1.15 2007/04/28 22:26:37 hno Exp $
+ * $Id: comm_kqueue.cc,v 1.16 2007/06/10 11:02:23 hno Exp $
*
* DEBUG: section 5 Socket Functions
*
@@ -45,6 +45,7 @@
*
* - delay pools
* - deferred reads
+ * - flags.read_pending
*
* So, its not entirely useful in a production setup since if a read
* is meant to be deferred it isn't (we're not even throwing the event
@@ -280,6 +281,7 @@
if ((hdl = F->read_handler) != NULL) {
F->read_handler = NULL;
+ F->flags.read_pending = 0;
hdl(fd, F->read_data);
}
Index: squid3/src/comm_poll.cc
===================================================================
RCS file: /cvsroot/squid/squid3/src/comm_poll.cc,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- squid3/src/comm_poll.cc 30 Apr 2007 16:56:09 -0000 1.21
+++ squid3/src/comm_poll.cc 10 Jun 2007 11:02:23 -0000 1.22
@@ -1,6 +1,6 @@
/*
- * $Id: comm_poll.cc,v 1.21 2007/04/30 16:56:09 wessels Exp $
+ * $Id: comm_poll.cc,v 1.22 2007/06/10 11:02:23 hno Exp $
*
* DEBUG: section 5 Socket Functions
*
@@ -524,6 +524,7 @@
else {
PROF_start(comm_read_handler);
F->read_handler = NULL;
+ F->flags.read_pending = 0;
hdl(fd, F->read_data);
PROF_stop(comm_read_handler);
statCounter.select_fds++;
@@ -607,6 +608,7 @@
if ((hdl = F->read_handler)) {
F->read_handler = NULL;
+ F->flags.read_pending = 0;
hdl(fd, F->read_data);
statCounter.select_fds++;
Index: squid3/src/comm_select.cc
===================================================================
RCS file: /cvsroot/squid/squid3/src/comm_select.cc,v
retrieving revision 1.79
retrieving revision 1.80
diff -u -r1.79 -r1.80
--- squid3/src/comm_select.cc 30 Apr 2007 16:56:09 -0000 1.79
+++ squid3/src/comm_select.cc 10 Jun 2007 11:02:23 -0000 1.80
@@ -1,6 +1,6 @@
/*
- * $Id: comm_select.cc,v 1.79 2007/04/30 16:56:09 wessels Exp $
+ * $Id: comm_select.cc,v 1.80 2007/06/10 11:02:23 hno Exp $
*
* DEBUG: section 5 Socket Functions
*
@@ -568,6 +568,7 @@
else {
F->read_handler = NULL;
+ F->flags.read_pending = 0;
commUpdateReadBits(fd, NULL);
hdl(fd, F->read_data);
statCounter.select_fds++;
@@ -663,6 +664,7 @@
if ((hdl = F->read_handler)) {
F->read_handler = NULL;
+ F->flags.read_pending = 0;
commUpdateReadBits(fd, NULL);
hdl(fd, F->read_data);
statCounter.select_fds++;
++++++ 10845.patch ++++++
---------------------
PatchSet 10845
Date: 2007/06/10 12:07:28
Author: hno
Branch: HEAD
Tag: (none)
Log:
Clean up configure magics selecting which comm loop to use, promote epoll to stable
This is basically a copy from Squid-2, making configure a bit smarter
in selecting which comm loop to use, and automatically enabling epoll
if it seems usable.
kqueue is still not activated automatically even if defected as the
comm_kqueue implementation is still experimental and known to have issues
Members:
configure.in:1.456->1.457
Index: squid3/configure.in
===================================================================
RCS file: /cvsroot/squid/squid3/configure.in,v
retrieving revision 1.456
retrieving revision 1.457
diff -u -r1.456 -r1.457
--- squid3/configure.in 2 Jun 2007 23:46:00 -0000 1.456
+++ squid3/configure.in 10 Jun 2007 12:07:28 -0000 1.457
@@ -1060,6 +1060,7 @@
yes)
echo "Forcing poll() to be enabled"
ac_cv_func_poll='yes'
+ SELECT_TYPE="poll"
;;
no)
echo "Forcing poll() to be disabled"
@@ -1078,6 +1079,7 @@
yes)
echo "Forcing select() to be enabled"
ac_cv_func_select='yes'
+ SELECT_TYPE="select"
;;
no)
echo "Forcing select() to be disabled"
@@ -1096,6 +1098,7 @@
yes)
echo "Forcing kqueue() to be enabled"
ac_cv_func_kqueue='yes'
+ SELECT_TYPE="kqueue"
;;
no)
echo "Forcing kqueue() to be disabled"
@@ -1113,11 +1116,12 @@
case "$enableval" in
yes)
echo "Forcing epoll() to be enabled"
- ac_cv_func_epoll='yes'
+ ac_cv_func_epoll_ctl='yes'
+ SELECT_TYPE="epoll"
;;
no)
echo "Forcing epoll() to be disabled"
- ac_cv_func_epoll='no'
+ ac_cv_func_epoll_ctl='no'
;;
esac
])
@@ -2569,6 +2573,7 @@
gettimeofday \
htobe16 \
htole16 \
+ kqueue\
lrand48 \
mallinfo \
mallocblksize \
@@ -2612,32 +2617,64 @@
vsnprintf \
)
+# Check for libepoll
+EPOLL_LIB=
+AC_CHECK_LIB(epoll, epoll_ctl, [EPOLL_LIBS="-lepoll"])
+AC_SUBST(EPOLL_LIBS)
+
+# Check for epoll_ctl, may need -lepoll
+SAVED_LIBS="$LIBS"
+LIBS="$LIBS $LIB_EPOLL"
+AC_CHECK_FUNCS(epoll_ctl)
+LIBS="$SAVED_LIBS"
+
+dnl Verify that epoll really works
+if test $ac_cv_func_epoll_ctl = yes; then
+ AC_CACHE_CHECK(if epoll works, ac_cv_epoll_works,
+ AC_TRY_RUN([
+#include <sys/epoll.h>
+#include <stdlib.h>
+#include <stdio.h>
+int main(int argc, char **argv)
+{
+ int fd = epoll_create(256);
+ if (fd < 0) {
+ perror("epoll_create:");
+ exit(1);
+ }
+ exit(0);
+}
+ ], [ac_cv_epoll_works=yes], [ac_cv_epoll_works=no]))
+ if test ac_cv_epoll_works = no && test ac_force_epoll = yes; then
+ echo "Error - no epoll found";
+ echo "Try running 'sh ./scripts/get_epoll-lib.sh'";
+ echo "then run configure again";
+ exit -1
+ fi
+fi
+
dnl Magic which checks whether we are forcing a type of comm loop we
dnl are actually going to (ab)use
dnl Actually do the define magic now
dnl mostly ripped from squid-commloops, thanks to adrian and benno
-if test "$ac_cv_func_kqueue" = "yes" ; then
- SELECT_TYPE="kqueue"
- AC_DEFINE(USE_KQUEUE,1,[Use kqueue() for the IO loop])
-elif test "$ac_cv_func_epoll" = "yes" ; then
+if test -n "$SELECT_TYPE"; then
+ : # Already decided above. Nothing to do here
+elif test "$ac_cv_epoll_works" = "yes" ; then
SELECT_TYPE="epoll"
- AC_DEFINE(USE_EPOLL,1,[Use epoll() for the IO loop])
- AC_CHECK_LIB(epoll, epoll_create, [EPOLL_LIBS="-lepoll"])
- AC_SUBST(EPOLL_LIBS)
+#comm_kqueue a bit broken. Don't enable automatically
+#elif test "$ac_cv_func_kqueue" = "yes" ; then
+# SELECT_TYPE="kqueue"
elif test "$ac_cv_func_poll" = "yes" ; then
SELECT_TYPE="poll"
- AC_DEFINE(USE_POLL,1,[Use poll() for the IO loop])
elif test "$ac_cv_func_select" = "yes" ; then
case "$host_os" in
mingw|mingw32)
SELECT_TYPE="select_win32"
- AC_DEFINE(USE_SELECT_WIN32,1,[Use Winsock select() for the IO loop])
;;
*)
SELECT_TYPE="select"
- AC_DEFINE(USE_SELECT,1,[Use select() for the IO loop])
;;
esac
else
@@ -2646,7 +2683,34 @@
SELECT_TYPE="select"
AC_DEFINE(USE_SELECT,1)
fi
-echo "Using ${SELECT_TYPE} for select loop."
+
+echo "Using ${SELECT_TYPE} for the IO loop."
+
+AM_CONDITIONAL([USE_POLL], [test $SELECT_TYPE = poll])
+AM_CONDITIONAL([USE_EPOLL], [test $SELECT_TYPE = epoll])
+AM_CONDITIONAL([USE_SELECT], [test $SELECT_TYPE = select])
+AM_CONDITIONAL([USE_SELECT_SIMPLE], [test $SELECT_TYPE = select_simple])
+AM_CONDITIONAL([USE_SELECT_WIN32], [test $SELECT_TYPE = select_win32])
+AM_CONDITIONAL([USE_KQUEUE], [test $SELECT_TYPE = kqueue])
+AM_CONDITIONAL([USE_DEVPOLL], [test $SELECT_TYPE = devpoll])
+
+case $SELECT_TYPE in
+epoll)
+ AC_DEFINE(USE_EPOLL,1,[Use epoll() for the IO loop])
+ ;;
+poll)
+ AC_DEFINE(USE_POLL,1,[Use poll() for the IO loop])
+ ;;
+kqueue)
+ AC_DEFINE(USE_KQUEUE,1,[Use kqueue() for the IO loop])
+ ;;
+select_win32)
+ AC_DEFINE(USE_SELECT_WIN32,1,[Use Winsock select() for the IO loop])
+ ;;
+select)
+ AC_DEFINE(USE_SELECT,1,[Use select() for the IO loop])
+ ;;
+esac
dnl Yay! Another Linux brokenness. Its not good enough
++++++ 10846.patch ++++++
---------------------
PatchSet 10846
Date: 2007/06/10 12:08:07
Author: hno
Branch: HEAD
Tag: (none)
Log:
Mark kqueue as experimental
Members:
configure.in:1.457->1.458
Index: squid3/configure.in
===================================================================
RCS file: /cvsroot/squid/squid3/configure.in,v
retrieving revision 1.457
retrieving revision 1.458
diff -u -r1.457 -r1.458
--- squid3/configure.in 10 Jun 2007 12:07:28 -0000 1.457
+++ squid3/configure.in 10 Jun 2007 12:08:07 -0000 1.458
@@ -1090,7 +1090,7 @@
dnl Enable kqueue()
AC_ARG_ENABLE(kqueue,
-[ --enable-kqueue Enable kqueue() support.
+[ --enable-kqueue Enable kqueue() support (experimental).
--disable-kqueue Disable kqueue() support. ],
[
++++++ 10848.patch ++++++
---------------------
PatchSet 10848
Date: 2007/06/10 12:13:31
Author: hno
Branch: HEAD
Tag: (none)
Log:
Kill old stale code dealing with deferred reads and delay pools.
Squid-3 already have a deferred read infrastructure dealing with
buffering and delay pools, taking filedescriptors in/out from the
active set when needed. The comm loops don't need to emulate this.
Members:
src/comm_poll.cc:1.22->1.23
src/comm_select.cc:1.80->1.81
Index: squid3/src/comm_poll.cc
===================================================================
RCS file: /cvsroot/squid/squid3/src/comm_poll.cc,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- squid3/src/comm_poll.cc 10 Jun 2007 11:02:23 -0000 1.22
+++ squid3/src/comm_poll.cc 10 Jun 2007 12:13:31 -0000 1.23
@@ -1,6 +1,6 @@
/*
- * $Id: comm_poll.cc,v 1.22 2007/06/10 11:02:23 hno Exp $
+ * $Id: comm_poll.cc,v 1.23 2007/06/10 12:13:31 hno Exp $
*
* DEBUG: section 5 Socket Functions
*
@@ -179,36 +179,6 @@
return 0;
}
-#if DELAY_POOLS
-static int slowfdcnt = 0;
-static int slowfdarr[SQUID_MAXFD];
-
-static void
-commAddSlowFd(int fd)
-{
- assert(slowfdcnt < SQUID_MAXFD);
- slowfdarr[slowfdcnt++] = fd;
-}
-
-static int
-commGetSlowFd(void)
-{
- int whichfd, retfd;
-
- if (!slowfdcnt)
- return -1;
-
- whichfd = squid_random() % slowfdcnt;
-
- retfd = slowfdarr[whichfd];
-
- slowfdarr[whichfd] = slowfdarr[--slowfdcnt];
-
- return retfd;
-}
-
-#endif
-
static int
comm_check_incoming_poll_handlers(int nfds, int *fds)
{
@@ -354,10 +324,6 @@
{
struct pollfd pfds[SQUID_MAXFD];
-#if DELAY_POOLS
-
- fd_set slowfds;
-#endif
PF *hdl = NULL;
int fd;
@@ -373,10 +339,6 @@
double start;
getCurrentTime();
start = current_dtime;
-#if DELAY_POOLS
-
- FD_ZERO(&slowfds);
-#endif
if (commCheckICPIncoming)
comm_poll_icp_incoming();
@@ -513,14 +475,6 @@
if (NULL == (hdl = F->read_handler))
(void) 0;
-
-#if DELAY_POOLS
-
- else if (FD_ISSET(fd, &slowfds))
- commAddSlowFd(fd);
-
-#endif
-
else {
PROF_start(comm_read_handler);
F->read_handler = NULL;
@@ -600,30 +554,6 @@
if (callhttp)
comm_poll_http_incoming();
-#if DELAY_POOLS
-
- while ((fd = commGetSlowFd()) != -1) {
- fde *F = &fd_table[fd];
- debugs(5, 6, "comm_select: slow FD " << fd << " selected for reading");
-
- if ((hdl = F->read_handler)) {
- F->read_handler = NULL;
- F->flags.read_pending = 0;
- hdl(fd, F->read_data);
- statCounter.select_fds++;
-
- if (commCheckICPIncoming)
- comm_poll_icp_incoming();
-
- if (commCheckDNSIncoming)
- comm_poll_dns_incoming();
-
- if (commCheckHTTPIncoming)
- comm_poll_http_incoming();
- }
- }
-
-#endif
getCurrentTime();
statCounter.select_time += (current_dtime - start);
Index: squid3/src/comm_select.cc
===================================================================
RCS file: /cvsroot/squid/squid3/src/comm_select.cc,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -r1.80 -r1.81
--- squid3/src/comm_select.cc 10 Jun 2007 11:02:23 -0000 1.80
+++ squid3/src/comm_select.cc 10 Jun 2007 12:13:31 -0000 1.81
@@ -1,6 +1,6 @@
/*
- * $Id: comm_select.cc,v 1.80 2007/06/10 11:02:23 hno Exp $
+ * $Id: comm_select.cc,v 1.81 2007/06/10 12:13:31 hno Exp $
*
* DEBUG: section 5 Socket Functions
*
@@ -191,36 +191,6 @@
return 0;
}
-#if DELAY_POOLS
-static int slowfdcnt = 0;
-static int slowfdarr[SQUID_MAXFD];
-
-static void
-commAddSlowFd(int fd)
-{
- assert(slowfdcnt < SQUID_MAXFD);
- slowfdarr[slowfdcnt++] = fd;
-}
-
-static int
-commGetSlowFd(void)
-{
- int whichfd, retfd;
-
- if (!slowfdcnt)
- return -1;
-
- whichfd = squid_random() % slowfdcnt;
-
- retfd = slowfdarr[whichfd];
-
- slowfdarr[whichfd] = slowfdarr[--slowfdcnt];
-
- return retfd;
-}
-
-#endif
-
static int
comm_check_incoming_select_handlers(int nfds, int *fds)
{
@@ -362,10 +332,6 @@
fd_set readfds;
fd_set pendingfds;
fd_set writefds;
-#if DELAY_POOLS
-
- fd_set slowfds;
-#endif
PF *hdl = NULL;
int fd;
@@ -394,10 +360,6 @@
double start;
getCurrentTime();
start = current_dtime;
-#if DELAY_POOLS
-
- FD_ZERO(&slowfds);
-#endif
if (commCheckICPIncoming)
comm_select_icp_incoming();
@@ -558,14 +520,6 @@
if (NULL == (hdl = F->read_handler))
(void) 0;
-
-#if DELAY_POOLS
-
- else if (FD_ISSET(fd, &slowfds))
- commAddSlowFd(fd);
-
-#endif
-
else {
F->read_handler = NULL;
F->flags.read_pending = 0;
@@ -656,31 +610,6 @@
if (callhttp)
comm_select_http_incoming();
-#if DELAY_POOLS
-
- while ((fd = commGetSlowFd()) != -1) {
- F = &fd_table[fd];
- debugs(5, 6, "comm_select: slow FD " << fd << " selected for reading");
-
- if ((hdl = F->read_handler)) {
- F->read_handler = NULL;
- F->flags.read_pending = 0;
- commUpdateReadBits(fd, NULL);
- hdl(fd, F->read_data);
- statCounter.select_fds++;
-
- if (commCheckICPIncoming)
- comm_select_icp_incoming();
-
- if (commCheckDNSIncoming)
- comm_select_dns_incoming();
-
- if (commCheckHTTPIncoming)
- comm_select_http_incoming();
- }
- }
-
-#endif
getCurrentTime();
statCounter.select_time += (current_dtime - start);
++++++ squid-3.0.PRE5.tar.bz2 -> squid-3.0.PRE6.tar.bz2 ++++++
++++ 156901 lines of diff (skipped)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-commit+help@xxxxxxxxxxxx
| < Previous | Next > |