]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Merged from trunk
authorFrancesco Chemolli <kinkie@squid-cache.org>
Wed, 11 Dec 2013 17:53:13 +0000 (18:53 +0100)
committerFrancesco Chemolli <kinkie@squid-cache.org>
Wed, 11 Dec 2013 17:53:13 +0000 (18:53 +0100)
544 files changed:
CREDITS
ChangeLog
Makefile.am
SPONSORS.list
compat/compat.h
compat/compat_shared.h
compat/getnameinfo.c
configure.ac
doc/manuals/ar.po
doc/manuals/de.po
doc/manuals/fr.po
doc/manuals/it.po
doc/release-notes/Makefile
doc/release-notes/release-3.3.sgml
doc/release-notes/release-3.4.sgml
doc/release-notes/release-3.5.sgml [new file with mode: 0644]
errors/af.po
errors/aliases
errors/ar.po
errors/az.po
errors/bg.po
errors/ca.po
errors/de.po
errors/fa.po
errors/fi.po
errors/fr.po
errors/hy.po
errors/id.po
errors/it.po
errors/ja.po
errors/ms.po
errors/nl.po
errors/pt.po
errors/sr-latn.po
errors/sv.po
errors/tr.po
errors/uk.po
helpers/basic_auth/MSNT/allowusers.cc
helpers/basic_auth/MSNT/denyusers.cc
helpers/basic_auth/NCSA/crypt_md5.cc
helpers/basic_auth/NIS/nis_support.cc
helpers/basic_auth/NIS/required.m4
helpers/basic_auth/RADIUS/basic_radius_auth.cc
helpers/digest_auth/LDAP/digest_common.h
helpers/digest_auth/eDirectory/digest_common.h
helpers/external_acl/kerberos_ldap_group/kerberos_ldap_group.cc
helpers/external_acl/kerberos_ldap_group/support_ldap.cc
helpers/negotiate_auth/kerberos/negotiate_kerberos.h
helpers/negotiate_auth/kerberos/negotiate_kerberos_auth.cc
helpers/negotiate_auth/kerberos/negotiate_kerberos_pac.cc
include/cache_snmp.h
include/snmp.h
lib/Makefile.am
lib/encrypt.c
lib/libTrie/Trie.cc
lib/libTrie/TrieNode.cc
lib/libTrie/TrieNode.cci
lib/rfc2617.c
lib/rfc2671.c
lib/rfc3596.c
lib/rfcnb/std-includes.h
lib/smblib/bad-chain.c
lib/smblib/exper.c
lib/smblib/file.c
lib/smblib/smblib-api.c
lib/smblib/smblib-priv.h
lib/smblib/smblib-util.c
lib/smblib/smblib.c
lib/smblib/smblib.h
lib/snmplib/CMU-SNMP-ReleaseNotes.txt [moved from snmplib/CMU-SNMP-ReleaseNotes.txt with 100% similarity]
lib/snmplib/Makefile.am [moved from snmplib/Makefile.am with 100% similarity]
lib/snmplib/asn1.c [moved from snmplib/asn1.c with 100% similarity]
lib/snmplib/coexistance.c [moved from snmplib/coexistance.c with 100% similarity]
lib/snmplib/mib.c [moved from snmplib/mib.c with 100% similarity]
lib/snmplib/parse.c [moved from snmplib/parse.c with 100% similarity]
lib/snmplib/snmp_api.c [moved from snmplib/snmp_api.c with 100% similarity]
lib/snmplib/snmp_api_error.c [moved from snmplib/snmp_api_error.c with 100% similarity]
lib/snmplib/snmp_error.c [moved from snmplib/snmp_error.c with 100% similarity]
lib/snmplib/snmp_msg.c [moved from snmplib/snmp_msg.c with 100% similarity]
lib/snmplib/snmp_pdu.c [moved from snmplib/snmp_pdu.c with 100% similarity]
lib/snmplib/snmp_vars.c [moved from snmplib/snmp_vars.c with 100% similarity]
lib/snmplib/snmplib_debug.c [moved from snmplib/snmplib_debug.c with 100% similarity]
mksnapshot-cron.sh
scripts/source-maintenance.sh
src/AccessLogEntry.h
src/AclRegs.cc
src/BodyPipe.h
src/ChunkedCodingParser.cc
src/ClientInfo.h
src/CommCalls.h
src/CommRead.h
src/CommonPool.h
src/DelayPool.cc
src/DelayPool.h
src/DelayTagged.h
src/DelayUser.h
src/DescriptorSet.cc
src/DiskIO/AIO/AIODiskFile.cc
src/DiskIO/AIO/AIODiskFile.h
src/DiskIO/AIO/AIODiskIOStrategy.cc
src/DiskIO/AIO/AIODiskIOStrategy.h
src/DiskIO/AIO/aio_win32.cc
src/DiskIO/Blocking/BlockingFile.cc
src/DiskIO/Blocking/BlockingIOStrategy.cc
src/DiskIO/DiskDaemon/DiskdAction.h
src/DiskIO/DiskDaemon/DiskdFile.cc
src/DiskIO/DiskDaemon/DiskdIOStrategy.cc
src/DiskIO/DiskThreads/DiskThreads.h
src/DiskIO/DiskThreads/DiskThreadsDiskFile.cc
src/DiskIO/DiskThreads/async_io.cc
src/DiskIO/IpcIo/IpcIoFile.cc
src/DiskIO/IpcIo/IpcIoFile.h
src/DiskIO/Mmapped/MmappedFile.cc
src/EventLoop.cc
src/EventLoop.h
src/ExternalACLEntry.cc
src/ExternalACLEntry.h
src/FadingCounter.cc
src/FwdState.cc
src/FwdState.h
src/HelperChildConfig.cc
src/HelperReply.cc
src/HierarchyLogEntry.h
src/HttpControlMsg.h
src/HttpHdrCc.cc
src/HttpHdrCc.cci
src/HttpHdrCc.h
src/HttpHdrRange.cc
src/HttpHdrSc.cc
src/HttpHdrScTarget.h
src/HttpHeader.cc
src/HttpHeaderFieldInfo.h
src/HttpHeaderTools.cc
src/HttpMsg.h
src/HttpReply.cc
src/HttpReply.h
src/ICP.h
src/LeakFinder.cc
src/Makefile.am
src/MemBlob.cc
src/MessageSizes.h [new file with mode: 0644]
src/Notes.cc
src/Notes.h
src/Packer.cc
src/Parsing.cc
src/PeerSelectState.h
src/RefreshPattern.h
src/SBuf.cc
src/SBufDetailedStats.cc [new file with mode: 0644]
src/SBufDetailedStats.h [new file with mode: 0644]
src/SBufStatsAction.cc
src/SBufStatsAction.h
src/Server.cc
src/Server.h
src/SquidConfig.h
src/SquidString.h
src/StatHist.cc
src/StatHist.h
src/Store.cci
src/StoreIOBuffer.h
src/StoreMeta.cc
src/StoreMetaObjSize.h
src/StoreMetaSTD.cc
src/StoreMetaSTDLFS.cc
src/StoreMetaURL.cc
src/StoreMetaUnpacker.cc
src/StoreMetaVary.cc
src/StoreStats.cc
src/String.cci
src/WinSvc.cc
src/acl/Acl.cc
src/acl/Acl.h
src/acl/AclAddress.h
src/acl/AdaptationService.cc [new file with mode: 0644]
src/acl/AdaptationService.h [new file with mode: 0644]
src/acl/AdaptationServiceData.cc [new file with mode: 0644]
src/acl/AdaptationServiceData.h [new file with mode: 0644]
src/acl/AllOf.cc
src/acl/Asn.cc
src/acl/Asn.h
src/acl/Browser.cc
src/acl/Certificate.cc
src/acl/Certificate.h
src/acl/CertificateData.cc
src/acl/CertificateData.h
src/acl/DestinationDomain.cc
src/acl/DestinationDomain.h
src/acl/DomainData.cc
src/acl/DomainData.h
src/acl/FilledChecklist.cc
src/acl/FilledChecklist.h
src/acl/Gadgets.cc
src/acl/Gadgets.h
src/acl/HierCode.cc
src/acl/HierCode.h
src/acl/HierCodeData.cc
src/acl/HttpHeaderData.cc
src/acl/HttpRepHeader.cc
src/acl/HttpRepHeader.h
src/acl/HttpReqHeader.cc
src/acl/HttpReqHeader.h
src/acl/HttpStatus.cc
src/acl/InnerNode.h
src/acl/IntRange.cc
src/acl/Ip.cc
src/acl/Ip.h
src/acl/LocalIp.cc
src/acl/LocalPort.cc
src/acl/LocalPort.h
src/acl/Makefile.am
src/acl/Method.cc
src/acl/Method.h
src/acl/MethodData.cc
src/acl/MyPortName.h
src/acl/Note.cc
src/acl/Note.h
src/acl/NoteData.cc
src/acl/NoteData.h
src/acl/PeerName.cc
src/acl/PeerName.h
src/acl/Protocol.cc
src/acl/Protocol.h
src/acl/ProtocolData.cc
src/acl/Referer.cc
src/acl/RegexData.cc
src/acl/ReplyHeaderStrategy.h
src/acl/ReplyMimeType.cc
src/acl/ReplyMimeType.h
src/acl/RequestHeaderStrategy.h
src/acl/RequestMimeType.cc
src/acl/RequestMimeType.h
src/acl/ServerCertificate.cc
src/acl/ServerCertificate.h
src/acl/SourceDomain.cc
src/acl/SourceDomain.h
src/acl/SourceIp.cc
src/acl/SslError.cc
src/acl/SslError.h
src/acl/SslErrorData.cc
src/acl/SslErrorData.h
src/acl/Strategised.h
src/acl/StringData.cc
src/acl/StringData.h
src/acl/Tag.cc
src/acl/Tag.h
src/acl/TimeData.cc
src/acl/TimeData.h
src/acl/Url.cc
src/acl/UrlLogin.cc
src/acl/UrlLogin.h
src/acl/UrlPath.cc
src/acl/UrlPath.h
src/acl/UrlPort.cc
src/acl/UrlPort.h
src/acl/UserData.cc
src/acl/UserData.h
src/adaptation/AccessCheck.cc
src/adaptation/AccessCheck.h
src/adaptation/Config.cc
src/adaptation/Config.h
src/adaptation/History.cc
src/adaptation/History.h
src/adaptation/Initiate.cc
src/adaptation/Initiate.h
src/adaptation/Iterator.cc
src/adaptation/Iterator.h
src/adaptation/Service.cc
src/adaptation/Service.h
src/adaptation/ServiceConfig.h
src/adaptation/ServiceFilter.cc
src/adaptation/ServiceFilter.h
src/adaptation/ServiceGroups.h
src/adaptation/ecap/Config.cc
src/adaptation/ecap/Host.cc
src/adaptation/ecap/Host.h
src/adaptation/ecap/MessageRep.cc
src/adaptation/ecap/MessageRep.h
src/adaptation/ecap/ServiceRep.cc
src/adaptation/ecap/ServiceRep.h
src/adaptation/ecap/XactionRep.cc
src/adaptation/ecap/XactionRep.h
src/adaptation/icap/Client.cc
src/adaptation/icap/Config.cc
src/adaptation/icap/Config.h
src/adaptation/icap/InOut.h
src/adaptation/icap/Launcher.cc
src/adaptation/icap/Launcher.h
src/adaptation/icap/ModXact.cc
src/adaptation/icap/ModXact.h
src/adaptation/icap/OptXact.cc
src/adaptation/icap/OptXact.h
src/adaptation/icap/ServiceRep.cc
src/adaptation/icap/ServiceRep.h
src/adaptation/icap/Xaction.h
src/adaptation/icap/icap_log.cc
src/auth/Acl.cc
src/auth/AclMaxUserIp.cc
src/auth/AclProxyAuth.cc
src/auth/AclProxyAuth.h
src/auth/Config.cc
src/auth/Config.h
src/auth/Gadgets.cc
src/auth/Gadgets.h
src/auth/Makefile.am
src/auth/Scheme.cc
src/auth/Scheme.h
src/auth/User.cc
src/auth/User.cci [deleted file]
src/auth/User.h
src/auth/UserRequest.cc
src/auth/UserRequest.h
src/auth/basic/Scheme.h
src/auth/basic/User.cc
src/auth/basic/User.h
src/auth/basic/UserRequest.cc
src/auth/basic/UserRequest.h
src/auth/basic/auth_basic.cc
src/auth/basic/auth_basic.h
src/auth/digest/Scheme.h
src/auth/digest/User.cc
src/auth/digest/User.h
src/auth/digest/UserRequest.cc
src/auth/digest/UserRequest.h
src/auth/digest/auth_digest.cc
src/auth/digest/auth_digest.h
src/auth/negotiate/Scheme.h
src/auth/negotiate/User.cc
src/auth/negotiate/User.h
src/auth/negotiate/UserRequest.cc
src/auth/negotiate/UserRequest.h
src/auth/negotiate/auth_negotiate.cc
src/auth/negotiate/auth_negotiate.h
src/auth/ntlm/Scheme.h
src/auth/ntlm/User.cc
src/auth/ntlm/User.h
src/auth/ntlm/UserRequest.cc
src/auth/ntlm/UserRequest.h
src/auth/ntlm/auth_ntlm.cc
src/auth/ntlm/auth_ntlm.h
src/base/AsyncCallQueue.cc
src/base/Makefile.am
src/base/StringArea.h [deleted file]
src/cache_cf.cc
src/cache_manager.cc
src/cbdata.h
src/cf.data.pre
src/clientStream.cc
src/client_db.cc
src/client_side.cc
src/client_side_request.cc
src/client_side_request.h
src/comm.cc
src/comm.h
src/comm/ConnOpener.cc
src/comm/ConnOpener.h
src/comm/ModSelect.cc
src/comm/TcpAcceptor.cc
src/comm/TcpAcceptor.h
src/comm/forward.h
src/debug.cc
src/delay_pools.cc
src/dns_internal.cc
src/errorpage.cc
src/esi/Context.cc
src/esi/Context.h
src/esi/CustomParser.cc
src/esi/Esi.cc
src/esi/Include.cc
src/esi/Module.cc
src/esi/Sequence.cc
src/esi/VarState.h
src/event.cc
src/event.h
src/external_acl.cc
src/format/ByteCode.h
src/format/Config.cc
src/format/Format.cc
src/format/Token.cc
src/fs/rock/RockIoState.cc
src/fs/rock/RockRebuild.cc
src/fs/rock/RockSwapDir.cc
src/fs/rock/RockSwapDir.h
src/fs/ufs/RebuildState.h
src/fs/ufs/UFSStoreState.cc
src/fs/ufs/UFSStrategy.cc
src/fs/ufs/UFSSwapDir.cc
src/fs/ufs/UFSSwapDir.h
src/ftp.cc
src/helper.cc
src/helper.h
src/htcp.cc
src/http.cc
src/icmp/Icmp.cc
src/icmp/Icmp4.cc
src/icmp/Icmp6.cc
src/icmp/IcmpPinger.cc
src/icmp/Makefile.am
src/icp_v2.cc
src/icp_v3.cc
src/ident/Ident.cc
src/internal.cc
src/ip/Address.cc
src/ip/Intercept.cc
src/ip/Qos.cci
src/ip/QosConfig.cc
src/ip/testAddress.cc
src/ipc.cc
src/ipc/Inquirer.h
src/ipc/Kid.cc
src/ipc/Kids.cc
src/ipc/Port.cc
src/ipc/Port.h
src/ipc/Queue.h
src/ipc/ReadWriteLock.cc
src/ipc/SharedListen.cc
src/ipc/StartListening.h
src/ipc/StoreMap.cc
src/ipc/StoreMap.h
src/ipc/Strand.cc
src/ipc/TypedMsgHdr.cc
src/ipc/TypedMsgHdr.h
src/ipc/UdsOp.cc
src/ipc/UdsOp.h
src/ipc/mem/Pages.cc
src/ipcache.cc
src/log/FormatHttpdCombined.cc
src/log/FormatHttpdCommon.cc
src/log/FormatSquidNative.cc
src/log/ModDaemon.cc
src/log/TcpLogger.cc
src/log/access_log.cc
src/main.cc
src/mem.cc
src/mem_node.h
src/mgr/Action.cc
src/mgr/BasicActions.cc
src/mgr/Forwarder.cc
src/mgr/InfoAction.cc
src/mgr/Inquirer.cc
src/mgr/IoAction.h
src/mgr/QueryParams.cc
src/mgr/StoreToCommWriter.cc
src/neighbors.cc
src/pconn.cc
src/peer_digest.cc
src/peer_select.cc
src/redirect.cc
src/refresh.cc
src/repl/heap/store_heap_replacement.cc
src/repl/heap/store_repl_heap.cc
src/repl/lru/store_repl_lru.cc
src/snmp/Forwarder.cc
src/snmp/Inquirer.cc
src/snmp/Pdu.cc
src/snmp/Request.cc
src/snmp_agent.cc
src/snmp_core.cc
src/ssl/ErrorDetail.cc
src/ssl/ErrorDetail.h
src/ssl/ErrorDetailManager.cc
src/ssl/ErrorDetailManager.h
src/ssl/cert_validate_message.cc
src/ssl/cert_validate_message.h
src/ssl/context_storage.cc
src/ssl/context_storage.h
src/ssl/crtd_message.cc
src/ssl/helper.cc
src/ssl/helper.h
src/ssl/ssl_crtd.cc
src/ssl/support.cc
src/stat.cc
src/stmem.h
src/store.cc
src/store_client.cc
src/store_dir.cc
src/store_io.cc
src/store_log.cc
src/store_rebuild.cc
src/store_swapin.cc
src/store_swapout.cc
src/tests/SBufFindTest.cc
src/tests/Stub.list
src/tests/stub_CacheDigest.cc [new file with mode: 0644]
src/tests/stub_ETag.cc [new file with mode: 0644]
src/tests/stub_EventLoop.cc [new file with mode: 0644]
src/tests/stub_HelperChildConfig.cc
src/tests/stub_HttpReply.cc
src/tests/stub_MemObject.cc
src/tests/stub_SBufDetailedStats.cc [new file with mode: 0644]
src/tests/stub_StoreMeta.cc [new file with mode: 0644]
src/tests/stub_SwapDir.cc [new file with mode: 0644]
src/tests/stub_cache_manager.cc
src/tests/stub_carp.cc [new file with mode: 0644]
src/tests/stub_event.cc
src/tests/stub_external_acl.cc [new file with mode: 0644]
src/tests/stub_http.cc
src/tests/stub_libauth.cc [new file with mode: 0644]
src/tests/stub_libauth_acls.cc [new file with mode: 0644]
src/tests/stub_libformat.cc
src/tests/stub_libmgr.cc
src/tests/stub_mem.cc
src/tests/stub_pconn.cc
src/tests/stub_redirect.cc [new file with mode: 0644]
src/tests/stub_store.cc
src/tests/stub_store_client.cc
src/tests/stub_store_digest.cc [new file with mode: 0644]
src/tests/stub_time.cc [new file with mode: 0644]
src/tests/stub_tunnel.cc [new file with mode: 0644]
src/tests/stub_wccp2.cc [new file with mode: 0644]
src/tests/stub_whois.cc [new file with mode: 0644]
src/tests/testACLMaxUserIP.cc
src/tests/testAuth.cc
src/tests/testBoilerplate.cc
src/tests/testCacheManager.cc
src/tests/testConfigParser.cc
src/tests/testDiskIO.cc
src/tests/testEventLoop.cc
src/tests/testHttpParser.cc
src/tests/testHttpReply.cc
src/tests/testHttpRequest.cc
src/tests/testHttpRequestMethod.cc
src/tests/testRock.cc
src/tests/testSBuf.cc
src/tests/testStatHist.cc
src/tests/testStatHist.h
src/tests/testStore.cc
src/tests/testStoreController.cc
src/tests/testStoreEntryStream.cc
src/tests/testStoreHashIndex.cc
src/tests/testStoreSupport.cc
src/tests/testString.cc
src/tests/testURL.cc
src/tests/testUfs.cc
src/tests/testVector.cc
src/tests/test_http_range.cc
src/tools.cc
src/tunnel.cc
src/ufsdump.cc
src/unlinkd.cc
src/whois.cc
src/wordlist.cc
test-suite/mem_hdr_test.cc
test-suite/syntheticoperators.cc
tools/purge/purge.cc

diff --git a/CREDITS b/CREDITS
index cf99ccce234bb4129cf5bfc00202a43a2de882a1..6535df159dc606c767072e498ef2daae22907845 100644 (file)
--- a/CREDITS
+++ b/CREDITS
@@ -115,7 +115,7 @@ Modified to work with strings instead of files.
 
 ==============================================================================
 
-snmplib/*:
+lib/snmplib/*:
 include/{asn1.h,parse.h,snmp*}:
 
 The SNMP library code is developed by Carnegie Mellon University.
index ab98623900922baa9c69760b1ccf5f15aa183719..22a59ab989ed184ea26297b106da9d0a4e2bb8f5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+Changes to squid-3.4.1 (09 Dec 2013):
+
+       - Bug 3935: Invalid pointer dereference when peeking at origin server certificate
+       - Bug 3589: intercepted and ICAP modified request using a cache_peer
+       - ... and several portability fixes
+       - ... and some documentation updates
+
+Changes to squid-3.4.0.3 (01 Dec 2013):
+
+       - Bug 3941: Release notes error
+       - Receive annotations from authentication and external ACL helpers
+       - basic_nis_auth: Improved portability
+       - ... and several documentation updates
+       - ... and all bug fixes from 3.3.9, 3.3.10, 3.3.11
+
 Changes to squid-3.4.0.2 (03 Oct 2013):
 
        - Regression Bug 3891: squid.conf parser errors in 3.4.0.1
@@ -54,6 +69,40 @@ Changes to squid-3.4.0.1 (29 Jul 2013):
        - ... and many documentation changes
        - ... and much code cleanup and polishing
 
+Changes to squid-3.3.11 (01 Dec 2013):
+
+       - Regression Bug 3936: error-details.txt parse error with OpenSSL since 3.3.9
+       - Bug 3972: Segfault when getting the deny_info page ID after a reconfigure
+       - Bug 3970: max_filedescriptors disabled due to missing setrlimit
+       - Bug 3967: ipc/Kid.cc compilation failure: 'time' was not declared in this scope
+       - Bug 3960: DEAD cache_peer are not revived
+       - Bug 3956: xstrndup: tried to dup a NULL pointer
+       - Bug 3906: Filedescriptor leaks in SNMP
+       - Bug 3782: Digest authentication not obeying nonce_max_count
+       - HTTP/1.1: Make header parser obey relaxed_header_parser
+       - HTTP/1.1: Re-compute Range response content offset after an FTP response was adapted
+       - SMP: Replace blocking sleep(3) and close UDS socket on failures
+       - Windows: fix several compile errors
+
+Changes to squid-3.3.10 (03 Nov 2013):
+
+       - Bug 3929: request_header_add not working for tunnel requests
+       - Bug 3923: cbdata and undefined behavior due to dynamic runtime enumeration
+       - Bug 3918: Self Test Failures on Mac OS X 10.8
+       - Bug 3887: tcp_outgoing_tos not working for IPv6
+       - Bug 3836: Fix issues with automake 1.13+ and make check
+       - Bug 3480: StoreEntry::kickProducer() segfaults in store_client::copy()
+       - Fix pinning hierarchy log information
+       - Fix close idle client connections associated with closed idle pinned connections.
+       - Fix cbdata 'error: expression result unused' errors
+       - Avoid "hot idle": A series of rapid select() calls with zero timeout.
+       - Append Connection:close to OPTIONS requests when icap_persistent_connections is off
+       - ntlm_fake_auth: pass DOMAIN data to Squid in original case
+       - kerberos_ldap_group: fix LDAP string duplication
+       - Use IPv6 localhost nameserver on DNS configuration errors
+       - Add cache_miss_revalidate
+       - ... and several portability improvements
+
 Changes to squid-3.3.9 (11 Sep 2013):
 
        - Regression Bug 3077: off-by-one error in Digest header decoding
index ca9910928410800ecdb5788ba0158fbc4bc45068..af8dea245f6461b210987965115c79ffeebbd5bd 100644 (file)
@@ -2,8 +2,8 @@
 #
 
 AUTOMAKE_OPTIONS = dist-bzip2 subdir-objects 1.5 foreign
-DIST_SUBDIRS   = compat lib libltdl snmplib scripts icons errors contrib doc helpers src test-suite tools
-SUBDIRS                = compat lib $(makesnmplib)
+DIST_SUBDIRS   = compat lib libltdl scripts icons errors contrib doc helpers src test-suite tools
+SUBDIRS                = compat lib
 if USE_LOADABLE_MODULES
 SUBDIRS += libltdl
 endif
index 3796f645d7db9dc367f7b63e5dc0200151b38a38..6a572de1dc178be3efb2546f908679a6b7fda840 100644 (file)
@@ -13,6 +13,12 @@ Messagenet - http://messagenet.it/
        Messagenet donated hardware and bandwidth for the wiki server
        and most continuous integration testing.
 
+RackSpace - http://www.rackspace.com/
+
+       RackSpace donated a number of virtual machines from their cloud
+       infrastructure to support and extend the continuous integration
+       testing infrastructure.
+
 The Measurement Factory - http://www.measurement-factory.com/
 
        Measurement Factory has constributed significant resources
index f9d20a8622f8a862421769a9637beadc09ed34a9..54720192bf0d18115dbc00a26621d34c4d5bb881 100644 (file)
@@ -76,9 +76,9 @@
 /* components as found to be needed                  */
 /*****************************************************/
 
+#include "compat/assert.h"
 #include "compat/compat_shared.h"
 #include "compat/stdvarargs.h"
-#include "compat/assert.h"
 
 /* cstdio has a bunch of problems with 64-bit definitions */
 #include "compat/stdio.h"
index db7439a2db9dc2d2d73d036ae36c4250d57dce8f..a24043b31059694e308bc8279ddfc79034fa5485 100644 (file)
@@ -208,10 +208,10 @@ extern "C" {
  * Several function definitions which we provide for security and code safety.
  */
 #include "compat/xalloc.h"
+#include "compat/xis.h"
 #include "compat/xstrerror.h"
 #include "compat/xstring.h"
 #include "compat/xstrto.h"
-#include "compat/xis.h"
 
 /*
  * strtoll() is needed. Squid provides a portable definition.
index aa8716c6077195e48e39aeb6c7e370b03761db2a..cfa5433f63d2b801c0ffa10bfb8431c685d39343 100644 (file)
@@ -75,8 +75,8 @@
 
 #if !HAVE_GETNAMEINFO
 
-#include "compat/inet_ntop.h"
 #include "compat/getaddrinfo.h"
+#include "compat/inet_ntop.h"
 
 #if HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
index 2e956d232af76e2007f6ae22625450c953bcb3a4..d42f07f7761a5b3f4cc94aa72c339ac4c33a8fa6 100644 (file)
@@ -833,13 +833,16 @@ for fs in $squid_storeio_module_candidates none; do
          "x$squid_disk_module_candidates_Blocking" != "xyes"; then
          AC_MSG_ERROR([Storage module Rock requires IpcIo or Blocking DiskIO module])
        fi
-       STORE_TESTS="$STORE_TESTS tests/testRock$EXEEXT"
+       squid_do_build_rock=true
        ;;
     ufs)
-      STORE_TESTS="$STORE_TESTS tests/testUfs$EXEEXT"
+       squid_do_build_ufs=true
+       ;;
     esac
 done
-
+AM_CONDITIONAL(HAVE_FS_UFS,[test "x$squid_do_build_ufs" = "xtrue" ])
+AM_CONDITIONAL(HAVE_FS_ROCK,[test "x$squid_do_build_rock" = "xtrue" ])
 dnl hack: need to define those even if not used in the build system to
 dnl make sure that global FS objects are linked to the squid binary.
 AH_TEMPLATE(HAVE_FS_UFS, "Define to 1 if ufs filesystem module is build")
@@ -1037,10 +1040,10 @@ then
 
   if test -n "$PKG_CONFIG"; then
     dnl eCAP support requires libecap.
-    dnl This Squid supports libecap v0.2.x.
+    dnl This Squid supports libecap v1.0.x.
     dnl Use EXT_ prefix to distinguish external libecap (that we check for
     dnl here) from our own convenience ecap library in Makefiles.
-    PKG_CHECK_MODULES([EXT_LIBECAP],[libecap >= 0.2.0 libecap < 0.3])
+    PKG_CHECK_MODULES([EXT_LIBECAP],[libecap >= 1.0 libecap < 1.1])
   else
     AC_MSG_NOTICE([eCAP support requires pkg-config to verify the correct library version. Trouble may follow.])
   fi
@@ -1123,7 +1126,7 @@ SQUID_DEFINE_BOOL(SQUID_SNMP,${enable_snmp:=yes},
    [Define to enable SNMP monitoring of Squid])
 AM_CONDITIONAL(ENABLE_SNMP, [test "x$enable_snmp" = "xyes"])
 if test "x$enable_snmp" = "xyes"; then
-    SNMPLIB='../snmplib/libsnmplib.a'
+    SNMPLIB='../lib/snmplib/libsnmplib.a'
     makesnmplib=snmplib
 fi
 AC_MSG_NOTICE([SNMP support enabled: $enable_snmp])
@@ -2531,7 +2534,6 @@ case "$squid_host_os" in
     ;;
 esac
 
-
 dnl --with-maxfd present for compatibility with Squid-2.
 dnl undocumented in ./configure --help  to encourage using the Squid-3 directive
 AC_ARG_WITH(maxfd,,
@@ -2539,6 +2541,7 @@ AC_ARG_WITH(maxfd,,
   case ${withval} in
     [[0-9]]*)
       squid_filedescriptors_num=$withval
+      AC_MSG_NOTICE([forcing default of $squid_filedescriptors_num filedescriptors (user-forced)])
       ;;
     *)
       AC_MSG_ERROR(--with-maxfd expects a numeric argument)
@@ -2553,6 +2556,7 @@ AC_ARG_WITH(filedescriptors,
   case ${withval} in
     [[0-9]]*)
       squid_filedescriptors_num=$withval
+      AC_MSG_NOTICE([forcing default of $squid_filedescriptors_num filedescriptors (user-forced)])
       ;;
     *)
       AC_MSG_ERROR(--with-filedescriptors expects a numeric argument)
@@ -2561,10 +2565,9 @@ AC_ARG_WITH(filedescriptors,
 ])
 
 SQUID_CHECK_DEFAULT_FD_SETSIZE
-if test "x$squid_filedescriptors_num" = "x"; then
-  SQUID_CHECK_MAXFD
-else
-  AC_MSG_NOTICE([forcing use of $squid_filedescriptors_num filedescriptors (user-forced)])
+SQUID_CHECK_MAXFD
+if test "x$squid_filedescriptors_num" != "x"; then
+  AC_MSG_NOTICE([Default number of fieldescriptors: $squid_filedescriptors_num])
 fi
 if test "$squid_filedescriptors_num" -lt 512 ; then
     AC_MSG_WARN([$squid_filedescriptors_num may not be enough filedescriptors if your])
@@ -3388,100 +3391,100 @@ AC_MSG_NOTICE([BUILD EXTRA C++ FLAGS: $SQUID_CXXFLAGS])
 dnl Clean up after OSF/1 core dump bug
 rm -f core 
 
-AC_CONFIG_FILES([\
-       Makefile \
-       compat/Makefile \
-       lib/Makefile \
-       lib/ntlmauth/Makefile \
-       lib/libTrie/Makefile \
-       lib/libTrie/test/Makefile \
-       lib/profiler/Makefile \
-       lib/rfcnb/Makefile \
-       lib/smblib/Makefile \
-       scripts/Makefile \
-       src/Makefile \
-       src/anyp/Makefile \
-       src/base/Makefile \
-       src/acl/Makefile \
-       src/fs/Makefile \
-       src/repl/Makefile \
-       src/auth/Makefile \
-       src/auth/basic/Makefile \
-       src/auth/digest/Makefile \
-       src/auth/negotiate/Makefile \
-       src/auth/ntlm/Makefile \
-       src/adaptation/Makefile \
-       src/adaptation/icap/Makefile \
-       src/adaptation/ecap/Makefile \
-       src/comm/Makefile \
-       src/esi/Makefile \
-       src/eui/Makefile \
-       src/format/Makefile \
-       src/http/Makefile \
-       src/icmp/Makefile \
-       src/ident/Makefile \
-       src/ip/Makefile \
-       src/log/Makefile \
-       src/ipc/Makefile \
-       src/ssl/Makefile \
-       src/mgr/Makefile \
-       src/parser/Makefile \
-       src/snmp/Makefile \
-       contrib/Makefile \
-       snmplib/Makefile \
-       icons/Makefile \
-       errors/Makefile \
-       test-suite/Makefile \
-       doc/Makefile \
-       doc/manuals/Makefile \
-       helpers/Makefile \
-       helpers/basic_auth/Makefile \
-       helpers/basic_auth/DB/Makefile \
-       helpers/basic_auth/fake/Makefile \
-       helpers/basic_auth/getpwnam/Makefile \
-       helpers/basic_auth/LDAP/Makefile \
-       helpers/basic_auth/MSNT/Makefile \
-       helpers/basic_auth/MSNT-multi-domain/Makefile \
-       helpers/basic_auth/NCSA/Makefile \
-       helpers/basic_auth/NIS/Makefile \
-       helpers/basic_auth/PAM/Makefile \
-       helpers/basic_auth/POP3/Makefile \
-       helpers/basic_auth/RADIUS/Makefile \
-       helpers/basic_auth/SASL/Makefile \
-       helpers/basic_auth/SMB/Makefile \
-       helpers/basic_auth/SSPI/Makefile \
-       helpers/digest_auth/Makefile \
-       helpers/digest_auth/eDirectory/Makefile \
-       helpers/digest_auth/file/Makefile \
-       helpers/digest_auth/LDAP/Makefile \
-       helpers/ntlm_auth/Makefile \
-       helpers/ntlm_auth/fake/Makefile \
-       helpers/ntlm_auth/smb_lm/Makefile \
-       helpers/ntlm_auth/SSPI/Makefile \
-       helpers/negotiate_auth/Makefile \
-       helpers/negotiate_auth/kerberos/Makefile \
-       helpers/negotiate_auth/SSPI/Makefile \
-       helpers/negotiate_auth/wrapper/Makefile \
-       helpers/external_acl/Makefile \
-       helpers/external_acl/AD_group/Makefile \
-       helpers/external_acl/eDirectory_userip/Makefile \
-       helpers/external_acl/file_userip/Makefile \
-       helpers/external_acl/kerberos_ldap_group/Makefile \
-       helpers/external_acl/LDAP_group/Makefile \
-       helpers/external_acl/LM_group/Makefile \
-       helpers/external_acl/session/Makefile \
-       helpers/external_acl/SQL_session/Makefile \
-       helpers/external_acl/unix_group/Makefile \
-       helpers/external_acl/wbinfo_group/Makefile \
-       helpers/external_acl/time_quota/Makefile \
-       helpers/log_daemon/Makefile \
-       helpers/log_daemon/DB/Makefile \
-       helpers/log_daemon/file/Makefile \
-       helpers/url_rewrite/Makefile \
-       helpers/url_rewrite/fake/Makefile \
-       helpers/ssl/Makefile \
-       helpers/storeid_rewrite/Makefile \
-       helpers/storeid_rewrite/file/Makefile \
+AC_CONFIG_FILES([
+       Makefile
+       compat/Makefile
+       lib/Makefile
+       lib/ntlmauth/Makefile
+       lib/libTrie/Makefile
+       lib/libTrie/test/Makefile
+       lib/profiler/Makefile
+       lib/rfcnb/Makefile
+       lib/smblib/Makefile
+       lib/snmplib/Makefile
+       scripts/Makefile
+       src/Makefile
+       src/anyp/Makefile
+       src/base/Makefile
+       src/acl/Makefile
+       src/fs/Makefile
+       src/repl/Makefile
+       src/auth/Makefile
+       src/auth/basic/Makefile
+       src/auth/digest/Makefile
+       src/auth/negotiate/Makefile
+       src/auth/ntlm/Makefile
+       src/adaptation/Makefile
+       src/adaptation/icap/Makefile
+       src/adaptation/ecap/Makefile
+       src/comm/Makefile
+       src/esi/Makefile
+       src/eui/Makefile
+       src/format/Makefile
+       src/http/Makefile
+       src/icmp/Makefile
+       src/ident/Makefile
+       src/ip/Makefile
+       src/log/Makefile
+       src/ipc/Makefile
+       src/ssl/Makefile
+       src/mgr/Makefile
+       src/parser/Makefile
+       src/snmp/Makefile
+       contrib/Makefile
+       icons/Makefile
+       errors/Makefile
+       test-suite/Makefile
+       doc/Makefile
+       doc/manuals/Makefile
+       helpers/Makefile
+       helpers/basic_auth/Makefile
+       helpers/basic_auth/DB/Makefile
+       helpers/basic_auth/fake/Makefile
+       helpers/basic_auth/getpwnam/Makefile
+       helpers/basic_auth/LDAP/Makefile
+       helpers/basic_auth/MSNT/Makefile
+       helpers/basic_auth/MSNT-multi-domain/Makefile
+       helpers/basic_auth/NCSA/Makefile
+       helpers/basic_auth/NIS/Makefile
+       helpers/basic_auth/PAM/Makefile
+       helpers/basic_auth/POP3/Makefile
+       helpers/basic_auth/RADIUS/Makefile
+       helpers/basic_auth/SASL/Makefile
+       helpers/basic_auth/SMB/Makefile
+       helpers/basic_auth/SSPI/Makefile
+       helpers/digest_auth/Makefile
+       helpers/digest_auth/eDirectory/Makefile
+       helpers/digest_auth/file/Makefile
+       helpers/digest_auth/LDAP/Makefile
+       helpers/ntlm_auth/Makefile
+       helpers/ntlm_auth/fake/Makefile
+       helpers/ntlm_auth/smb_lm/Makefile
+       helpers/ntlm_auth/SSPI/Makefile
+       helpers/negotiate_auth/Makefile
+       helpers/negotiate_auth/kerberos/Makefile
+       helpers/negotiate_auth/SSPI/Makefile
+       helpers/negotiate_auth/wrapper/Makefile
+       helpers/external_acl/Makefile
+       helpers/external_acl/AD_group/Makefile
+       helpers/external_acl/eDirectory_userip/Makefile
+       helpers/external_acl/file_userip/Makefile
+       helpers/external_acl/kerberos_ldap_group/Makefile
+       helpers/external_acl/LDAP_group/Makefile
+       helpers/external_acl/LM_group/Makefile
+       helpers/external_acl/session/Makefile
+       helpers/external_acl/SQL_session/Makefile
+       helpers/external_acl/unix_group/Makefile
+       helpers/external_acl/wbinfo_group/Makefile
+       helpers/external_acl/time_quota/Makefile
+       helpers/log_daemon/Makefile
+       helpers/log_daemon/DB/Makefile
+       helpers/log_daemon/file/Makefile
+       helpers/url_rewrite/Makefile
+       helpers/url_rewrite/fake/Makefile
+       helpers/ssl/Makefile
+       helpers/storeid_rewrite/Makefile
+       helpers/storeid_rewrite/file/Makefile
        tools/Makefile
        tools/purge/Makefile
 ])
index 3321890284a4ad2c42736ca202028dafcb528fe4..f7f24c31f0d2262501a36ffcb1173d19d3d124fc 100644 (file)
@@ -8,15 +8,17 @@ msgstr ""
 "Project-Id-Version: Squid-3\n"
 "Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
 "POT-Creation-Date: 2012-02-06 18:42+1400\n"
-"PO-Revision-Date: 2009-07-22 09:45+0000\n"
-"Last-Translator: Amos Jeffries <Unknown>\n"
+"PO-Revision-Date: 2013-10-31 11:22+0200\n"
+"Last-Translator: Amos <squid3@treenet.co.nz>\n"
 "Language-Team: Arabic <ar@li.org>\n"
 "Language: ar\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 "
+"&& n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n"
+"X-Generator: Pootle 2.1.6\n"
 "X-Launchpad-Export-Date: 2009-07-22 09:52+0000\n"
-"X-Generator: Launchpad (build Unknown)\n"
 
 #. type: SH
 #: helpers/basic_auth/getpwnam/basic_getpwnam_auth.8:3
@@ -599,9 +601,8 @@ msgstr ""
 #: helpers/basic_auth/LDAP/basic_ldap_auth.8:18
 #: helpers/basic_auth/LDAP/basic_ldap_auth.8:33
 #: helpers/external_acl/LDAP_group/ext_ldap_group_acl.8:20
-#, fuzzy
 msgid "LDAP server name"
-msgstr "B<-s >I<service-name>"
+msgstr ""
 
 #. type: Plain text
 #: helpers/basic_auth/LDAP/basic_ldap_auth.8:20
@@ -1059,9 +1060,8 @@ msgstr ""
 
 #. type: Plain text
 #: helpers/basic_auth/PAM/basic_pam_auth.8:11
-#, fuzzy
 msgid "service name"
-msgstr "B<-s >I<service-name>"
+msgstr ""
 
 #. type: Plain text
 #: helpers/basic_auth/PAM/basic_pam_auth.8:13
@@ -1163,9 +1163,8 @@ msgstr ""
 
 #. type: Plain text
 #: helpers/basic_auth/RADIUS/basic_radius_auth.8:16
-#, fuzzy
 msgid "server name"
-msgstr "B<-s >I<service-name>"
+msgstr ""
 
 #. type: Plain text
 #: helpers/basic_auth/RADIUS/basic_radius_auth.8:20
@@ -1180,9 +1179,8 @@ msgstr ""
 #. type: Plain text
 #: helpers/basic_auth/RADIUS/basic_radius_auth.8:24
 #: helpers/external_acl/session/ext_session_acl.8:14 tools/squidclient.1:38
-#, fuzzy
 msgid "timeout"
-msgstr "B<-s >I<service-name>"
+msgstr ""
 
 #. type: Plain text
 #: helpers/basic_auth/RADIUS/basic_radius_auth.8:30
@@ -2066,9 +2064,8 @@ msgstr ""
 
 #. type: Plain text
 #: helpers/external_acl/file_userip/ext_file_userip_acl.8:14
-#, fuzzy
 msgid "file name"
-msgstr "B<-s >I<service-name>"
+msgstr ""
 
 #. type: Plain text
 #: helpers/external_acl/file_userip/ext_file_userip_acl.8:19
index 80804646bc0e06e68db65984d71e48dd4fa08cd0..8f7d9e5e519d20f8dcc4ba6ca7f01182c9536045 100644 (file)
@@ -8,15 +8,15 @@ msgstr ""
 "Project-Id-Version: squid\n"
 "Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
 "POT-Creation-Date: 2012-02-06 18:42+1400\n"
-"PO-Revision-Date: 2010-06-06 10:48+0200\n"
-"Last-Translator: Robert Förster <Dessa@gmake.de>\n"
+"PO-Revision-Date: 2013-10-31 13:20+0200\n"
+"Last-Translator: Amos <squid3@treenet.co.nz>\n"
 "Language-Team: German <de@li.org>\n"
 "Language: de\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
-"X-Generator: Pootle 2.0.1\n"
+"X-Generator: Pootle 2.1.6\n"
 "X-Launchpad-Export-Date: 2010-01-10 09:12+0000\n"
 
 #. type: SH
@@ -863,7 +863,7 @@ msgstr ""
 #: helpers/basic_auth/LDAP/basic_ldap_auth.8:182
 #: helpers/external_acl/LDAP_group/ext_ldap_group_acl.8:170
 msgid "Do not follow referrals"
-msgstr ""
+msgstr "Folge nicht den Verweisen"
 
 #. type: Plain text
 #: helpers/basic_auth/LDAP/basic_ldap_auth.8:187
@@ -909,7 +909,7 @@ msgstr ""
 #: helpers/basic_auth/LDAP/basic_ldap_auth.8:222
 #: helpers/external_acl/LDAP_group/ext_ldap_group_acl.8:210
 msgid "Use TLS encryption"
-msgstr ""
+msgstr "Nutze TLS Verschlüsselung"
 
 #. type: Plain text
 #: helpers/basic_auth/LDAP/basic_ldap_auth.8:226
@@ -928,7 +928,7 @@ msgstr ""
 #: helpers/basic_auth/LDAP/basic_ldap_auth.8:237
 #: helpers/external_acl/LDAP_group/ext_ldap_group_acl.8:192
 msgid "Specify time limit on LDAP search operations"
-msgstr ""
+msgstr "Definiert das Zeitlimit bei LDAP-Suchanfragen"
 
 #. type: Plain text
 #: helpers/basic_auth/LDAP/basic_ldap_auth.8:243
index d5d05869fdb72fec223aa431c1d7c754d3e7520c..a8e001f61438ff8772a12476dd924cdda8bcd7e8 100644 (file)
@@ -7,7 +7,7 @@ msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2010-02-13 00:05+1400\n"
-"PO-Revision-Date: 2012-04-06 19:32+0200\n"
+"PO-Revision-Date: 2012-07-19 14:51+0200\n"
 "Last-Translator: Bernard <fli4l.charrier@free.fr>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
 "Language: fr\n"
@@ -47,7 +47,7 @@ msgid ""
 "to validate the user name and password of Basic HTTP authentication."
 msgstr ""
 "B<basic_getpwnam_auth> permet d'authentifier les comptes utilisateurs locaux "
-"de Squid, pour valider le nom d'utilisateur et le mot de passe de "
+"de Squid, pour valider le nom d'utilisateur et le mot de passe via "
 "l'authentification HTTP de base."
 
 #. type: Plain text
@@ -276,7 +276,7 @@ msgid ""
 "separated by a space."
 msgstr ""
 "B<basic_ldap_auth> permet à Squid de se connecter à un annuaire LDAP pour "
-"valider le nom d'utilisateur et le mot de passe de l'authentification HTTP "
+"valider le nom d'utilisateur et le mot de passe via l'authentification HTTP "
 "de base. Les options LDAP sont spécifiées par des paramètres en ligne de "
 "commande, le(s) nom(s) d'utilisateur(s) et le(s) mot(s) de passe(s) sont "
 "vérifiés dans l'annuaire LDAP, les entrées sont indiquées sur la ligne "
@@ -551,7 +551,7 @@ msgstr ""
 #. type: Plain text
 #: helpers/basic_auth/LDAP/basic_ldap_auth.8:216 helpers/external_acl/ldap_group/squid_ldap_group.8:204
 msgid "LDAP protocol version. Defaults to 2 if not specified."
-msgstr "Version du protocole LDAP. Par défaut 2 S'il n'est pas spécifié."
+msgstr "Version du protocole LDAP. Par défaut 2 s'il n'est pas spécifié."
 
 #. type: Plain text
 #: helpers/basic_auth/LDAP/basic_ldap_auth.8:220 helpers/external_acl/ldap_group/squid_ldap_group.8:208
@@ -585,7 +585,7 @@ msgid ""
 "Debug mode where each step taken will get reported in detail.  Useful for "
 "understanding what goes wrong if the results is not what is expected."
 msgstr ""
-"Mode Déboguage, chaque étape sera enregistrée en détail. S'utilise pour "
+"Mode déboguage, chaque étape sera enregistrée en détail. S'utilise pour "
 "comprendre ce qui a mal tourne ou si les résultats ne sont pas ceux "
 "attendus."
 
@@ -655,7 +655,7 @@ msgid ""
 msgstr ""
 "B<NOTE:> lors de la construction du filtre de recherche, il est fortement "
 "recommandé de tester le filtre en utilisant B<ldapsearch>, avant d'essayer "
-"d'utiliser B<basic_ldap_auth>. Ceci pour vérifier que le filtre correspond "
+"d'utiliser B<basic_ldap_auth>. Cela sert à vérifier que le filtre correspond "
 "bien à ce que vous attendez."
 
 #. type: Plain text
@@ -708,9 +708,9 @@ msgid ""
 "HTTP authentication."
 msgstr ""
 "B<basic_ncsa_auth> permet à Squid de lire les informations "
-"d'authentification de l'utilisateur et du mot de passe dans NCSA/Apache "
-"httpd/style à partir du fichier mot de passe, lorsque l'on utilise "
-"l'authentification HTTP de base."
+"d'authentification de l'utilisateur et du mot de passe, à partir du fichier "
+"mot de passe dans Apache/NCSA avec le style-httpd,via l'authentification "
+"HTTP de base."
 
 #. type: Plain text
 #: helpers/basic_auth/NCSA/basic_ncsa_auth.8:19
@@ -786,7 +786,7 @@ msgid ""
 msgstr ""
 "B<basic_pam_auth> permet à Squid de se connecter sur n'importe quelle base "
 "de données PAM disponible, pour valider le nom d'utilisateur et le mot de "
-"passe pour l'authentification HTTP de base."
+"passe via l'authentification HTTP de base."
 
 #. type: Plain text
 #: helpers/basic_auth/PAM/basic_pam_auth.8:26
@@ -923,7 +923,7 @@ msgid ""
 "the user name and password of Basic HTTP authentication."
 msgstr ""
 "B<basic_radius_auth> permet à Squid de se connecter à un serveur RADIUS pour "
-"valider le nom d'utilisateur et le mot de passe avec l'authentification "
+"valider le nom d'utilisateur et le mot de passe, via l'authentification "
 "HTTP de base."
 
 #. type: Plain text
@@ -1507,10 +1507,10 @@ msgid ""
 "lookups, supports non-blocking DNS lookups, and implements negative caching "
 "of failed requests."
 msgstr ""
-"Squid conserve au chaud (la mis en cache) des meta-données et des données "
-"les plus utilisées sont cachées dans la RAM, il conserve aussi les DNS dans "
-"la mémoire, les DNS sont non bloquante et applique la mise en cache négative "
-"des requêtes ayant échouées."
+"Squid conserve au chaud (mis en cache) dans la RAM les meta-données et plus "
+"particulièrement les données fréquemment utilisées, il conserve aussi en "
+"mémoire les requêtes DNS, ainsi que les requêtes ayant échoué, les requêtes "
+"DNS sont non bloquante."
 
 #. type: Plain text
 #: src/squid.8.in:41
@@ -1537,9 +1537,9 @@ msgstr ""
 "Le programme Squid se compose d'un serveur principal B<squid>, de programmes "
 "facultatifs pour le traitement personnalisé d'authentification et d'outils "
 "pour la gestion des clients. Lorsque squid démarre, il génère un nombre de "
-"processus configurable avec ca documentation, ainsi chaque processus peut "
-"exécuter des recherches en parallèle. Cela réduit le temps attend pour la "
-"recherche de résultats."
+"processus configurable avec ça documentation, chaque processus peut exécuter "
+"des recherches en parallèle, cela réduit le temps attend de la recherche "
+"des résultats."
 
 #. type: Plain text
 #: src/squid.8.in:51
@@ -1802,8 +1802,8 @@ msgid ""
 "CONTRIBUTORS for a full list of individuals who contributed code.  see "
 "CREDITS for a list of major code contributing copyright holders."
 msgstr ""
-"Avec la contribution de nombreuse personnes qui crées la communauté Squid. "
-"La liste de tous ce qui ont CONTRIBUÉ le plus et ceux qui détiennent les "
+"Avec la contribution de nombreuses personnes qui crée la communauté Squid. "
+"La liste de tous ceux qui ont CONTRIBUÉ le plus et ceux qui détiennent les "
 "droits d'auteur sont dans le fichier CREDITS."
 
 #. type: Plain text
@@ -1979,7 +1979,7 @@ msgstr "intervalle du ping"
 #. type: Plain text
 #: tools/squidclient.1:22
 msgid "Host header"
-msgstr "En-tête de l'hôte"
+msgstr "en-tête de l'hôte"
 
 #. type: Plain text
 #: tools/squidclient.1:24
@@ -2098,14 +2098,14 @@ msgstr ""
 "I<GET.>\n"
 "Squid prend également en charge une méthode non-standard appelée\n"
 "I<PURGE.>\n"
-"Vous pouvez l'utiliser pour purger une URL spécifique à partir du cache.\n"
-"Vous devez avoir\n"
+"Vous pouvez l'utiliser pour purger une URL spécifique dans le cache.\n"
+"Vous pouvez avoir accès au setup de\n"
 "I<purge>\n"
-"pour accéder au setup dans\n"
+"dans le fichier\n"
 "B<squid.conf>\n"
 "similaire à\n"
 "I<manager>\n"
-"qui peut aussi y accéder. Voici un exemple:\n"
+"pour accéder au setup. Voici un exemple:\n"
 
 #. type: Plain text
 #: tools/squidclient.1:116
index d0e2b74849cee31005d0eb3edfb4cbfcf72e6b93..43238ae053755dec4812afa1fb5fc77d7c2e5710 100644 (file)
@@ -7,15 +7,15 @@ msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2010-02-13 00:05+1400\n"
-"PO-Revision-Date: 2010-05-06 12:33+0200\n"
-"Last-Translator: Francesco Chemolli <kinkie@squid-cache.org>\n"
+"PO-Revision-Date: 2013-10-31 11:53+0200\n"
+"Last-Translator: Francesco <kinkie@squid-cache.org>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
 "Language: it\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
-"X-Generator: Pootle 2.0.1\n"
+"X-Generator: Pootle 2.1.6\n"
 
 #. type: SH
 #: helpers/basic_auth/getpwnam/basic_getpwnam_auth.8:3 helpers/basic_auth/LDAP/basic_ldap_auth.8:3 helpers/basic_auth/NCSA/basic_ncsa_auth.8:3 helpers/basic_auth/PAM/basic_pam_auth.8:3 helpers/basic_auth/RADIUS/basic_radius_auth.8:3 helpers/external_acl/ldap_group/squid_ldap_group.8:3 helpers/external_acl/session/squid_session.8:3 helpers/external_acl/unix_group/squid_unix_group.8:3 src/squid.8.in:3 tools/cachemgr.cgi.8.in:3 tools/squidclient.1:3
@@ -509,7 +509,7 @@ msgid ""
 "while B<search ing> or only to B<find> the base object."
 msgstr ""
 "B<never>: non risolvere mai gli alias, B<always>: risolvi sempre gli alias, "
-"B<search ing>: solo durante le ricerche, o B<find>: solo per la ricerca dell"
+"B<search>: solo durante le ricerche, o B<find>: solo per la ricerca dell"
 "'oggetto-base."
 
 #. type: Plain text
index e96e81dfced8e71c534315e319988cd61c4223b0..14d47d8d26530017740a72ad4873b710d73703a4 100644 (file)
@@ -1,6 +1,6 @@
-all: release-3.4.html
+all: release-3.5.html
 
-DOC= release-3.4
+DOC= release-3.5
 
 $(DOC).ps: $(DOC).sgml
        linuxdoc -B latex -o ps $(DOC)
index 9183e374185b5feb65898d7080f964e88297ea4c..008de64b65bd9822eaba12aa30daf7dc16fc33e6 100644 (file)
@@ -1,6 +1,6 @@
 <!doctype linuxdoc system>
 <article>
-<title>Squid 3.3.9 release notes</title>
+<title>Squid 3.3.11 release notes</title>
 <author>Squid Developers</author>
 
 <abstract>
@@ -13,7 +13,7 @@ for Applied Network Research and members of the Web Caching community.
 
 <sect>Notice
 <p>
-The Squid Team are pleased to announce the release of Squid-3.3.9.
+The Squid Team are pleased to announce the release of Squid-3.3.11.
 
 This new release is available for download from <url url="http://www.squid-cache.org/Versions/v3/3.3/"> or the 
 <url url="http://www.squid-cache.org/Mirrors/http-mirrors.html" name="mirrors">.
@@ -180,6 +180,12 @@ This section gives a thorough account of those changes in three categories:
 <sect1>New tags<label id="newtags">
 <p>
 <descrip>
+       <tag>cache_miss_revalidate</tag>
+       <p>Whether Squid is to pass-through If-Modified-Since and If-None-Match headers on cache MISS.
+          Revalidation requests can prevent cache gathering objects to HIT on.
+       <p>Based on the Squid-2.7 <em>ignore_ims_on_miss</em> feature.
+       <p><em>IMPORTANT:</em> the meaning for on/off values has changed along with the name since 2.7.
+
        <tag>request_header_add</tag>
        <p>New directive to add custom headers on HTTP traffic sent to upstream servers.
 
@@ -230,8 +236,8 @@ This section gives a thorough account of those changes in three categories:
 <sect1>Removed tags<label id="removedtags">
 <p>
 <descrip>
-
-       <p><em>There are no removed squid.conf options in Squid-3.3.</em>
+       <tag>ignore_ims_on_miss</tag>
+       <p>This option has been replaced by the <em>cache_miss_revalidate</em> feature.
 
 </descrip>
 
@@ -318,9 +324,6 @@ This section gives an account of those changes in three categories:
        <tag>external_refresh_check</tag>
        <p>Not yet ported from 2.7
 
-       <tag>ignore_ims_on_miss</tag>
-       <p>Not yet ported from 2.7
-
        <tag>location_rewrite_access</tag>
        <p>Not yet ported from 2.6
 
index b0dd89800e20af56b21041ac8fbb76e8f743bebc..c44d05a575057d68e412838e0efaf48da8ce4a22 100644 (file)
@@ -1,6 +1,6 @@
 <!doctype linuxdoc system>
 <article>
-<title>Squid 3.4.0.2 release notes</title>
+<title>Squid 3.4.1 release notes</title>
 <author>Squid Developers</author>
 
 <abstract>
@@ -13,7 +13,7 @@ for Applied Network Research and members of the Web Caching community.
 
 <sect>Notice
 <p>
-The Squid Team are pleased to announce the release of Squid-3.4.0.2 for testing.
+The Squid Team are pleased to announce the release of Squid-3.4.1 for testing.
 
 This new release is available for download from <url url="http://www.squid-cache.org/Versions/v3/3.4/"> or the
  <url url="http://www.squid-cache.org/Mirrors/http-mirrors.html" name="mirrors">.
@@ -28,11 +28,11 @@ We welcome feedback and bug reports. If you find a bug, please see <url url="htt
 Although this release is deemed good enough for use in many setups, please note the existence of 
 <url url="http://bugs.squid-cache.org/buglist.cgi?query_format=advanced&amp;product=Squid&amp;bug_status=UNCONFIRMED&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;version=3.4" name="open bugs against Squid-3.4">.
 
-
 <sect1>Changes since earlier releases of Squid-3.4
 <p>
 The 3.4 change history can be <url url="http://www.squid-cache.org/Versions/v3/3.4/changesets/" name="viewed here">.
 
+
 <sect>Major new features since Squid-3.3
 <p>Squid 3.4 represents a new feature release above 3.3.
 
@@ -63,7 +63,7 @@ Most user-facing changes are reflected in squid.conf (see below).
 
 <p>Arbitrary key-value pairs can be returned from any helper.
    Allowing future helpers to be forward- and backward- compatible
-   with this and future version of Squid.
+   with this and future versions of Squid.
 
 
 <sect1>SSL Server Certificate Validator
@@ -122,7 +122,7 @@ Most user-facing changes are reflected in squid.conf (see below).
    affects which <em>refresh_pattern</em> directive will be matched.
 
 <p>Store-ID helpers bundled with Squid can be built with the --enable-storeid-rewrite-helpers
-   options which is added in this version. Currently there is a <em>file</em> helper
+   option which is added in this version. Currently there is a <em>file</em> helper
    provided.
 
 
@@ -181,7 +181,7 @@ Most user-facing changes are reflected in squid.conf (see below).
     accordance with RFC 6762.
 
 <p>The <em>dns_multicast_local</em> directive must be set to <em>on</em> to enable this
-   feature. 
+   feature.
 
 <p>The multicast DNS group IP addresses for IPv4 and IPv6 resolving are added to the set
    of available DNS resolvers and used automatically for domain names ending in <em>.local</em>
@@ -191,6 +191,10 @@ Most user-facing changes are reflected in squid.conf (see below).
 <p>Statistics for multicast DNS resolution can be found on the <em>idns</em> cache manager
    report.
 
+<p><em>NOTE</em> that the external DNS helper interface is now deprecated and has been
+  removed from future Squid versions. Any installations still using it for local hostname
+  resolution need to upgrade to mDNS resolution with this Squid version.
+
 
 <sect>Changes to squid.conf since Squid-3.3
 <p>
@@ -202,7 +206,7 @@ There have been changes to Squid's configuration file since Squid-3.3.
     acl whitelist dstdomain parameters("/etc/squid/whitelist.txt")
 </verb>
 
-<p>There hasve also been changes to individual directives in the config file.
+<p>There have also been changes to individual directives in the config file.
 
 This section gives a thorough account of those changes in three categories:
 
@@ -256,7 +260,7 @@ This section gives a thorough account of those changes in three categories:
                 <item>concurrency=N was previously called url_rewrite_concurrency as a distinct directive.
         </itemize>
 
-       <tag>storeurl_rewrite_program</tag>
+       <tag>store_id_rewrite_program</tag>
        <p>A helper program to provide cache storage internal key ID value for a request.
        <p>Ported equivalent to <em>storeurl_rewrite_program</em> from 2.7
 
@@ -458,9 +462,6 @@ This section gives an account of those changes in three categories:
        <tag>external_refresh_check</tag>
        <p>Not yet ported from 2.7
 
-       <tag>ignore_ims_on_miss</tag>
-       <p>Not yet ported from 2.7
-
        <tag>location_rewrite_access</tag>
        <p>Not yet ported from 2.6
 
diff --git a/doc/release-notes/release-3.5.sgml b/doc/release-notes/release-3.5.sgml
new file mode 100644 (file)
index 0000000..f8dbc8f
--- /dev/null
@@ -0,0 +1,248 @@
+<!doctype linuxdoc system>
+<article>
+<title>Squid 3.5.0.0 release notes</title>
+<author>Squid Developers</author>
+
+<abstract>
+This document contains the release notes for version 3.5 of Squid.
+Squid is a WWW Cache application developed by the National Laboratory
+for Applied Network Research and members of the Web Caching community.
+</abstract>
+
+<toc>
+
+<sect>Notice
+<p>
+The Squid Team are pleased to announce the release of Squid-3.5.0.0 for testing.
+
+This new release is available for download from <url url="http://www.squid-cache.org/Versions/v3/3.5/"> or the
+ <url url="http://www.squid-cache.org/Mirrors/http-mirrors.html" name="mirrors">.
+
+While this release is not deemed ready for production use, we believe it is ready for wider testing by the community.
+
+We welcome feedback and bug reports. If you find a bug, please see <url url="http://wiki.squid-cache.org/SquidFaq/BugReporting">
+ for how to submit a report with a stack trace.
+
+<sect1>Known issues
+<p>
+Although this release is deemed good enough for use in many setups, please note the existence of 
+<url url="http://bugs.squid-cache.org/buglist.cgi?query_format=advanced&amp;product=Squid&amp;bug_status=UNCONFIRMED&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;version=3.5" name="open bugs against Squid-3.5">.
+
+<sect1>Changes since earlier releases of Squid-3.5
+<p>
+The 3.5 change history can be <url url="http://www.squid-cache.org/Versions/v3/3.5/changesets/" name="viewed here">.
+
+
+<sect>Major new features since Squid-3.4
+<p>Squid 3.5 represents a new feature release above 3.4.
+
+<p>The most important of these new features are:
+<itemize>
+       <item>Support libecap v1.0
+       <item>Authentication helper query extensions
+</itemize>
+
+Most user-facing changes are reflected in squid.conf (see below).
+
+
+<sect1>Support libecap v1.0
+<p>Details at <url url="http://wiki.squid-cache.org/Features/BLAH">.
+
+<p>The new libecap version allows Squid to better check the version of
+  the eCAP adapter being loaded as well as the version of the eCAP library
+  being used.
+
+<p>Squid-3.5 can support eCAP adapters built with libecap v1.0,
+   but no longer supports adapters built with earlier libecap versions
+   due to API changes.
+
+
+<sect1>Authentication helper query extensions
+<p>Details at <url url="http://www.squid-cache.org/Doc/config/auth_param/">.
+
+<p>The new <em>key_extras</em> parameter allows sending of additional
+  details to the authentication helper beyond the minimum required for
+  the HTTP authentication. This is primarily intended to allow switching
+  of authentication databases based on criteria such as client IP subnet,
+  Squid receiving port, or in reverse-proxy the requested domain name.
+
+<p>In theory any <em>logformat</em> code may be used, however only the
+  codes which have available details at the time of authentication
+  will send any meaningful detail.
+
+
+<sect>Changes to squid.conf since Squid-3.4
+<p>
+There have been changes to Squid's configuration file since Squid-3.4.
+
+<p>Squid supports reading configuration option parameters from external
+   files using the syntax <em>parameters("/path/filename")</em>. For example:
+<verb>
+    acl whitelist dstdomain parameters("/etc/squid/whitelist.txt")
+</verb>
+
+<p>There have also been changes to individual directives in the config file.
+
+This section gives a thorough account of those changes in three categories:
+
+<itemize>
+       <item><ref id="newtags" name="New tags">
+       <item><ref id="modifiedtags" name="Changes to existing tags">
+       <item><ref id="removedtags" name="Removed tags">
+</itemize>
+<p>
+
+<sect1>New tags<label id="newtags">
+<p>
+<descrip>
+       <p><em>There are no removed squid.conf directives in Squid-3.5.</em>
+
+</descrip>
+
+<sect1>Changes to existing tags<label id="modifiedtags">
+<p>
+<descrip>
+       <tag>acl</tag>
+       <p>New type <em>adaptation_service</em> to match the name of any
+          icap_service, ecap_service, adaptation_service_set, or
+          adaptation_service_chain that Squid has used (or attempted to use)
+          for the HTTP transaction so far.
+
+       <tag>auth_param</tag>
+       <p>New parameter <em>key_extras</em> to send additional parameters to
+          the authentication helper.
+
+       <tag>forward_max_tries</tag>
+       <p>Default value increased to <em>25 destinations/em> to allow better
+          contact and IPv4 failover with domains using long lists of IPv6
+          addresses.
+
+       <tag>http_port</tag>
+       <p><em>protocol=</em> option altered to accept protocol version details.
+          Currently supported values are: HTTP, HTTP/1.1, HTTPS, HTTPS/1.1
+
+       <tag>logformat</tag>
+       <p>New format code <em>%credentials</em> to log the client credentials
+          token.
+       <p>New format code <em>%tS</em> to log transaction start time in
+          "seconds.milliseconds" format, similar to the existing access.log
+          "current time" field (%ts.%03tu) which logs the corresponding
+          transaction finish time.
+
+</descrip>
+
+<sect1>Removed tags<label id="removedtags">
+<p>
+<descrip>
+       <tag>cache_dir</tag>
+       <p><em>COSS</em> storage type is formally replaced by Rosk storage type.
+
+       <tag>cache_dns_program</tag>
+       <p>DNS external helper interface has been removed. It was no longer
+          able to provide high performance service and the internal DNS
+          client library with multicast DNS cover all modern use-cases.
+
+       <tag>dns_children</tag>
+       <p>DNS external helper interface has been removed.
+
+</descrip>
+
+
+<sect>Changes to ./configure options since Squid-3.4
+<p>
+There have been some changes to Squid's build configuration since Squid-3.4.
+
+This section gives an account of those changes in three categories:
+
+<itemize>
+       <item><ref id="newoptions" name="New options">
+       <item><ref id="modifiedoptions" name="Changes to existing options">
+       <item><ref id="removedoptions" name="Removed options">
+</itemize>
+
+
+<sect1>New options<label id="newoptions">
+<p>
+<descrip>
+       <p><em>There are no new ./configure options in Squid-3.5.</em>
+
+</descrip>
+
+<sect1>Changes to existing options<label id="modifiedoptions">
+<p>
+<descrip>
+       <p><em>There are no changes to existing ./configure options in Squid-3.5.</em>
+
+</descrip>
+</p>
+
+<sect1>Removed options<label id="removedoptions">
+<p>
+<descrip>
+       <p><em>There are no removed ./configure options in Squid-3.5.</em>
+
+       <tag>--disable-internal-dns</tag>
+       <p>DNS external helper interface has been removed. It was no longer
+          able to provide high performance service and the internal DNS
+          client library with multicast DNS cover all modern use-cases.
+
+</descrip>
+
+
+<sect>Regressions since Squid-2.7
+
+<p>Some squid.conf options which were available in Squid-2.7 are not yet available in Squid-3.5
+
+<p>If you need something to do then porting one of these from Squid-2 to Squid-3 is most welcome.
+
+<sect1>Missing squid.conf options available in Squid-2.7
+<p>
+<descrip>
+       <tag>broken_vary_encoding</tag>
+       <p>Not yet ported from 2.6
+
+       <tag>cache_peer</tag>
+       <p><em>idle=</em> not yet ported from 2.7
+       <p><em>monitorinterval=</em> not yet ported from 2.6
+       <p><em>monitorsize=</em> not yet ported from 2.6
+       <p><em>monitortimeout=</em> not yet ported from 2.6
+       <p><em>monitorurl=</em> not yet ported from 2.6
+
+       <tag>cache_vary</tag>
+       <p>Not yet ported from 2.6
+
+       <tag>collapsed_forwarding</tag>
+       <p>Not yet ported from 2.6
+
+       <tag>error_map</tag>
+       <p>Not yet ported from 2.6
+
+       <tag>external_refresh_check</tag>
+       <p>Not yet ported from 2.7
+
+       <tag>location_rewrite_access</tag>
+       <p>Not yet ported from 2.6
+
+       <tag>location_rewrite_children</tag>
+       <p>Not yet ported from 2.6
+
+       <tag>location_rewrite_concurrency</tag>
+       <p>Not yet ported from 2.6
+
+       <tag>location_rewrite_program</tag>
+       <p>Not yet ported from 2.6
+
+       <tag>refresh_pattern</tag>
+       <p><em>stale-while-revalidate=</em> not yet ported from 2.7
+       <p><em>ignore-stale-while-revalidate=</em> not yet ported from 2.7
+       <p><em>negative-ttl=</em> not yet ported from 2.7
+
+       <tag>refresh_stale_hit</tag>
+       <p>Not yet ported from 2.7
+
+       <tag>update_headers</tag>
+       <p>Not yet ported from 2.7
+
+</descrip>
+
+</article>
index 7e490801299dccd44bbeaf39e1c367ab05cbee3b..e403ea3cd0439b57f5db84ae5583cc2ec07f4a21 100644 (file)
@@ -4,15 +4,15 @@ msgstr ""
 "Project-Id-Version: Squid-3\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2012-02-06 18:41+1300\n"
-"PO-Revision-Date: 2011-09-01 11:50+0200\n"
-"Last-Translator: F Wolff <friedel@translate.org.za>\n"
+"PO-Revision-Date: 2013-10-31 11:16+0200\n"
+"Last-Translator: Amos <squid3@treenet.co.nz>\n"
 "Language-Team: translate-discuss-af@lists.sourceforge.net\n"
 "Language: af\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
-"X-Generator: Virtaal 0.7.0\n"
+"X-Generator: Pootle 2.1.6\n"
 
 #: templates/ERR_FTP_FAILURE+html.body.div.blockquote.pre:29
 #: templates/ERR_FTP_FORBIDDEN+html.body.div.blockquote.pre:29
@@ -48,13 +48,13 @@ msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_OUT_OF_MEM.detail:69
 msgid "%ssl_error_descr"
-msgstr "%ssl_error_descr"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_INVALID_CA.detail:97
 #: templates/error-details.txt+X509_V_ERR_SUBJECT_ISSUER_MISMATCH.detail:117
 #: templates/error-details.txt+X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH.detail:125
 msgid "%ssl_error_descr: %ssl_ca_name"
-msgstr "%ssl_error_descr: %ssl_ca_name"
+msgstr ""
 
 #: templates/error-details.txt+SQUID_ERR_SSL_HANDSHAKE.detail:1
 #, fuzzy
@@ -82,7 +82,7 @@ msgstr "%ssl_error_descr: %ssl_ca_name"
 #: templates/error-details.txt+X509_V_ERR_KEYUSAGE_NO_CERTSIGN.detail:129
 #: templates/error-details.txt+X509_V_ERR_APPLICATION_VERIFICATION.detail:133
 msgid "%ssl_error_descr: %ssl_subject"
-msgstr "%ssl_error_descr: %ssl_subject"
+msgstr ""
 
 #: templates/ERR_DIR_LISTING+html.body.div.blockquote.pre:22
 #: templates/ERR_DNS_FAIL+html.body.div.blockquote.pre:28
@@ -185,7 +185,7 @@ msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_APPLICATION_VERIFICATION.descr:133
 msgid "Application verification failure"
-msgstr "Application verification failure"
+msgstr ""
 
 #: templates/ERR_PRECONDITION_FAILED+html.body.div.blockquote.p:28
 msgid ""
@@ -195,23 +195,23 @@ msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH.descr:125
 msgid "Authority and issuer serial number mismatch"
-msgstr "Authority and issuer serial number mismatch"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_AKID_SKID_MISMATCH.descr:121
 msgid "Authority and subject key identifier mismatch"
-msgstr "Authority and subject key identifier mismatch"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_CRL_HAS_EXPIRED.descr:49
 msgid "CRL has expired"
-msgstr "CRL has expired"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_CRL_NOT_YET_VALID.descr:45
 msgid "CRL is not yet valid"
-msgstr "CRL is not yet valid"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_CRL_SIGNATURE_FAILURE.descr:33
 msgid "CRL signature failure"
-msgstr "CRL signature failure"
+msgstr ""
 
 #: templates/ERR_CACHE_ACCESS_DENIED+html.body.div.h2:15
 #: templates/ERR_CACHE_ACCESS_DENIED+html.body.div.blockquote.p:23
@@ -229,7 +229,7 @@ msgstr "Kan nie URN oplos nie"
 
 #: templates/error-details.txt+X509_V_ERR_CERT_CHAIN_TOO_LONG.descr:89
 msgid "Certificate chain too long"
-msgstr "Certificate chain too long"
+msgstr ""
 
 #: templates/error-details.txt+SQUID_X509_V_ERR_DOMAIN_MISMATCH.descr:5
 #, fuzzy
@@ -238,27 +238,27 @@ msgstr "Certificate is not yet valid"
 
 #: templates/error-details.txt+X509_V_ERR_CERT_HAS_EXPIRED.descr:41
 msgid "Certificate has expired"
-msgstr "Certificate has expired"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_CERT_NOT_YET_VALID.descr:37
 msgid "Certificate is not yet valid"
-msgstr "Certificate is not yet valid"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_CERT_UNTRUSTED.descr:109
 msgid "Certificate not trusted"
-msgstr "Certificate not trusted"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_CERT_REJECTED.descr:113
 msgid "Certificate rejected"
-msgstr "Certificate rejected"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_CERT_REVOKED.descr:93
 msgid "Certificate revoked"
-msgstr "Certificate revoked"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_CERT_SIGNATURE_FAILURE.descr:29
 msgid "Certificate signature failure"
-msgstr "Certificate signature failure"
+msgstr ""
 
 #: templates/ERR_LIFETIME_EXP+html.body.div.blockquote.p:23
 msgid "Connection Lifetime Expired"
@@ -426,19 +426,19 @@ msgstr "Vir Opera-blaaiers, gaan na: <ul>"
 
 #: templates/error-details.txt+X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD.descr:61
 msgid "Format error in CRL's lastUpdate field"
-msgstr "Format error in CRL's lastUpdate field"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD.descr:65
 msgid "Format error in CRL's nextUpdate field"
-msgstr "Format error in CRL's nextUpdate field"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD.descr:57
 msgid "Format error in certificate's notAfter field"
-msgstr "Format error in certificate's notAfter field"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD.descr:53
 msgid "Format error in certificate's notBefore field"
-msgstr "Format error in certificate's notBefore field"
+msgstr ""
 
 #: templates/ERR_FORWARDING_DENIED+html.body.div.blockquote.p:23
 msgid "Forwarding Denied."
@@ -546,7 +546,7 @@ msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_INVALID_CA.descr:97
 msgid "Invalid CA certificate"
-msgstr "Invalid CA certificate"
+msgstr ""
 
 #: templates/ERR_INVALID_URL+html.body.div.blockquote.p:23
 msgid "Invalid URL"
@@ -554,11 +554,11 @@ msgstr "Ongeldige URL"
 
 #: templates/error-details.txt+X509_V_ERR_KEYUSAGE_NO_CERTSIGN.descr:129
 msgid "Key usage does not include certificate signing"
-msgstr "Key usage does not include certificate signing"
+msgstr ""
 
 #: templates/ERR_INVALID_REQ+html.body.div.ul.li.p:30
 msgid "Missing HTTP Identifier (HTTP/1.0)."
-msgstr "Ontbrekende HTTP-identifiseerder (HTTP/1.0)"
+msgstr "Ontbrekende HTTP-identifiseerder (HTTP/1.0)."
 
 #: templates/ERR_INVALID_REQ+html.body.div.ul.li.p:29
 msgid "Missing URL."
@@ -590,11 +590,11 @@ msgstr "Bewerking suksesvol"
 
 #: templates/error-details.txt+X509_V_ERR_OUT_OF_MEM.descr:69
 msgid "Out of memory"
-msgstr "Out of memory"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_PATH_LENGTH_EXCEEDED.descr:101
 msgid "Path length constraint exceeded"
-msgstr "Path length constraint exceeded"
+msgstr ""
 
 #: templates/ERR_CACHE_MGR_ACCESS_DENIED+html.body.div.p:28
 msgid ""
@@ -629,29 +629,26 @@ msgstr "Navraag is te groot."
 #: templates/error-details.txt+X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT.detail:9
 #: templates/error-details.txt+X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY.detail:81
 msgid "SSL Certficate error: certificate issuer (CA) not known: %ssl_ca_name"
-msgstr "SSL Certficate error: certificate issuer (CA) not known: %ssl_ca_name"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_CERT_NOT_YET_VALID.detail:37
 msgid "SSL Certficate is not valid before: %ssl_notbefore"
-msgstr "SSL Certficate is not valid before: %ssl_notbefore"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_CERT_HAS_EXPIRED.detail:41
 msgid "SSL Certificate expired on: %ssl_notafter"
-msgstr "SSL Certificate expired on: %ssl_notafter"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD.detail:57
 msgid ""
 "SSL Certificate has invalid expiration date (the 'not after' field): "
 "%ssl_subject"
 msgstr ""
-"SSL Certificate has invalid expiration date (the 'not after' field): "
-"%ssl_subject"
 
 #: templates/error-details.txt+X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD.detail:53
 msgid ""
 "SSL Certificate has invalid start date (the 'not before' field): %ssl_subject"
 msgstr ""
-"SSL Certificate has invalid start date (the 'not before' field): %ssl_subject"
 
 #: templates/ERR_AGENT_WPAD+html.body.div.div.ul.li:30
 msgid "Select Auto-detect proxy settings for this network"
@@ -667,19 +664,19 @@ msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT.descr:73
 msgid "Self signed certificate"
-msgstr "Self signed certificate"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN.descr:77
 msgid "Self signed certificate in certificate chain"
-msgstr "Self signed certificate in certificate chain"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN.detail:77
 msgid "Self-signed SSL Certificate in chain: %ssl_subject"
-msgstr "Self-signed SSL Certificate in chain: %ssl_subject"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT.detail:73
 msgid "Self-signed SSL Certificate: %ssl_subject"
-msgstr "Self-signed SSL Certificate: %ssl_subject"
+msgstr ""
 
 #: templates/ERR_SOCKET_FAILURE+html.body.div.blockquote.p:23
 msgid "Socket Failure"
@@ -747,7 +744,7 @@ msgstr "Squid het die volgende FTP-opdrag gestuur:"
 
 #: templates/error-details.txt+X509_V_ERR_SUBJECT_ISSUER_MISMATCH.descr:117
 msgid "Subject issuer mismatch"
-msgstr "Subject issuer mismatch"
+msgstr ""
 
 #: templates/ERR_DNS_FAIL+html.body.div.p:26
 msgid "The DNS server returned:"
@@ -1036,19 +1033,19 @@ msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY.detail:25
 msgid "Unable to decode issuer (CA) public key: %ssl_ca_name"
-msgstr "Unable to decode issuer (CA) public key: %ssl_ca_name"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY.descr:25
 msgid "Unable to decode issuer public key"
-msgstr "Unable to decode issuer public key"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE.descr:21
 msgid "Unable to decrypt CRL's signature"
-msgstr "Unable to decrypt CRL's signature"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE.descr:17
 msgid "Unable to decrypt certificate's signature"
-msgstr "Unable to decrypt certificate's signature"
+msgstr ""
 
 #: templates/ERR_DNS_FAIL+html.body.div.blockquote.p:23
 msgid "Unable to determine IP address from host name <q>%H</q>"
@@ -1060,19 +1057,19 @@ msgstr "Kan nie dié versoek nou aanstuur nie"
 
 #: templates/error-details.txt+X509_V_ERR_UNABLE_TO_GET_CRL.descr:13
 msgid "Unable to get certificate CRL"
-msgstr "Unable to get certificate CRL"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT.descr:9
 msgid "Unable to get issuer certificate"
-msgstr "Unable to get issuer certificate"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY.descr:81
 msgid "Unable to get local issuer certificate"
-msgstr "Unable to get local issuer certificate"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE.descr:85
 msgid "Unable to verify the first certificate"
-msgstr "Unable to verify the first certificate"
+msgstr ""
 
 #: templates/ERR_UNSUP_HTTPVERSION+html.body.div.h2:15
 #: templates/ERR_UNSUP_HTTPVERSION+html.body.div.blockquote.p:23
@@ -1085,7 +1082,7 @@ msgstr "Niegesteunde versoekmetode en -protokol"
 
 #: templates/error-details.txt+X509_V_ERR_INVALID_PURPOSE.descr:105
 msgid "Unsupported certificate purpose"
-msgstr "Unsupported certificate purpose"
+msgstr ""
 
 #: templates/ERR_ONLY_IF_CACHED_MISS+html.body.div.blockquote.p:23
 msgid ""
index a1abc3fabb150b4bdf40c04ddcf14d564b9af8ee..9ffcb84e2f47e55482b7a76e3bbdbb94782f850d 100644 (file)
@@ -29,7 +29,8 @@ ro    ro-ro ro-md
 ru     ru-ru
 sk     sk-sk
 sl     sl-si
-sr-latn        sr sr-sp sr-latn-cs
+sr-cyrl sr-rs sr-cyrl-cs sr-cyrl-rs
+sr-latn        sr sr-sp sr-latn-cs sr-latn-rs
 sv     sv-fi sv-se
 th     th-th
 tr     tr-tr
index fb92cb7505cb04e4bb47c70ccbe8a4e5a0df8818..7268330f3313e35ecbe00af4cf24e92339401ef6 100644 (file)
@@ -8,15 +8,17 @@ msgstr ""
 "Project-Id-Version: squid\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2012-02-06 18:41+1300\n"
-"PO-Revision-Date: 2009-01-27 20:36+0000\n"
-"Last-Translator: MaXeR <Unknown>\n"
+"PO-Revision-Date: 2013-10-31 12:16+0200\n"
+"Last-Translator: Amos <squid3@treenet.co.nz>\n"
 "Language-Team: Arabic <ar@li.org>\n"
 "Language: ar\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 "
+"&& n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n"
+"X-Generator: Pootle 2.1.6\n"
 "X-Launchpad-Export-Date: 2009-01-31 11:56+0000\n"
-"X-Generator: Launchpad (build Unknown)\n"
 
 #: templates/ERR_FTP_FAILURE+html.body.div.blockquote.pre:29
 #: templates/ERR_FTP_FORBIDDEN+html.body.div.blockquote.pre:29
@@ -52,13 +54,13 @@ msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_OUT_OF_MEM.detail:69
 msgid "%ssl_error_descr"
-msgstr "%ssl_error_descr"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_INVALID_CA.detail:97
 #: templates/error-details.txt+X509_V_ERR_SUBJECT_ISSUER_MISMATCH.detail:117
 #: templates/error-details.txt+X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH.detail:125
 msgid "%ssl_error_descr: %ssl_ca_name"
-msgstr "%ssl_error_descr: %ssl_ca_name"
+msgstr ""
 
 #: templates/error-details.txt+SQUID_ERR_SSL_HANDSHAKE.detail:1
 #, fuzzy
@@ -86,7 +88,7 @@ msgstr "%ssl_error_descr: %ssl_ca_name"
 #: templates/error-details.txt+X509_V_ERR_KEYUSAGE_NO_CERTSIGN.detail:129
 #: templates/error-details.txt+X509_V_ERR_APPLICATION_VERIFICATION.detail:133
 msgid "%ssl_error_descr: %ssl_subject"
-msgstr "%ssl_error_descr: %ssl_subject"
+msgstr ""
 
 #: templates/ERR_DIR_LISTING+html.body.div.blockquote.pre:22
 #: templates/ERR_DNS_FAIL+html.body.div.blockquote.pre:28
@@ -107,7 +109,7 @@ msgstr ""
 msgid ""
 "<b>Invalid Response</b> error was encountered while trying to process the "
 "request:"
-msgstr ""
+msgstr "طلب مرفوض.خطأ أثناء اجراء الطلب"
 
 #: templates/ERR_READ_TIMEOUT+html.body.div.p:28
 msgid ""
@@ -177,7 +179,7 @@ msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_APPLICATION_VERIFICATION.descr:133
 msgid "Application verification failure"
-msgstr "Application verification failure"
+msgstr ""
 
 #: templates/ERR_PRECONDITION_FAILED+html.body.div.blockquote.p:28
 msgid ""
@@ -187,23 +189,23 @@ msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH.descr:125
 msgid "Authority and issuer serial number mismatch"
-msgstr "Authority and issuer serial number mismatch"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_AKID_SKID_MISMATCH.descr:121
 msgid "Authority and subject key identifier mismatch"
-msgstr "Authority and subject key identifier mismatch"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_CRL_HAS_EXPIRED.descr:49
 msgid "CRL has expired"
-msgstr "CRL has expired"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_CRL_NOT_YET_VALID.descr:45
 msgid "CRL is not yet valid"
-msgstr "CRL is not yet valid"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_CRL_SIGNATURE_FAILURE.descr:33
 msgid "CRL signature failure"
-msgstr "CRL signature failure"
+msgstr ""
 
 #: templates/ERR_CACHE_ACCESS_DENIED+html.body.div.h2:15
 #: templates/ERR_CACHE_ACCESS_DENIED+html.body.div.blockquote.p:23
@@ -221,7 +223,7 @@ msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_CERT_CHAIN_TOO_LONG.descr:89
 msgid "Certificate chain too long"
-msgstr "Certificate chain too long"
+msgstr ""
 
 #: templates/error-details.txt+SQUID_X509_V_ERR_DOMAIN_MISMATCH.descr:5
 #, fuzzy
@@ -230,27 +232,27 @@ msgstr "Certificate is not yet valid"
 
 #: templates/error-details.txt+X509_V_ERR_CERT_HAS_EXPIRED.descr:41
 msgid "Certificate has expired"
-msgstr "Certificate has expired"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_CERT_NOT_YET_VALID.descr:37
 msgid "Certificate is not yet valid"
-msgstr "Certificate is not yet valid"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_CERT_UNTRUSTED.descr:109
 msgid "Certificate not trusted"
-msgstr "Certificate not trusted"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_CERT_REJECTED.descr:113
 msgid "Certificate rejected"
-msgstr "Certificate rejected"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_CERT_REVOKED.descr:93
 msgid "Certificate revoked"
-msgstr "Certificate revoked"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_CERT_SIGNATURE_FAILURE.descr:29
 msgid "Certificate signature failure"
-msgstr "Certificate signature failure"
+msgstr ""
 
 #: templates/ERR_LIFETIME_EXP+html.body.div.blockquote.p:23
 msgid "Connection Lifetime Expired"
@@ -418,19 +420,19 @@ msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD.descr:61
 msgid "Format error in CRL's lastUpdate field"
-msgstr "Format error in CRL's lastUpdate field"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD.descr:65
 msgid "Format error in CRL's nextUpdate field"
-msgstr "Format error in CRL's nextUpdate field"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD.descr:57
 msgid "Format error in certificate's notAfter field"
-msgstr "Format error in certificate's notAfter field"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD.descr:53
 msgid "Format error in certificate's notBefore field"
-msgstr "Format error in certificate's notBefore field"
+msgstr ""
 
 #: templates/ERR_FORWARDING_DENIED+html.body.div.blockquote.p:23
 msgid "Forwarding Denied."
@@ -535,7 +537,7 @@ msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_INVALID_CA.descr:97
 msgid "Invalid CA certificate"
-msgstr "Invalid CA certificate"
+msgstr ""
 
 #: templates/ERR_INVALID_URL+html.body.div.blockquote.p:23
 msgid "Invalid URL"
@@ -543,7 +545,7 @@ msgstr "مسار غير صحيح"
 
 #: templates/error-details.txt+X509_V_ERR_KEYUSAGE_NO_CERTSIGN.descr:129
 msgid "Key usage does not include certificate signing"
-msgstr "Key usage does not include certificate signing"
+msgstr ""
 
 #: templates/ERR_INVALID_REQ+html.body.div.ul.li.p:30
 msgid "Missing HTTP Identifier (HTTP/1.0)."
@@ -577,11 +579,11 @@ msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_OUT_OF_MEM.descr:69
 msgid "Out of memory"
-msgstr "Out of memory"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_PATH_LENGTH_EXCEEDED.descr:101
 msgid "Path length constraint exceeded"
-msgstr "Path length constraint exceeded"
+msgstr ""
 
 #: templates/ERR_CACHE_MGR_ACCESS_DENIED+html.body.div.p:28
 msgid ""
@@ -616,29 +618,26 @@ msgstr ""
 #: templates/error-details.txt+X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT.detail:9
 #: templates/error-details.txt+X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY.detail:81
 msgid "SSL Certficate error: certificate issuer (CA) not known: %ssl_ca_name"
-msgstr "SSL Certficate error: certificate issuer (CA) not known: %ssl_ca_name"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_CERT_NOT_YET_VALID.detail:37
 msgid "SSL Certficate is not valid before: %ssl_notbefore"
-msgstr "SSL Certficate is not valid before: %ssl_notbefore"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_CERT_HAS_EXPIRED.detail:41
 msgid "SSL Certificate expired on: %ssl_notafter"
-msgstr "SSL Certificate expired on: %ssl_notafter"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD.detail:57
 msgid ""
 "SSL Certificate has invalid expiration date (the 'not after' field): "
 "%ssl_subject"
 msgstr ""
-"SSL Certificate has invalid expiration date (the 'not after' field): "
-"%ssl_subject"
 
 #: templates/error-details.txt+X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD.detail:53
 msgid ""
 "SSL Certificate has invalid start date (the 'not before' field): %ssl_subject"
 msgstr ""
-"SSL Certificate has invalid start date (the 'not before' field): %ssl_subject"
 
 #: templates/ERR_AGENT_WPAD+html.body.div.div.ul.li:30
 msgid "Select Auto-detect proxy settings for this network"
@@ -654,19 +653,19 @@ msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT.descr:73
 msgid "Self signed certificate"
-msgstr "Self signed certificate"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN.descr:77
 msgid "Self signed certificate in certificate chain"
-msgstr "Self signed certificate in certificate chain"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN.detail:77
 msgid "Self-signed SSL Certificate in chain: %ssl_subject"
-msgstr "Self-signed SSL Certificate in chain: %ssl_subject"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT.detail:73
 msgid "Self-signed SSL Certificate: %ssl_subject"
-msgstr "Self-signed SSL Certificate: %ssl_subject"
+msgstr ""
 
 #: templates/ERR_SOCKET_FAILURE+html.body.div.blockquote.p:23
 msgid "Socket Failure"
@@ -728,7 +727,7 @@ msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_SUBJECT_ISSUER_MISMATCH.descr:117
 msgid "Subject issuer mismatch"
-msgstr "Subject issuer mismatch"
+msgstr ""
 
 #: templates/ERR_DNS_FAIL+html.body.div.p:26
 msgid "The DNS server returned:"
@@ -1000,19 +999,19 @@ msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY.detail:25
 msgid "Unable to decode issuer (CA) public key: %ssl_ca_name"
-msgstr "Unable to decode issuer (CA) public key: %ssl_ca_name"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY.descr:25
 msgid "Unable to decode issuer public key"
-msgstr "Unable to decode issuer public key"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE.descr:21
 msgid "Unable to decrypt CRL's signature"
-msgstr "Unable to decrypt CRL's signature"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE.descr:17
 msgid "Unable to decrypt certificate's signature"
-msgstr "Unable to decrypt certificate's signature"
+msgstr ""
 
 #: templates/ERR_DNS_FAIL+html.body.div.blockquote.p:23
 msgid "Unable to determine IP address from host name <q>%H</q>"
@@ -1024,19 +1023,19 @@ msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_UNABLE_TO_GET_CRL.descr:13
 msgid "Unable to get certificate CRL"
-msgstr "Unable to get certificate CRL"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT.descr:9
 msgid "Unable to get issuer certificate"
-msgstr "Unable to get issuer certificate"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY.descr:81
 msgid "Unable to get local issuer certificate"
-msgstr "Unable to get local issuer certificate"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE.descr:85
 msgid "Unable to verify the first certificate"
-msgstr "Unable to verify the first certificate"
+msgstr ""
 
 #: templates/ERR_UNSUP_HTTPVERSION+html.body.div.h2:15
 #: templates/ERR_UNSUP_HTTPVERSION+html.body.div.blockquote.p:23
@@ -1049,7 +1048,7 @@ msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_INVALID_PURPOSE.descr:105
 msgid "Unsupported certificate purpose"
-msgstr "Unsupported certificate purpose"
+msgstr ""
 
 #: templates/ERR_ONLY_IF_CACHED_MISS+html.body.div.blockquote.p:23
 msgid ""
index bd759375458740a1b6ac0fe97f2366f648c3eec9..bf75a0a83e635a9b50e44c7c6efc76a520490ded 100644 (file)
@@ -3,8 +3,8 @@ msgstr ""
 "Project-Id-Version: Squid-3\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2012-02-06 18:41+1300\n"
-"PO-Revision-Date: 2011-07-15 08:08+0200\n"
-"Last-Translator: Anonymous Pootle User\n"
+"PO-Revision-Date: 2013-10-31 11:36+0200\n"
+"Last-Translator: Amos <squid3@treenet.co.nz>\n"
 "Language-Team: Squid Developers <squid-dev@squid-cache.org>\n"
 "Language: az\n"
 "MIME-Version: 1.0\n"
@@ -48,13 +48,13 @@ msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_OUT_OF_MEM.detail:69
 msgid "%ssl_error_descr"
-msgstr "%ssl_error_descr"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_INVALID_CA.detail:97
 #: templates/error-details.txt+X509_V_ERR_SUBJECT_ISSUER_MISMATCH.detail:117
 #: templates/error-details.txt+X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH.detail:125
 msgid "%ssl_error_descr: %ssl_ca_name"
-msgstr "%ssl_error_descr: %ssl_ca_name"
+msgstr ""
 
 #: templates/error-details.txt+SQUID_ERR_SSL_HANDSHAKE.detail:1
 #, fuzzy
@@ -82,7 +82,7 @@ msgstr "%ssl_error_descr: %ssl_ca_name"
 #: templates/error-details.txt+X509_V_ERR_KEYUSAGE_NO_CERTSIGN.detail:129
 #: templates/error-details.txt+X509_V_ERR_APPLICATION_VERIFICATION.detail:133
 msgid "%ssl_error_descr: %ssl_subject"
-msgstr "%ssl_error_descr: %ssl_subject"
+msgstr ""
 
 #: templates/ERR_DIR_LISTING+html.body.div.blockquote.pre:22
 #: templates/ERR_DNS_FAIL+html.body.div.blockquote.pre:28
@@ -191,7 +191,7 @@ msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_APPLICATION_VERIFICATION.descr:133
 msgid "Application verification failure"
-msgstr "Application verification failure"
+msgstr ""
 
 #: templates/ERR_PRECONDITION_FAILED+html.body.div.blockquote.p:28
 msgid ""
@@ -201,23 +201,23 @@ msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH.descr:125
 msgid "Authority and issuer serial number mismatch"
-msgstr "Authority and issuer serial number mismatch"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_AKID_SKID_MISMATCH.descr:121
 msgid "Authority and subject key identifier mismatch"
-msgstr "Authority and subject key identifier mismatch"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_CRL_HAS_EXPIRED.descr:49
 msgid "CRL has expired"
-msgstr "CRL has expired"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_CRL_NOT_YET_VALID.descr:45
 msgid "CRL is not yet valid"
-msgstr "CRL is not yet valid"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_CRL_SIGNATURE_FAILURE.descr:33
 msgid "CRL signature failure"
-msgstr "CRL signature failure"
+msgstr ""
 
 #: templates/ERR_CACHE_ACCESS_DENIED+html.body.div.h2:15
 #: templates/ERR_CACHE_ACCESS_DENIED+html.body.div.blockquote.p:23
@@ -235,7 +235,7 @@ msgstr "URN tapılmadı"
 
 #: templates/error-details.txt+X509_V_ERR_CERT_CHAIN_TOO_LONG.descr:89
 msgid "Certificate chain too long"
-msgstr "Certificate chain too long"
+msgstr ""
 
 #: templates/error-details.txt+SQUID_X509_V_ERR_DOMAIN_MISMATCH.descr:5
 #, fuzzy
@@ -244,27 +244,27 @@ msgstr "Certificate is not yet valid"
 
 #: templates/error-details.txt+X509_V_ERR_CERT_HAS_EXPIRED.descr:41
 msgid "Certificate has expired"
-msgstr "Certificate has expired"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_CERT_NOT_YET_VALID.descr:37
 msgid "Certificate is not yet valid"
-msgstr "Certificate is not yet valid"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_CERT_UNTRUSTED.descr:109
 msgid "Certificate not trusted"
-msgstr "Certificate not trusted"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_CERT_REJECTED.descr:113
 msgid "Certificate rejected"
-msgstr "Certificate rejected"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_CERT_REVOKED.descr:93
 msgid "Certificate revoked"
-msgstr "Certificate revoked"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_CERT_SIGNATURE_FAILURE.descr:29
 msgid "Certificate signature failure"
-msgstr "Certificate signature failure"
+msgstr ""
 
 #: templates/ERR_LIFETIME_EXP+html.body.div.blockquote.p:23
 msgid "Connection Lifetime Expired"
@@ -435,19 +435,19 @@ msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD.descr:61
 msgid "Format error in CRL's lastUpdate field"
-msgstr "Format error in CRL's lastUpdate field"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD.descr:65
 msgid "Format error in CRL's nextUpdate field"
-msgstr "Format error in CRL's nextUpdate field"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD.descr:57
 msgid "Format error in certificate's notAfter field"
-msgstr "Format error in certificate's notAfter field"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD.descr:53
 msgid "Format error in certificate's notBefore field"
-msgstr "Format error in certificate's notBefore field"
+msgstr ""
 
 #: templates/ERR_FORWARDING_DENIED+html.body.div.blockquote.p:23
 msgid "Forwarding Denied."
@@ -557,7 +557,7 @@ msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_INVALID_CA.descr:97
 msgid "Invalid CA certificate"
-msgstr "Invalid CA certificate"
+msgstr ""
 
 #: templates/ERR_INVALID_URL+html.body.div.blockquote.p:23
 #, fuzzy
@@ -566,7 +566,7 @@ msgstr "Səhv URL"
 
 #: templates/error-details.txt+X509_V_ERR_KEYUSAGE_NO_CERTSIGN.descr:129
 msgid "Key usage does not include certificate signing"
-msgstr "Key usage does not include certificate signing"
+msgstr ""
 
 #: templates/ERR_INVALID_REQ+html.body.div.ul.li.p:30
 msgid "Missing HTTP Identifier (HTTP/1.0)."
@@ -601,11 +601,11 @@ msgstr "Əməliyyat müvəfəqiyyətlə başa çatdı"
 
 #: templates/error-details.txt+X509_V_ERR_OUT_OF_MEM.descr:69
 msgid "Out of memory"
-msgstr "Out of memory"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_PATH_LENGTH_EXCEEDED.descr:101
 msgid "Path length constraint exceeded"
-msgstr "Path length constraint exceeded"
+msgstr ""
 
 #: templates/ERR_CACHE_MGR_ACCESS_DENIED+html.body.div.p:28
 #, fuzzy
@@ -649,29 +649,26 @@ msgstr "Sorğu həddən ziyadə böyükdür."
 #: templates/error-details.txt+X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT.detail:9
 #: templates/error-details.txt+X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY.detail:81
 msgid "SSL Certficate error: certificate issuer (CA) not known: %ssl_ca_name"
-msgstr "SSL Certficate error: certificate issuer (CA) not known: %ssl_ca_name"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_CERT_NOT_YET_VALID.detail:37
 msgid "SSL Certficate is not valid before: %ssl_notbefore"
-msgstr "SSL Certficate is not valid before: %ssl_notbefore"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_CERT_HAS_EXPIRED.detail:41
 msgid "SSL Certificate expired on: %ssl_notafter"
-msgstr "SSL Certificate expired on: %ssl_notafter"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD.detail:57
 msgid ""
 "SSL Certificate has invalid expiration date (the 'not after' field): "
 "%ssl_subject"
 msgstr ""
-"SSL Certificate has invalid expiration date (the 'not after' field): "
-"%ssl_subject"
 
 #: templates/error-details.txt+X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD.detail:53
 msgid ""
 "SSL Certificate has invalid start date (the 'not before' field): %ssl_subject"
 msgstr ""
-"SSL Certificate has invalid start date (the 'not before' field): %ssl_subject"
 
 #: templates/ERR_AGENT_WPAD+html.body.div.div.ul.li:30
 msgid "Select Auto-detect proxy settings for this network"
@@ -687,19 +684,19 @@ msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT.descr:73
 msgid "Self signed certificate"
-msgstr "Self signed certificate"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN.descr:77
 msgid "Self signed certificate in certificate chain"
-msgstr "Self signed certificate in certificate chain"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN.detail:77
 msgid "Self-signed SSL Certificate in chain: %ssl_subject"
-msgstr "Self-signed SSL Certificate in chain: %ssl_subject"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT.detail:73
 msgid "Self-signed SSL Certificate: %ssl_subject"
-msgstr "Self-signed SSL Certificate: %ssl_subject"
+msgstr ""
 
 #: templates/ERR_SOCKET_FAILURE+html.body.div.blockquote.p:23
 #, fuzzy
@@ -776,7 +773,7 @@ msgstr "Squid Keş FTP-nin növbəti əmrini göndərmişdir:"
 
 #: templates/error-details.txt+X509_V_ERR_SUBJECT_ISSUER_MISMATCH.descr:117
 msgid "Subject issuer mismatch"
-msgstr "Subject issuer mismatch"
+msgstr ""
 
 #: templates/ERR_DNS_FAIL+html.body.div.p:26
 msgid "The DNS server returned:"
@@ -1077,19 +1074,19 @@ msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY.detail:25
 msgid "Unable to decode issuer (CA) public key: %ssl_ca_name"
-msgstr "Unable to decode issuer (CA) public key: %ssl_ca_name"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY.descr:25
 msgid "Unable to decode issuer public key"
-msgstr "Unable to decode issuer public key"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE.descr:21
 msgid "Unable to decrypt CRL's signature"
-msgstr "Unable to decrypt CRL's signature"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE.descr:17
 msgid "Unable to decrypt certificate's signature"
-msgstr "Unable to decrypt certificate's signature"
+msgstr ""
 
 #: templates/ERR_DNS_FAIL+html.body.div.blockquote.p:23
 msgid "Unable to determine IP address from host name <q>%H</q>"
@@ -1101,19 +1098,19 @@ msgstr "Hal-hazırda sorğunuzu yönlədirmək mümkün deyildir."
 
 #: templates/error-details.txt+X509_V_ERR_UNABLE_TO_GET_CRL.descr:13
 msgid "Unable to get certificate CRL"
-msgstr "Unable to get certificate CRL"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT.descr:9
 msgid "Unable to get issuer certificate"
-msgstr "Unable to get issuer certificate"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY.descr:81
 msgid "Unable to get local issuer certificate"
-msgstr "Unable to get local issuer certificate"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE.descr:85
 msgid "Unable to verify the first certificate"
-msgstr "Unable to verify the first certificate"
+msgstr ""
 
 #: templates/ERR_UNSUP_HTTPVERSION+html.body.div.h2:15
 #: templates/ERR_UNSUP_HTTPVERSION+html.body.div.blockquote.p:23
@@ -1126,7 +1123,7 @@ msgstr "Dəstəklənməyən sorğu metodu və protokol"
 
 #: templates/error-details.txt+X509_V_ERR_INVALID_PURPOSE.descr:105
 msgid "Unsupported certificate purpose"
-msgstr "Unsupported certificate purpose"
+msgstr ""
 
 #: templates/ERR_ONLY_IF_CACHED_MISS+html.body.div.blockquote.p:23
 msgid ""
index 70eaca379fa7c0934aaba52555f2e482a598d338..59a0ec8951acf6df46eb8cbaae43e1b762b038f0 100644 (file)
@@ -3,8 +3,8 @@ msgstr ""
 "Project-Id-Version: Squid-3\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2012-02-06 18:41+1300\n"
-"PO-Revision-Date: 2012-02-02 00:54+0200\n"
-"Last-Translator: Evgeni <etg@setcom.bg>\n"
+"PO-Revision-Date: 2013-10-31 12:25+0200\n"
+"Last-Translator: Amos <squid3@treenet.co.nz>\n"
 "Language-Team: Squid Developers <squid-dev@squid-cache.org>\n"
 "Language: bg\n"
 "MIME-Version: 1.0\n"
@@ -56,9 +56,8 @@ msgid "%ssl_error_descr: %ssl_ca_name"
 msgstr "%ssl_error_descr: %ssl_ca_name"
 
 #: templates/error-details.txt+SQUID_ERR_SSL_HANDSHAKE.detail:1
-#, fuzzy
 msgid "%ssl_error_descr: %ssl_lib_error"
-msgstr "%ssl_error_descr: %ssl_ca_name"
+msgstr ""
 
 #: templates/error-details.txt+SQUID_X509_V_ERR_DOMAIN_MISMATCH.detail:5
 #: templates/error-details.txt+X509_V_ERR_UNABLE_TO_GET_CRL.detail:13
@@ -86,7 +85,7 @@ msgstr "%ssl_error_descr: %ssl_subject"
 #: templates/ERR_DIR_LISTING+html.body.div.blockquote.pre:22
 #: templates/ERR_DNS_FAIL+html.body.div.blockquote.pre:28
 msgid "%z"
-msgstr "%z"
+msgstr ""
 
 #: templates/ERR_DIR_LISTING+html.body.div.table.tr.th:28
 msgid "<a href=\"../\">Parent Directory</a> (<a href=\"/\">Root Directory</a>)"
index 44ec4debaf5af6130d0db06b9458c34db20b5d35..1bc72c129d4a82352d62357119b4cac082110473 100644 (file)
@@ -3,8 +3,8 @@ msgstr ""
 "Project-Id-Version: Squid-3\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2012-02-06 18:41+1300\n"
-"PO-Revision-Date: 2011-07-15 08:08+0200\n"
-"Last-Translator: Anonymous Pootle User\n"
+"PO-Revision-Date: 2013-10-31 12:21+0200\n"
+"Last-Translator: Amos <squid3@treenet.co.nz>\n"
 "Language-Team: Squid Developers <squid-dev@squid-cache.org>\n"
 "Language: ca\n"
 "MIME-Version: 1.0\n"
@@ -90,7 +90,7 @@ msgstr ""
 
 #: templates/ERR_DIR_LISTING+html.body.div.table.tr.th:28
 msgid "<a href=\"../\">Parent Directory</a> (<a href=\"/\">Root Directory</a>)"
-msgstr ""
+msgstr "<a href=\"../\">Directori Rail</a> (<a href=\"/\">Directori Rail</a>)"
 
 #: templates/ERR_INVALID_REQ+html.body.div.p:20
 msgid ""
index d4d66c526ba8cff0bd07183830b7062586659b24..5fa953079a50a841400d3fb92380654e2b733440 100644 (file)
@@ -3,8 +3,8 @@ msgstr ""
 "Project-Id-Version: Squid-3\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2012-02-06 18:41+1300\n"
-"PO-Revision-Date: 2011-06-25 02:39+0200\n"
-"Last-Translator: Robert <Dessa@gmake.de>\n"
+"PO-Revision-Date: 2012-06-12 13:28+0200\n"
+"Last-Translator: Amos <squid3@treenet.co.nz>\n"
 "Language-Team: Squid Developers <squid-dev@squid-cache.org>\n"
 "Language: de\n"
 "MIME-Version: 1.0\n"
@@ -456,7 +456,7 @@ msgstr "Weiterleitung verweigert."
 
 #: templates/ERR_GATEWAY_FAILURE+html.body.div.blockquote.p:23
 msgid "Gateway Proxy Failure"
-msgstr ""
+msgstr "Gateway Proxy Fehler"
 
 #: templates/ERR_ACCESS_DENIED+html.body.div.p:34
 #: templates/ERR_ACL_TIME_QUOTA_EXCEEDED+html.body.div.p:35
@@ -1041,6 +1041,9 @@ msgid ""
 "This proxy limits your time online with a quota. Your time budget is now "
 "empty but will be refilled when the configured time period starts again."
 msgstr ""
+"Ihr Zugriff auf diesen Proxy unterliegt einer Zeitbegrenzung. Ihr Online-"
+"Zeitguthaben ist nun aufgebraucht. Es wird automatisch erneuert, sobald der "
+"nächste vereinbarte Zyklus beginnt."
 
 #: templates/ERR_CANNOT_FORWARD+html.body.div.p:26
 msgid ""
@@ -1050,7 +1053,7 @@ msgstr ""
 
 #: templates/ERR_ACL_TIME_QUOTA_EXCEEDED+html.body.div.blockquote.p:23
 msgid "Time Quota Exceeded."
-msgstr ""
+msgstr "Zeitguthaben aufgebraucht"
 
 #: templates/ERR_AGENT_CONFIGURE+html.body.div.div.ul.li:37
 #: templates/ERR_AGENT_WPAD+html.body.div.div.ul.li:37
index 96c57ce794033157f451745bbff160b8501624fe..65b6b692e03728476df358e1db1014012505a284 100644 (file)
@@ -3,14 +3,15 @@ msgstr ""
 "Project-Id-Version: Squid-3\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2012-02-06 18:41+1300\n"
-"PO-Revision-Date: 2010-06-07 23:05+0330\n"
-"Last-Translator: Mohsen Saeedi <mohsen.saeedi@gmail.com>\n"
+"PO-Revision-Date: 2013-10-31 14:45+0200\n"
+"Last-Translator: Amos <squid3@treenet.co.nz>\n"
 "Language-Team: Squid Developers <squid-dev@squid-cache.org>\n"
-"Language: \n"
+"Language: fa\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Generator: Translate Toolkit 1.1.1\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+"X-Generator: Pootle 2.1.6\n"
 
 #: templates/ERR_FTP_FAILURE+html.body.div.blockquote.pre:29
 #: templates/ERR_FTP_FORBIDDEN+html.body.div.blockquote.pre:29
@@ -95,7 +96,7 @@ msgstr "<a href=\"../\">مسیر اصلی</a> (<a href=\"/\">مسیر ریشه</
 msgid ""
 "<b>Invalid Request</b> error was encountered while trying to process the "
 "request:"
-msgstr "<b>درخواست نامعتبر</b> این خطا در زمان پردازش درخواست روی داده بود:"
+msgstr "<b>درخÙ\88است Ù\86اÙ\85عتبر</b> Ø§Û\8cÙ\86 Ø®Ø·Ø§ Ø¯Ø± Ø²Ù\85اÙ\86 Ù¾Ø±Ø¯Ø§Ø²Ø´ Ø§Û\8cÙ\86 Ø¯Ø±Ø®Ù\88است Ø±Ù\88Û\8c Ø¯Ø§Ø¯Ù\87 Ø¨Ù\88د:"
 
 #: templates/ERR_INVALID_RESP+html.body.div.p:20
 msgid ""
@@ -262,7 +263,7 @@ msgstr "Certificate signature failure"
 
 #: templates/ERR_LIFETIME_EXP+html.body.div.blockquote.p:23
 msgid "Connection Lifetime Expired"
-msgstr "دÙ\88رÙ\87 Ø¹Ù\85ر Ø§Ø±ØªØ¨Ø§Ø· Ø´Ù\85ا Ø¨Ù\87 Ù¾Ø§Û\8cاÙ\86 Ø±Ø³Û\8cد."
+msgstr "زÙ\85اÙ\86 Ø§Ø±ØªØ¨Ø§Ø· Ù\85Ù\86Ù\82ضÛ\8c Ø´د."
 
 #: templates/ERR_CONNECT_FAIL+html.body.div.blockquote.p:23
 msgid "Connection to %I failed."
@@ -335,7 +336,7 @@ msgstr "خطا: رد شدن دسترسی به نهانگاه"
 
 #: templates/ERR_CACHE_MGR_ACCESS_DENIED+html.head.title:4
 msgid "ERROR: Cache Manager Access Denied"
-msgstr "خطا: Ø§Ø¬Ø§Ø²Ù\87 Ø¯Ø³ØªØ±Ø³Û\8c Ø¨Ù\87 Ù\85دÛ\8cرÛ\8cت Cache Ù\88جÙ\88د Ù\86دارد."
+msgstr "خطا: Ø±Ø¯ Ø´Ø¯Ù\86 Ø¯Ø³ØªØ±Ø³Û\8c Ø¨Ø±Ø§Û\8c Ù\85دÛ\8cرÛ\8cت Ù\86Ù\87اÙ\86گاÙ\87"
 
 #: templates/ERR_FTP_PUT_ERROR+html.head.title:4
 msgid "ERROR: FTP upload failed"
index 00d776f399759564c3343bcf6b7d8beda56c766a..8218d10e88708f7d41a954da9bb4ce1deed46cbc 100644 (file)
@@ -3,8 +3,8 @@ msgstr ""
 "Project-Id-Version: Squid-3\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2012-02-06 18:41+1300\n"
-"PO-Revision-Date: 2011-07-15 08:08+0200\n"
-"Last-Translator: Anonymous Pootle User\n"
+"PO-Revision-Date: 2013-10-31 13:25+0200\n"
+"Last-Translator: Amos <squid3@treenet.co.nz>\n"
 "Language-Team: Squid Developers <squid-dev@squid-cache.org>\n"
 "Language: fi\n"
 "MIME-Version: 1.0\n"
@@ -276,7 +276,7 @@ msgstr ""
 
 #: templates/ERR_DIR_LISTING+html.body.div.table:-1
 msgid "Directory Listing"
-msgstr ""
+msgstr "Hakemistolistaus"
 
 #: templates/ERR_DIR_LISTING+html.head.title:4
 msgid "Directory: %U"
@@ -284,7 +284,7 @@ msgstr ""
 
 #: templates/ERR_DIR_LISTING+html.body.div.h2:14
 msgid "Directory: <a href=\"%U\">%U</a>/"
-msgstr ""
+msgstr "Hakemisto: <a href=\"%U\">%U</a>/"
 
 #: templates/ERR_ACCESS_DENIED+html.body.div.h1:14
 #: templates/ERR_ACL_TIME_QUOTA_EXCEEDED+html.body.div.h1:14
@@ -513,7 +513,7 @@ msgstr ""
 
 #: templates/ERR_ICAP_FAILURE+html.body.div.blockquote.p:23
 msgid "ICAP protocol error."
-msgstr ""
+msgstr "ICAP protokollavirhe."
 
 #: templates/ERR_TOO_BIG+html.body.div.p:27
 msgid ""
@@ -666,7 +666,7 @@ msgstr ""
 
 #: templates/ERR_AGENT_WPAD+html.body.div.div.ul.li:38
 msgid "Select Automatically detect settings"
-msgstr ""
+msgstr "Valitse Automaattisesti haetut asetukset"
 
 #: templates/ERR_AGENT_WPAD+html.body.div.div.ul.li:46
 msgid "Select Use Automatic proxy configuration"
@@ -702,7 +702,7 @@ msgstr "Joku osa URL-osoitetta on virheellinen."
 #: templates/ERR_INVALID_REQ+html.body.div.p:26
 #: templates/ERR_INVALID_URL+html.body.div.p:28
 msgid "Some possible problems are:"
-msgstr "Mahdollisia ongelmia:"
+msgstr "Muutamia mahdollisia ongelmia ovat:"
 
 #: templates/ERR_CACHE_MGR_ACCESS_DENIED+html.body.div.p:26
 msgid ""
@@ -766,7 +766,7 @@ msgstr "DNS-palvelin palautti viestin:"
 
 #: templates/ERR_ESI+html.body.div.p:26
 msgid "The ESI processor returned:"
-msgstr ""
+msgstr "ESI prosessori palautti:"
 
 #: templates/ERR_FTP_UNAVAILABLE+html.body.div.p:20
 msgid "The FTP server was too busy to retrieve the URL: <a href=\"%U\">%U</a>"
@@ -783,7 +783,7 @@ msgstr ""
 
 #: templates/ERR_ICAP_FAILURE+html.body.div.ul.li.p:32
 msgid "The ICAP server is not reachable."
-msgstr ""
+msgstr "ICAP palvelin ei ole tavoitettavissa."
 
 #: templates/ERR_CANNOT_FORWARD+html.body.div.ul.li:32
 msgid ""
@@ -846,7 +846,7 @@ msgstr "Kohdepalvelin tai -verkko saattaa olla alhaalla. Uusi hakupyyntösi."
 
 #: templates/ERR_TOO_BIG+html.body.div.blockquote.p:23
 msgid "The request or reply is too large."
-msgstr ""
+msgstr "Pyyntö tai paluuvastaus on liian iso."
 
 #: templates/ERR_ACCESS_DENIED+html.body.div.h2:15
 #: templates/ERR_ACL_TIME_QUOTA_EXCEEDED+html.body.div.h2:15
@@ -888,7 +888,7 @@ msgstr "Pyydettyä URL-osoitetta ei voitu hakea"
 #: templates/ERR_FTP_PUT_ERROR+html.body.div.p:27
 #: templates/ERR_FTP_UNAVAILABLE+html.body.div.p:28
 msgid "The server responded with:"
-msgstr ""
+msgstr "Palvelin vastasi:"
 
 #: templates/ERR_CONNECT_FAIL+html.body.div.p:26
 #: templates/ERR_ICAP_FAILURE+html.body.div.p:26
@@ -986,7 +986,7 @@ msgstr ""
 
 #: templates/ERR_PRECONDITION_FAILED+html.body.div.p:26
 msgid "This means:"
-msgstr ""
+msgstr "Tämä tarkoittaa:"
 
 #: templates/ERR_FTP_NOT_FOUND+html.body.div.p:33
 msgid ""
@@ -1084,7 +1084,7 @@ msgstr "Unable to verify the first certificate"
 #: templates/ERR_UNSUP_HTTPVERSION+html.body.div.h2:15
 #: templates/ERR_UNSUP_HTTPVERSION+html.body.div.blockquote.p:23
 msgid "Unsupported HTTP version"
-msgstr ""
+msgstr "Tätä HTTP versiota ei tueta"
 
 #: templates/ERR_UNSUP_REQ+html.body.div.blockquote.p:23
 msgid "Unsupported Request Method and Protocol"
index dbaa18e7950981c4006158b43195387532c3b814..1183e38e18d999cdde38c777a8cf73449a7070f6 100644 (file)
@@ -3,8 +3,8 @@ msgstr ""
 "Project-Id-Version: Squid-3\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2012-02-06 18:41+1300\n"
-"PO-Revision-Date: 2012-04-01 21:32+0200\n"
-"Last-Translator: Bernard <fli4l.charrier@free.fr>\n"
+"PO-Revision-Date: 2013-10-31 13:24+0200\n"
+"Last-Translator: Amos <squid3@treenet.co.nz>\n"
 "Language-Team: Squid Developers <squid-dev@squid-cache.org>\n"
 "Language: fr\n"
 "MIME-Version: 1.0\n"
@@ -192,7 +192,7 @@ msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_APPLICATION_VERIFICATION.descr:133
 msgid "Application verification failure"
-msgstr "Échec lors de la vérification d'application"
+msgstr "Échec lors de la vérification de l'application"
 
 #: templates/ERR_PRECONDITION_FAILED+html.body.div.blockquote.p:28
 msgid ""
@@ -503,7 +503,7 @@ msgstr "Défaillance de la passerelle Proxy"
 #: templates/ERR_WRITE_ERROR+html.body.div.p:36
 #: templates/ERR_ZERO_SIZE_OBJECT+html.body.div.p:34
 msgid "Generated %T by %h (%s)"
-msgstr "Générer le %T par %h (%s)"
+msgstr "Générée le %T par %h (%s)"
 
 #: templates/ERR_INVALID_REQ+html.body.div.ul.li.p:34
 msgid ""
@@ -516,7 +516,7 @@ msgstr ""
 
 #: templates/ERR_URN_RESOLVE+html.body.div.p:26
 msgid "Hey, don't expect too much from URNs on %T :)"
-msgstr "Hé! Il ne faut pas attendre grand-chose des URNs avec %T :)"
+msgstr "Hé! Il ne faut pas vous attendre à grand-chose des URNs dans %T :)"
 
 # Suggestion2 OK
 # Bernard
@@ -702,19 +702,19 @@ msgstr "Utilisez la sélection automatique pour configurer le proxy"
 
 #: templates/error-details.txt+X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT.descr:73
 msgid "Self signed certificate"
-msgstr "Certificat auto-signé"
+msgstr "Auto signature du certificat"
 
 #: templates/error-details.txt+X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN.descr:77
 msgid "Self signed certificate in certificate chain"
-msgstr "Certificat auto-signé dans la chaîne du certificat"
+msgstr "Auto signature du certificat dans la chaîne de certificat"
 
 #: templates/error-details.txt+X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN.detail:77
 msgid "Self-signed SSL Certificate in chain: %ssl_subject"
-msgstr "Certificat SSL auto-signé dans la chaîne : %ssl_subject"
+msgstr "Le certificat SSL c'est auto-signé dans la chaîne : %ssl_subject"
 
 #: templates/error-details.txt+X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT.detail:73
 msgid "Self-signed SSL Certificate: %ssl_subject"
-msgstr "Certificat SSL auto-signé : %ssl_subject"
+msgstr "Le certificat SSL c'est auto-signé : %ssl_subject"
 
 #: templates/ERR_SOCKET_FAILURE+html.body.div.blockquote.p:23
 msgid "Socket Failure"
index 6f13f710f48c83e9cb99c2642433528f7948e317..2d9cb0eaeab545ba6ad3c878ff70af79f3a18d05 100644 (file)
@@ -4,15 +4,15 @@ msgstr ""
 "Project-Id-Version: Squid-3\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2012-02-06 18:41+1300\n"
-"PO-Revision-Date: 2012-06-16 18:26+0400\n"
-"Last-Translator: Arthur Tumanyan <arthurtumanyan@yahoo.com>\n"
+"PO-Revision-Date: 2013-10-31 11:58+0200\n"
+"Last-Translator: Amos <squid3@treenet.co.nz>\n"
 "Language-Team: Arthur Tumanyan\n"
 "Language: hy\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=1; plural=0;\n"
-"X-Generator: Virtaal 0.6.1\n"
+"X-Generator: Pootle 2.1.6\n"
 
 #: templates/ERR_FTP_FAILURE+html.body.div.blockquote.pre:29
 #: templates/ERR_FTP_FORBIDDEN+html.body.div.blockquote.pre:29
@@ -37,27 +37,26 @@ msgstr "%Z"
 #: templates/ERR_FTP_PUT_ERROR+html.body.div.blockquote.pre:24
 #: templates/ERR_FTP_UNAVAILABLE+html.body.div.blockquote.pre:25
 msgid "%f"
-msgstr "%f"
+msgstr ""
 
 #: templates/ERR_FTP_FAILURE+html.body.div.blockquote.pre:30
 #: templates/ERR_FTP_FORBIDDEN+html.body.div.blockquote.pre:30
 #: templates/ERR_FTP_NOT_FOUND+html.body.div.blockquote.pre:30
 #: templates/ERR_FTP_UNAVAILABLE+html.body.div.blockquote.pre:31
 msgid "%g"
-msgstr "%g"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_OUT_OF_MEM.detail:69
 msgid "%ssl_error_descr"
-msgstr "%ssl_error_descr"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_INVALID_CA.detail:97
 #: templates/error-details.txt+X509_V_ERR_SUBJECT_ISSUER_MISMATCH.detail:117
 #: templates/error-details.txt+X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH.detail:125
 msgid "%ssl_error_descr: %ssl_ca_name"
-msgstr "%ssl_error_descr: %ssl_ca_name"
+msgstr ""
 
 #: templates/error-details.txt+SQUID_ERR_SSL_HANDSHAKE.detail:1
-#, fuzzy
 msgid "%ssl_error_descr: %ssl_lib_error"
 msgstr "%ssl_error_descr: %ssl_ca_name"
 
@@ -82,12 +81,12 @@ msgstr "%ssl_error_descr: %ssl_ca_name"
 #: templates/error-details.txt+X509_V_ERR_KEYUSAGE_NO_CERTSIGN.detail:129
 #: templates/error-details.txt+X509_V_ERR_APPLICATION_VERIFICATION.detail:133
 msgid "%ssl_error_descr: %ssl_subject"
-msgstr "%ssl_error_descr: %ssl_subject"
+msgstr ""
 
 #: templates/ERR_DIR_LISTING+html.body.div.blockquote.pre:22
 #: templates/ERR_DNS_FAIL+html.body.div.blockquote.pre:28
 msgid "%z"
-msgstr "%z"
+msgstr ""
 
 #: templates/ERR_DIR_LISTING+html.body.div.table.tr.th:28
 msgid "<a href=\"../\">Parent Directory</a> (<a href=\"/\">Root Directory</a>)"
@@ -547,11 +546,11 @@ msgstr "Անթույլատրելի կրկնակի կառավարող նիշ URL-
 #: templates/ERR_AGENT_CONFIGURE+html.body.div.div.ul.li:38
 #: templates/ERR_AGENT_CONFIGURE+html.body.div.div.ul.li:46
 msgid "In the HTTP proxy box type the proxy name %h and port %b."
-msgstr "HTTP proxy դաշտում նշիր proxy name %h և port 3128."
+msgstr "HTTP proxy դաշտում նշիր proxy name %h և port %b."
 
 #: templates/error-details.txt+X509_V_ERR_INVALID_CA.descr:97
 msgid "Invalid CA certificate"
-msgstr "Invalid CA certificate"
+msgstr ""
 
 #: templates/ERR_INVALID_URL+html.body.div.blockquote.p:23
 msgid "Invalid URL"
@@ -612,7 +611,6 @@ msgstr ""
 "\"mailto:%w%W\">քեշի կառավարիչին</a>."
 
 #: templates/ERR_CACHE_ACCESS_DENIED+html.body.div.p:28
-#, fuzzy
 msgid ""
 "Please contact the <a href=\"mailto:%w%W\">cache administrator</a> if you "
 "have difficulties authenticating yourself."
@@ -759,7 +757,7 @@ msgstr "Squid-ը ուղարկեց հետևյալ FTP հրամանը:"
 
 #: templates/error-details.txt+X509_V_ERR_SUBJECT_ISSUER_MISMATCH.descr:117
 msgid "Subject issuer mismatch"
-msgstr "Subject issuer mismatch"
+msgstr ""
 
 #: templates/ERR_DNS_FAIL+html.body.div.p:26
 msgid "The DNS server returned:"
@@ -1141,8 +1139,8 @@ msgid ""
 "revalidation prohibited by the <q>only-if-cached</q> directive."
 msgstr ""
 "Դուք իրականացրեցիք հարցում <q>only-if-cached</q> քեշի կառավարման դիրեկտիվով: "
-"Փաստաթուղթը քեշում բացակայում է <em>կամ</em> պահանջվում է <q>only-if-cached</"
-"q> դիրեկտիվի կողմից արգելված հաստատում:"
+"Փաստաթուղթը քեշում բացակայում է <em>կամ</em պահանջվում է <q>only-if-"
+"cached</q> դիրեկտիվի կողմից արգելված հաստատում:"
 
 #: templates/ERR_AGENT_CONFIGURE+html.body.div.blockquote.p:21
 #: templates/ERR_AGENT_WPAD+html.body.div.blockquote.p:21
index e0baeaeece2097a5ad6e5818a04714a6e46aa6f9..bee2de37e2ff98d5828c5210293047738895fcee 100644 (file)
@@ -8,14 +8,15 @@ msgstr ""
 "Project-Id-Version: squid\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2012-02-06 18:41+1300\n"
-"PO-Revision-Date: 2008-11-02 03:46+1300\n"
-"Last-Translator: Ramdhani Fathurrohman <kontak@ramdhani.net>\n"
+"PO-Revision-Date: 2013-10-31 13:12+0200\n"
+"Last-Translator: Amos <squid3@treenet.co.nz>\n"
 "Language-Team: Indonesian <id@li.org>\n"
 "Language: id\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Generator: Pootle 1.1.0\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+"X-Generator: Pootle 2.1.6\n"
 "X-Launchpad-Export-Date: 2008-07-31 11:24+0000\n"
 
 #: templates/ERR_FTP_FAILURE+html.body.div.blockquote.pre:29
@@ -102,15 +103,15 @@ msgid ""
 "<b>Invalid Request</b> error was encountered while trying to process the "
 "request:"
 msgstr ""
-"<b>Cacat Meminta</b> kesalahan ditemukan sedangkan mencoba mengolah "
-"permintaan:"
+"<b>Permintaan tidak valid</ b> telah menemui kesalahan ketika mencoba "
+"memproses permintaan:"
 
 #: templates/ERR_INVALID_RESP+html.body.div.p:20
 msgid ""
 "<b>Invalid Response</b> error was encountered while trying to process the "
 "request:"
 msgstr ""
-"<b>Cacat Jawaban</b> kesalahan ditemukan sedangkan mencoba mengolah "
+"<b>Respon tidak valid</ b> telah menemui kesalahan ketika mencoba memproses "
 "permintaan:"
 
 #: templates/ERR_READ_TIMEOUT+html.body.div.p:28
@@ -169,7 +170,7 @@ msgstr ""
 
 #: templates/ERR_ICAP_FAILURE+html.body.div.ul.li.p:33
 msgid "An Illegal response was received from the ICAP server."
-msgstr "Sebuah tanggapan Illegal diterima dari ICAP server."
+msgstr "Jawaban Ilegal diterima dari server ICAP."
 
 #: templates/ERR_CANNOT_FORWARD+html.body.div.ul.li:30
 msgid ""
index 0b9b1caee1442a03ad709595f6087ca39e9d6b0e..15e07e71f470110431397fc6f84bfc5c88a44279 100644 (file)
@@ -3,16 +3,17 @@ msgstr ""
 "Project-Id-Version: Squid-3\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2012-02-06 18:41+1300\n"
-"PO-Revision-Date: 2011-08-07 17:33+0200\n"
-"Last-Translator: Francesco <kinkie@squid-cache.org>\n"
+"PO-Revision-Date: 2013-11-10 22:27+0200\n"
+"Last-Translator: Francesco <gkinkie@gmail.com>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
 "Language: it\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
-"X-Generator: Pootle 2.1.6\n"
+"X-Generator: Pootle 2.5.0\n"
 "X-Launchpad-Export-Date: 2009-07-22 10:00+0000\n"
+"X-POOTLE-MTIME: 1384118865.0\n"
 
 #: templates/ERR_FTP_FAILURE+html.body.div.blockquote.pre:29
 #: templates/ERR_FTP_FORBIDDEN+html.body.div.blockquote.pre:29
@@ -20,16 +21,16 @@ msgstr ""
 #: templates/ERR_FTP_PUT_ERROR+html.body.div.blockquote.pre:29
 #: templates/ERR_FTP_UNAVAILABLE+html.body.div.blockquote.pre:30
 msgid "%F"
-msgstr "%F"
+msgstr ""
 
 #: templates/ERR_INVALID_REQ+html.body.div.blockquote.pre:23
 #: templates/ERR_INVALID_RESP+html.body.div.blockquote.pre:23
 msgid "%R"
-msgstr "%R"
+msgstr ""
 
 #: templates/ERR_ESI+html.body.div.blockquote.pre:28
 msgid "%Z"
-msgstr "%Z"
+msgstr ""
 
 #: templates/ERR_FTP_FAILURE+html.body.div.blockquote.pre:24
 #: templates/ERR_FTP_FORBIDDEN+html.body.div.blockquote.pre:24
@@ -37,29 +38,28 @@ msgstr "%Z"
 #: templates/ERR_FTP_PUT_ERROR+html.body.div.blockquote.pre:24
 #: templates/ERR_FTP_UNAVAILABLE+html.body.div.blockquote.pre:25
 msgid "%f"
-msgstr "%f"
+msgstr ""
 
 #: templates/ERR_FTP_FAILURE+html.body.div.blockquote.pre:30
 #: templates/ERR_FTP_FORBIDDEN+html.body.div.blockquote.pre:30
 #: templates/ERR_FTP_NOT_FOUND+html.body.div.blockquote.pre:30
 #: templates/ERR_FTP_UNAVAILABLE+html.body.div.blockquote.pre:31
 msgid "%g"
-msgstr "%g"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_OUT_OF_MEM.detail:69
 msgid "%ssl_error_descr"
-msgstr "%ssl_error_descr"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_INVALID_CA.detail:97
 #: templates/error-details.txt+X509_V_ERR_SUBJECT_ISSUER_MISMATCH.detail:117
 #: templates/error-details.txt+X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH.detail:125
 msgid "%ssl_error_descr: %ssl_ca_name"
-msgstr "%ssl_error_descr: %ssl_ca_name"
+msgstr ""
 
 #: templates/error-details.txt+SQUID_ERR_SSL_HANDSHAKE.detail:1
-#, fuzzy
 msgid "%ssl_error_descr: %ssl_lib_error"
-msgstr "%ssl_error_descr: %ssl_ca_name"
+msgstr ""
 
 #: templates/error-details.txt+SQUID_X509_V_ERR_DOMAIN_MISMATCH.detail:5
 #: templates/error-details.txt+X509_V_ERR_UNABLE_TO_GET_CRL.detail:13
@@ -82,12 +82,12 @@ msgstr "%ssl_error_descr: %ssl_ca_name"
 #: templates/error-details.txt+X509_V_ERR_KEYUSAGE_NO_CERTSIGN.detail:129
 #: templates/error-details.txt+X509_V_ERR_APPLICATION_VERIFICATION.detail:133
 msgid "%ssl_error_descr: %ssl_subject"
-msgstr "%ssl_error_descr: %ssl_subject"
+msgstr ""
 
 #: templates/ERR_DIR_LISTING+html.body.div.blockquote.pre:22
 #: templates/ERR_DNS_FAIL+html.body.div.blockquote.pre:28
 msgid "%z"
-msgstr "%z"
+msgstr ""
 
 #: templates/ERR_DIR_LISTING+html.body.div.table.tr.th:28
 msgid "<a href=\"../\">Parent Directory</a> (<a href=\"/\">Root Directory</a>)"
@@ -123,13 +123,15 @@ msgstr ""
 #: templates/ERR_URN_RESOLVE+html.body.div.h2:15
 msgid "A URL for the requested URN could not be retrieved"
 msgstr ""
-"Non è stato possibile ottenere una URL corrispondente alla URN richiesta."
+"Non è stato possibile ottenere una URL corrispondente alla URN richiesta"
 
 #: templates/ERR_GATEWAY_FAILURE+html.body.div.p:26
 msgid ""
 "A non-recoverable internal failure or configuration problem prevents this "
 "request from being completed."
 msgstr ""
+"Un errore interno non recuperabile o un problema di configurazione impedisce "
+"di portare a termine questa richiesta."
 
 #: templates/ERR_ACCESS_DENIED+html.body.div.blockquote.p:23
 msgid "Access Denied."
@@ -147,14 +149,16 @@ msgstr ""
 #: templates/ERR_CANNOT_FORWARD+html.body.div.ul.li:31
 msgid "All configured parent caches may be currently unreachable."
 msgstr ""
+"Tutte le cache di livello superiore potrebbero non essere raggiungibili in "
+"questo momento."
 
 #: templates/ERR_FTP_FORBIDDEN+html.body.div.p:20
 msgid ""
 "An FTP authentication failure occurred while trying to retrieve the URL: <a "
 "href=\"%U\">%U</a>"
 msgstr ""
-"Le credenziali fornite per l'accesso al server FTP relativo alla URL <a href="
-"\"%U\">%U</a> sono invalide."
+"Le credenziali fornite per l'accesso al server FTP relativo alla URL <a "
+"href=\"%U\">%U</a> sono invalide"
 
 #: templates/ERR_FTP_FAILURE+html.body.div.p:20
 #: templates/ERR_FTP_PUT_ERROR+html.body.div.p:20
@@ -163,7 +167,7 @@ msgid ""
 "\">%U</a>"
 msgstr ""
 "Si è verificato un errore di protocollo FTP durante l'accesso alla URL <a "
-"href=\"%U\">%U</a>."
+"href=\"%U\">%U</a>"
 
 #: templates/ERR_ICAP_FAILURE+html.body.div.ul.li.p:33
 msgid "An Illegal response was received from the ICAP server."
@@ -174,6 +178,8 @@ msgid ""
 "An Internet connection needed to access this domains origin servers may be "
 "down."
 msgstr ""
+"Una connessione ad Internet necessaria per raggiungere i server per questo "
+"dominio potrebbe essere indisponibile."
 
 #: templates/ERR_READ_ERROR+html.body.div.p:28
 msgid ""
@@ -193,33 +199,38 @@ msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_APPLICATION_VERIFICATION.descr:133
 msgid "Application verification failure"
-msgstr "Application verification failure"
+msgstr "Fallimento nella verifica dell'applicazione"
 
 #: templates/ERR_PRECONDITION_FAILED+html.body.div.blockquote.p:28
 msgid ""
 "At least one precondition specified by the HTTP client in the request header "
 "has failed."
 msgstr ""
+"Almeno una delle precondizioni specificate dal client HTTP negli header "
+"della richiesta è fallita."
 
 #: templates/error-details.txt+X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH.descr:125
 msgid "Authority and issuer serial number mismatch"
-msgstr "Authority and issuer serial number mismatch"
+msgstr ""
+"Mancata corrispondenza tra numero di serie della autorità di certificazione "
+"e dell'emettitore"
 
 #: templates/error-details.txt+X509_V_ERR_AKID_SKID_MISMATCH.descr:121
 msgid "Authority and subject key identifier mismatch"
-msgstr "Authority and subject key identifier mismatch"
+msgstr ""
+"Mancata corrispondenza tra autorità e chiave di identificazione del soggetto"
 
 #: templates/error-details.txt+X509_V_ERR_CRL_HAS_EXPIRED.descr:49
 msgid "CRL has expired"
-msgstr "CRL has expired"
+msgstr "La lista dei certificati revocati (CRL) è scaduta"
 
 #: templates/error-details.txt+X509_V_ERR_CRL_NOT_YET_VALID.descr:45
 msgid "CRL is not yet valid"
-msgstr "CRL is not yet valid"
+msgstr "La lista dei certificati revocati (CRL) non è ancora valida"
 
 #: templates/error-details.txt+X509_V_ERR_CRL_SIGNATURE_FAILURE.descr:33
 msgid "CRL signature failure"
-msgstr "CRL signature failure"
+msgstr "Fallimento nella firma della lista dei certificati revocati (CRL)"
 
 #: templates/ERR_CACHE_ACCESS_DENIED+html.body.div.h2:15
 #: templates/ERR_CACHE_ACCESS_DENIED+html.body.div.blockquote.p:23
@@ -233,44 +244,43 @@ msgstr "L'accesso al cache manager è negato."
 
 #: templates/ERR_URN_RESOLVE+html.body.div.blockquote.p:23
 msgid "Cannot Resolve URN"
-msgstr "Impossibile risolvere la URN."
+msgstr "Impossibile risolvere la URN"
 
 #: templates/error-details.txt+X509_V_ERR_CERT_CHAIN_TOO_LONG.descr:89
 msgid "Certificate chain too long"
-msgstr "Certificate chain too long"
+msgstr "Catena di certificati troppo lunga"
 
 #: templates/error-details.txt+SQUID_X509_V_ERR_DOMAIN_MISMATCH.descr:5
-#, fuzzy
 msgid "Certificate does not match domainname"
-msgstr "Certificate is not yet valid"
+msgstr "Il certificato non corrisponde al nome di dominio"
 
 #: templates/error-details.txt+X509_V_ERR_CERT_HAS_EXPIRED.descr:41
 msgid "Certificate has expired"
-msgstr "Certificate has expired"
+msgstr "Il certificato è scaduto"
 
 #: templates/error-details.txt+X509_V_ERR_CERT_NOT_YET_VALID.descr:37
 msgid "Certificate is not yet valid"
-msgstr "Certificate is not yet valid"
+msgstr "Il certificato non è ancora valido"
 
 #: templates/error-details.txt+X509_V_ERR_CERT_UNTRUSTED.descr:109
 msgid "Certificate not trusted"
-msgstr "Certificate not trusted"
+msgstr "Certificato non fidato"
 
 #: templates/error-details.txt+X509_V_ERR_CERT_REJECTED.descr:113
 msgid "Certificate rejected"
-msgstr "Certificate rejected"
+msgstr "Certificato rifiutato"
 
 #: templates/error-details.txt+X509_V_ERR_CERT_REVOKED.descr:93
 msgid "Certificate revoked"
-msgstr "Certificate revoked"
+msgstr "Certificato revocato"
 
 #: templates/error-details.txt+X509_V_ERR_CERT_SIGNATURE_FAILURE.descr:29
 msgid "Certificate signature failure"
-msgstr "Certificate signature failure"
+msgstr "Fallimento nella firma del certificato"
 
 #: templates/ERR_LIFETIME_EXP+html.body.div.blockquote.p:23
 msgid "Connection Lifetime Expired"
-msgstr "Il tempo di mantenimento di connessioni inattive è scaduto."
+msgstr "Il tempo di vita della connessione è scaduto"
 
 #: templates/ERR_CONNECT_FAIL+html.body.div.blockquote.p:23
 msgid "Connection to %I failed."
@@ -290,11 +300,11 @@ msgstr "Elenco della directory"
 
 #: templates/ERR_DIR_LISTING+html.head.title:4
 msgid "Directory: %U"
-msgstr "Directory: %U"
+msgstr ""
 
 #: templates/ERR_DIR_LISTING+html.body.div.h2:14
 msgid "Directory: <a href=\"%U\">%U</a>/"
-msgstr "Directory: <a href=\"%U\">%U</a>/"
+msgstr ""
 
 #: templates/ERR_ACCESS_DENIED+html.body.div.h1:14
 #: templates/ERR_ACL_TIME_QUOTA_EXCEEDED+html.body.div.h1:14
@@ -339,15 +349,15 @@ msgstr "ERRORE"
 
 #: templates/ERR_CACHE_ACCESS_DENIED+html.head.title:4
 msgid "ERROR: Cache Access Denied"
-msgstr "ERRORE: accesso alla cache negato."
+msgstr "ERRORE: accesso alla cache negato"
 
 #: templates/ERR_CACHE_MGR_ACCESS_DENIED+html.head.title:4
 msgid "ERROR: Cache Manager Access Denied"
-msgstr "ERRORE: accesso al Cache Manager negato."
+msgstr "ERRORE: accesso al Cache Manager negato"
 
 #: templates/ERR_FTP_PUT_ERROR+html.head.title:4
 msgid "ERROR: FTP upload failed"
-msgstr "ERRORE: l'invio del file via FTP non è riuscito."
+msgstr "ERRORE: l'invio del file via FTP non è riuscito"
 
 #: templates/ERR_ACCESS_DENIED+html.head.title:4
 #: templates/ERR_ACL_TIME_QUOTA_EXCEEDED+html.head.title:4
@@ -394,18 +404,16 @@ msgstr "L'elaborazione ESI è fallita."
 
 #: templates/ERR_FTP_PUT_CREATED+html.head.title:4
 #: templates/ERR_FTP_PUT_MODIFIED+html.head.title:4
-#, fuzzy
 msgid "FTP PUT Successful."
-msgstr "Comando FTP PUT eseguito correttamente: il file è stato creato."
+msgstr "Comando FTP PUT eseguito correttamente."
 
 #: templates/ERR_FTP_PUT_ERROR+html.body.div.h2:15
-#, fuzzy
 msgid "FTP PUT upload failed"
-msgstr "Comando FTP PUT non riuscito."
+msgstr "Comando FTP PUT non riuscito"
 
 #: templates/ERR_FTP_DISABLED+html.body.div.blockquote.p:23
 msgid "FTP is Disabled"
-msgstr "Il protocollo FTP è disabilitato."
+msgstr "Il protocollo FTP è disabilitato"
 
 #: templates/ERR_SECURE_CONNECT_FAIL+html.body.div.blockquote.p:23
 msgid "Failed to establish a secure connection to %I"
@@ -413,11 +421,11 @@ msgstr "Non è stato possibile stabilire una connessione sicura verso %I"
 
 #: templates/ERR_FTP_PUT_CREATED+html.body.div.h2:15
 msgid "File created"
-msgstr "Il file è stato creato."
+msgstr "Il file è stato creato"
 
 #: templates/ERR_FTP_PUT_MODIFIED+html.body.div.h2:15
 msgid "File updated"
-msgstr "Il file è stato aggiornato."
+msgstr "Il file è stato aggiornato"
 
 #: templates/ERR_AGENT_CONFIGURE+html.body.div.div.ul.li:26
 #: templates/ERR_AGENT_WPAD+html.body.div.div.ul.li:26
@@ -436,19 +444,23 @@ msgstr "Per configurare i browser Opera: <ul>"
 
 #: templates/error-details.txt+X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD.descr:61
 msgid "Format error in CRL's lastUpdate field"
-msgstr "Format error in CRL's lastUpdate field"
+msgstr ""
+"Errore nel formato del campo lastUpdate della lista dei certificati revocati "
+"(CRL)"
 
 #: templates/error-details.txt+X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD.descr:65
 msgid "Format error in CRL's nextUpdate field"
-msgstr "Format error in CRL's nextUpdate field"
+msgstr ""
+"Errore nel formato del campo nextUpdate della lista dei certificati revocati "
+"(CRL)"
 
 #: templates/error-details.txt+X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD.descr:57
 msgid "Format error in certificate's notAfter field"
-msgstr "Format error in certificate's notAfter field"
+msgstr "Errore di formato nel campo notAfter del certificato"
 
 #: templates/error-details.txt+X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD.descr:53
 msgid "Format error in certificate's notBefore field"
-msgstr "Format error in certificate's notBefore field"
+msgstr "Errore di formato nel campo notBeforedel certificato"
 
 #: templates/ERR_FORWARDING_DENIED+html.body.div.blockquote.p:23
 msgid "Forwarding Denied."
@@ -456,7 +468,7 @@ msgstr "Inoltro negato."
 
 #: templates/ERR_GATEWAY_FAILURE+html.body.div.blockquote.p:23
 msgid "Gateway Proxy Failure"
-msgstr ""
+msgstr "Errore nel Proxy Gateway"
 
 #: templates/ERR_ACCESS_DENIED+html.body.div.p:34
 #: templates/ERR_ACL_TIME_QUOTA_EXCEEDED+html.body.div.p:35
@@ -500,7 +512,7 @@ msgstr ""
 #: templates/ERR_WRITE_ERROR+html.body.div.p:36
 #: templates/ERR_ZERO_SIZE_OBJECT+html.body.div.p:34
 msgid "Generated %T by %h (%s)"
-msgstr "Generato da %h (%s) il %T."
+msgstr "Generato da %h (%s) il %T"
 
 #: templates/ERR_INVALID_REQ+html.body.div.ul.li.p:34
 msgid ""
@@ -511,7 +523,7 @@ msgstr ""
 
 #: templates/error-details.txt+SQUID_ERR_SSL_HANDSHAKE.descr:1
 msgid "Handshake with SSL server failed"
-msgstr ""
+msgstr "Fallita la negoziazione del protocollo SSL con il server"
 
 #: templates/ERR_URN_RESOLVE+html.body.div.p:26
 msgid "Hey, don't expect too much from URNs on %T :)"
@@ -550,19 +562,18 @@ msgstr ""
 
 #: templates/ERR_INVALID_URL+html.body.div.ul.li.p:32
 msgid "Illegal double-escape in the URL-Path"
-msgstr "Doppia codifica (\"double-escape\") non valida nella path della URL."
+msgstr "Doppia codifica (\"double-escape\") non valida nella path della URL"
 
 #: templates/ERR_AGENT_CONFIGURE+html.body.div.div.ul.li:30
 #: templates/ERR_AGENT_CONFIGURE+html.body.div.div.ul.li:38
 #: templates/ERR_AGENT_CONFIGURE+html.body.div.div.ul.li:46
-#, fuzzy
 msgid "In the HTTP proxy box type the proxy name %h and port %b."
 msgstr ""
-"Nel box \"Proxy HTTP\" inserisci l'indirizzo del proxy (%h) e la porta 3128."
+"Nel box \"Proxy HTTP\" inserisci l'indirizzo del proxy (%h) e la porta %b."
 
 #: templates/error-details.txt+X509_V_ERR_INVALID_CA.descr:97
 msgid "Invalid CA certificate"
-msgstr "Invalid CA certificate"
+msgstr "Certificato dell'emettitore invalido"
 
 #: templates/ERR_INVALID_URL+html.body.div.blockquote.p:23
 msgid "Invalid URL"
@@ -570,7 +581,7 @@ msgstr "URL non valida"
 
 #: templates/error-details.txt+X509_V_ERR_KEYUSAGE_NO_CERTSIGN.descr:129
 msgid "Key usage does not include certificate signing"
-msgstr "Key usage does not include certificate signing"
+msgstr "Gli utilizzi validi per la chiave non includono la firma di certificati"
 
 #: templates/ERR_INVALID_REQ+html.body.div.ul.li.p:30
 msgid "Missing HTTP Identifier (HTTP/1.0)."
@@ -582,14 +593,14 @@ msgstr "URL non specificata."
 
 #: templates/ERR_INVALID_URL+html.body.div.ul.li.p:31
 msgid "Missing hostname"
-msgstr "Nome host non specificato."
+msgstr "Nome host non specificato"
 
 #: templates/ERR_INVALID_URL+html.body.div.ul.li.p:30
 msgid ""
 "Missing or incorrect access protocol (should be <q>http://</q> or similar)"
 msgstr ""
-"Protocollo di accesso mancante o non corretto (dovrebbe essere <q>http://</"
-"q> o simile)."
+"Protocollo di accesso mancante o non corretto (dovrebbe essere "
+"<q>http://</q> o simile)"
 
 #: templates/ERR_INVALID_REQ+html.body.div.ul.li.p:28
 msgid "Missing or unknown request method."
@@ -597,7 +608,7 @@ msgstr "Metodo della richiesta non specificato o sconoscito."
 
 #: templates/ERR_NO_RELAY+html.body.div.blockquote.p:23
 msgid "No Wais Relay"
-msgstr "Le funzioni di inoltro Wais non sono implementate."
+msgstr "Le funzioni di inoltro Wais non sono implementate"
 
 #: templates/ERR_FTP_PUT_CREATED+html.body.div.h1:14
 #: templates/ERR_FTP_PUT_MODIFIED+html.body.div.h1:14
@@ -606,11 +617,11 @@ msgstr "Operazione eseguita correttamente"
 
 #: templates/error-details.txt+X509_V_ERR_OUT_OF_MEM.descr:69
 msgid "Out of memory"
-msgstr "Out of memory"
+msgstr "Memoria esaurita"
 
 #: templates/error-details.txt+X509_V_ERR_PATH_LENGTH_EXCEEDED.descr:101
 msgid "Path length constraint exceeded"
-msgstr "Path length constraint exceeded"
+msgstr "Limite alla lunghezza del percorso superato"
 
 #: templates/ERR_CACHE_MGR_ACCESS_DENIED+html.body.div.p:28
 msgid ""
@@ -626,7 +637,6 @@ msgstr ""
 "del servizio alla ricerca informazioni più dettagliate sull'errore."
 
 #: templates/ERR_CACHE_ACCESS_DENIED+html.body.div.p:28
-#, fuzzy
 msgid ""
 "Please contact the <a href=\"mailto:%w%W\">cache administrator</a> if you "
 "have difficulties authenticating yourself."
@@ -638,7 +648,7 @@ msgstr ""
 
 #: templates/ERR_PRECONDITION_FAILED+html.body.div.blockquote.p:23
 msgid "Precondition Failed."
-msgstr ""
+msgstr "Precondizione non soddisfatta."
 
 #: templates/ERR_READ_ERROR+html.body.div.blockquote.p:23
 msgid "Read Error"
@@ -655,34 +665,34 @@ msgstr "La richiesta è di dimensioni troppo grandi."
 #: templates/error-details.txt+X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT.detail:9
 #: templates/error-details.txt+X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY.detail:81
 msgid "SSL Certficate error: certificate issuer (CA) not known: %ssl_ca_name"
-msgstr "SSL Certficate error: certificate issuer (CA) not known: %ssl_ca_name"
+msgstr "Errore nel certificato SSL: l'emettitore (CA) non è noto: %ssl_ca_name"
 
 #: templates/error-details.txt+X509_V_ERR_CERT_NOT_YET_VALID.detail:37
 msgid "SSL Certficate is not valid before: %ssl_notbefore"
-msgstr "SSL Certficate is not valid before: %ssl_notbefore"
+msgstr "Il certificato SSL non è valido prima del: %ssl_notbefore"
 
 #: templates/error-details.txt+X509_V_ERR_CERT_HAS_EXPIRED.detail:41
 msgid "SSL Certificate expired on: %ssl_notafter"
-msgstr "SSL Certificate expired on: %ssl_notafter"
+msgstr "Il certificato SSL è scaduto il: %ssl_notafter"
 
 #: templates/error-details.txt+X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD.detail:57
 msgid ""
 "SSL Certificate has invalid expiration date (the 'not after' field): "
 "%ssl_subject"
 msgstr ""
-"SSL Certificate has invalid expiration date (the 'not after' field): "
-"%ssl_subject"
+"Il certificato SSL per %ssl_subject ha una data di scadenza (il campo 'not "
+"after') non valida"
 
 #: templates/error-details.txt+X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD.detail:53
 msgid ""
 "SSL Certificate has invalid start date (the 'not before' field): %ssl_subject"
 msgstr ""
-"SSL Certificate has invalid start date (the 'not before' field): %ssl_subject"
+"Il certificato SSL per %ssl_subject ha una data di inizio validità (il campo "
+"'not before') non valida"
 
 #: templates/ERR_AGENT_WPAD+html.body.div.div.ul.li:30
-#, fuzzy
 msgid "Select Auto-detect proxy settings for this network"
-msgstr "Seleziona \"Rileva automaticamente impostazioni\""
+msgstr "Seleziona \"Rileva automaticamente impostazioni proxy per questa rete\""
 
 #: templates/ERR_AGENT_WPAD+html.body.div.div.ul.li:38
 msgid "Select Automatically detect settings"
@@ -694,27 +704,27 @@ msgstr "Seleziona \"Usa script di configurazione automatica\""
 
 #: templates/error-details.txt+X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT.descr:73
 msgid "Self signed certificate"
-msgstr "Self signed certificate"
+msgstr "Certificato autofirmato"
 
 #: templates/error-details.txt+X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN.descr:77
 msgid "Self signed certificate in certificate chain"
-msgstr "Self signed certificate in certificate chain"
+msgstr "Certificato autofirmato nella catena di certificati"
 
 #: templates/error-details.txt+X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN.detail:77
 msgid "Self-signed SSL Certificate in chain: %ssl_subject"
-msgstr "Self-signed SSL Certificate in chain: %ssl_subject"
+msgstr "Certificato SSL autofirmato nella catena: %ssl_subject"
 
 #: templates/error-details.txt+X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT.detail:73
 msgid "Self-signed SSL Certificate: %ssl_subject"
-msgstr "Self-signed SSL Certificate: %ssl_subject"
+msgstr "Certificato SSL autofirmato: %ssl_subject"
 
 #: templates/ERR_SOCKET_FAILURE+html.body.div.blockquote.p:23
 msgid "Socket Failure"
-msgstr "L'operazione di rete (socket) è fallita."
+msgstr "L'operazione di rete (socket) è fallita"
 
 #: templates/ERR_INVALID_URL+html.body.div.p:26
 msgid "Some aspect of the requested URL is incorrect."
-msgstr "Qualcosa nella URL richiesta non è corretto."
+msgstr "Qualche elemento della URL richiesta non è corretto."
 
 #: templates/ERR_CANNOT_FORWARD+html.body.div.p:28
 #: templates/ERR_CONFLICT_HOST+html.body.div.p:28
@@ -775,7 +785,7 @@ msgstr "Il comando FTP inviato da Squid era:"
 
 #: templates/error-details.txt+X509_V_ERR_SUBJECT_ISSUER_MISMATCH.descr:117
 msgid "Subject issuer mismatch"
-msgstr "Subject issuer mismatch"
+msgstr "Mancata corrispondenza dell'emettitore (CA) del certificato"
 
 #: templates/ERR_DNS_FAIL+html.body.div.p:26
 msgid "The DNS server returned:"
@@ -809,11 +819,15 @@ msgid ""
 "The administrator may not allow this cache to make direct connections to "
 "origin servers."
 msgstr ""
+"L'amministratore potrebbe non consentire a questa cache di fare collegamenti "
+"diretti ai server di origine."
 
 #: templates/ERR_CONFLICT_HOST+html.body.div.ul.li:30
 msgid ""
 "The domain may have moved very recently. Trying again will resolve that."
 msgstr ""
+"Questo dominio potrebbe essere stato spostato molto di recente. Un nuovo "
+"tentativo dovrebbe risolvere la situazione."
 
 #: templates/ERR_FTP_NOT_FOUND+html.body.div.p:20
 msgid "The following URL could not be retrieved: <a href=\"%U\">%U</a>"
@@ -929,6 +943,9 @@ msgid ""
 "The website may require you to use a local country-based version. Using your "
 "ISP provided DNS server(s) should resolve that."
 msgstr ""
+"Il sito web potrebbe richiedere di usare una versione localizzata. Facendo "
+"riferimento ai server DNS forniti dal vostro ISP dovrebbe risolvere "
+"l'inconveniente."
 
 #: templates/ERR_NO_RELAY+html.body.div.p:26
 msgid ""
@@ -977,13 +994,12 @@ msgstr ""
 "configurato in modo errato."
 
 #: templates/ERR_GATEWAY_FAILURE+html.body.div.p:28
-#, fuzzy
 msgid ""
 "This may be due to limits established by the Internet Service Provider who "
 "operates this cache. Please contact them directly for more information."
 msgstr ""
-"Questi limiti sono stati stabiliti dall'ISP che gestisce questo proxy. Se "
-"ritieni sia un errore, contatta il fornitore del servizio."
+"Questi limiti sono stati stabiliti dall'ISP che gestisce questo proxy. "
+"Contatta il fornitore del servizio se cerchi maggiori informazioni."
 
 #: templates/ERR_ICAP_FAILURE+html.body.div.p:28
 msgid "This means that some aspect of the ICAP communication failed."
@@ -1022,10 +1038,12 @@ msgid ""
 "This means the domain name you are trying to access apparently no longer "
 "exists on the machine you are requesting it from."
 msgstr ""
+"Questo significa che il nome di dominio che stai cercando di daggiungere non "
+"esiste più sul server da cui lo state richiedendo."
 
 #: templates/ERR_PRECONDITION_FAILED+html.body.div.p:26
 msgid "This means:"
-msgstr ""
+msgstr "Questo significa:"
 
 #: templates/ERR_FTP_NOT_FOUND+html.body.div.p:33
 msgid ""
@@ -1053,16 +1071,21 @@ msgid ""
 "This proxy limits your time online with a quota. Your time budget is now "
 "empty but will be refilled when the configured time period starts again."
 msgstr ""
+"Questo proxy impone un limite al tempo a tua disposizione online, che "
+"&egrave; terminato. Verr&agrave; automaticamente riempito al momento "
+"opportuno."
 
 #: templates/ERR_CANNOT_FORWARD+html.body.div.p:26
 msgid ""
 "This request could not be forwarded to the origin server or to any parent "
 "caches."
 msgstr ""
+"Non è stato possibile inoltrare questa richiesta nè al server di origine nè "
+"a alcuna cache di livello superiore."
 
 #: templates/ERR_ACL_TIME_QUOTA_EXCEEDED+html.body.div.blockquote.p:23
 msgid "Time Quota Exceeded."
-msgstr ""
+msgstr "Tempo disponibile esaurito."
 
 #: templates/ERR_AGENT_CONFIGURE+html.body.div.div.ul.li:37
 #: templates/ERR_AGENT_WPAD+html.body.div.div.ul.li:37
@@ -1089,23 +1112,25 @@ msgstr ""
 
 #: templates/ERR_CONFLICT_HOST+html.body.div.blockquote.pre:23
 msgid "URI Host Conflict"
-msgstr ""
+msgstr "Conflitto nell'host della URI"
 
 #: templates/error-details.txt+X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY.detail:25
 msgid "Unable to decode issuer (CA) public key: %ssl_ca_name"
-msgstr "Unable to decode issuer (CA) public key: %ssl_ca_name"
+msgstr ""
+"Impossibile decodificare la chiave pubblica dell'emettitore (CA) %"
+"ssl_ca_name"
 
 #: templates/error-details.txt+X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY.descr:25
 msgid "Unable to decode issuer public key"
-msgstr "Unable to decode issuer public key"
+msgstr "Impossibile decodificare la chiave pubblica dell'emettitore"
 
 #: templates/error-details.txt+X509_V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE.descr:21
 msgid "Unable to decrypt CRL's signature"
-msgstr "Unable to decrypt CRL's signature"
+msgstr "Impossibile decifrare la firma della CRL"
 
 #: templates/error-details.txt+X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE.descr:17
 msgid "Unable to decrypt certificate's signature"
-msgstr "Unable to decrypt certificate's signature"
+msgstr "Impossibile decifrare la firma del certificato"
 
 #: templates/ERR_DNS_FAIL+html.body.div.blockquote.p:23
 msgid "Unable to determine IP address from host name <q>%H</q>"
@@ -1119,19 +1144,19 @@ msgstr "Non è possibile inoltrare la richiesta in questo momento."
 
 #: templates/error-details.txt+X509_V_ERR_UNABLE_TO_GET_CRL.descr:13
 msgid "Unable to get certificate CRL"
-msgstr "Unable to get certificate CRL"
+msgstr "Impossibile ottenere la CRL per questo certificato"
 
 #: templates/error-details.txt+X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT.descr:9
 msgid "Unable to get issuer certificate"
-msgstr "Unable to get issuer certificate"
+msgstr "Non sono riuscito a ottenere il certificato dell'emettitore (CA)"
 
 #: templates/error-details.txt+X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY.descr:81
 msgid "Unable to get local issuer certificate"
-msgstr "Unable to get local issuer certificate"
+msgstr "Non sno riuscito a ottenere il certificato dell'emettitore locale"
 
 #: templates/error-details.txt+X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE.descr:85
 msgid "Unable to verify the first certificate"
-msgstr "Unable to verify the first certificate"
+msgstr "Impossibile verificare il primo certificato"
 
 #: templates/ERR_UNSUP_HTTPVERSION+html.body.div.h2:15
 #: templates/ERR_UNSUP_HTTPVERSION+html.body.div.blockquote.p:23
@@ -1144,7 +1169,7 @@ msgstr "Metodo e protocollo della richiesta non sono supportati."
 
 #: templates/error-details.txt+X509_V_ERR_INVALID_PURPOSE.descr:105
 msgid "Unsupported certificate purpose"
-msgstr "Unsupported certificate purpose"
+msgstr "Finalità del certificato non supportata"
 
 #: templates/ERR_ONLY_IF_CACHED_MISS+html.body.div.blockquote.p:23
 msgid ""
index 5687fe891fbc29b1ccfd5737c5b139c509a3802b..31965fa82909b950da802ae0377f6201614aa1a2 100644 (file)
@@ -3,8 +3,8 @@ msgstr ""
 "Project-Id-Version: Squid-3\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2012-02-06 18:41+1300\n"
-"PO-Revision-Date: 2011-07-15 08:09+0200\n"
-"Last-Translator: Anonymous Pootle User\n"
+"PO-Revision-Date: 2013-10-31 13:08+0200\n"
+"Last-Translator: Amos <squid3@treenet.co.nz>\n"
 "Language-Team: Squid Developers <squid-dev@squid-cache.org>\n"
 "Language: ja\n"
 "MIME-Version: 1.0\n"
@@ -97,17 +97,13 @@ msgstr ""
 msgid ""
 "<b>Invalid Request</b> error was encountered while trying to process the "
 "request:"
-msgstr ""
-"<b>不正なリクエスト</b>のエラーが以下のリクエストを処理しようとしている間に発"
-"生しました:"
+msgstr "<b>不正な要求</b>のエラーが以下のリクエストを処理しようとしている間に発生しました:"
 
 #: templates/ERR_INVALID_RESP+html.body.div.p:20
 msgid ""
 "<b>Invalid Response</b> error was encountered while trying to process the "
 "request:"
-msgstr ""
-"<b>不正なリクエスト</b>のエラーが以下のリクエストを処理しようとしている間に発"
-"生しました:"
+msgstr "<b>不正な応答</b>のエラーが以下のリクエストの処理中に発生しました:"
 
 #: templates/ERR_READ_TIMEOUT+html.body.div.p:28
 #, fuzzy
@@ -115,13 +111,12 @@ msgid ""
 "A Timeout occurred while waiting to read data from the network. The network "
 "or server may be down or congested. Please retry your request."
 msgstr ""
-"ネットワークからデータを読もうと待っている間にタイムアウトが発生しました。"
-"ネットワークもしくはサーバが稼働していないか、あるいは混雑しています。再度リ"
-"クエストしてください。"
+"ネットワークからデータの読み込み待ち中にタイムアウトとなりました。ネットワークやサーバが動作していないか、または混雑しています。再度リクエストしてみてく"
+"ださい。"
 
 #: templates/ERR_URN_RESOLVE+html.body.div.h2:15
 msgid "A URL for the requested URN could not be retrieved"
-msgstr "リクエストされたURNのURLを調べられませんでした。"
+msgstr "要求されたURNのURLを取得できませんでした。"
 
 #: templates/ERR_GATEWAY_FAILURE+html.body.div.p:26
 msgid ""
@@ -140,9 +135,7 @@ msgid ""
 "this time. Please contact your service provider if you feel this is "
 "incorrect."
 msgstr ""
-"設定されているアクセス制御の設定のため、今回はあなたからのリクエストは受けつ"
-"けられません。この設定が正しくないと思われる場合には、このサービスの提供者へ"
-"連絡してください。"
+"設定されたアクセス制御によって、現時点ではあなたによる要求は許可できません。この制限が誤っている思われる場合は、このサービスの提供者に連絡してください。"
 
 #: templates/ERR_CANNOT_FORWARD+html.body.div.ul.li:31
 msgid "All configured parent caches may be currently unreachable."
@@ -152,18 +145,14 @@ msgstr ""
 msgid ""
 "An FTP authentication failure occurred while trying to retrieve the URL: <a "
 "href=\"%U\">%U</a>"
-msgstr ""
-"FTP認証の失敗が、以下のURLから情報を得ようとしている間に発生しました: <a "
-"href=\"%U\">%U</a>"
+msgstr "以下のURLから情報の取得しようとしている間に、FTPの認証に失敗しました: <a href=\"%U\">%U</a>"
 
 #: templates/ERR_FTP_FAILURE+html.body.div.p:20
 #: templates/ERR_FTP_PUT_ERROR+html.body.div.p:20
 msgid ""
 "An FTP protocol error occurred while trying to retrieve the URL: <a href=\"%U"
 "\">%U</a>"
-msgstr ""
-"FTPのプロトコル・エラーが、以下のURLから情報を得ようとしている間に発生しまし"
-"た: <a href=\"%U\">%U</a>"
+msgstr "以下のURLから情報を取得しようとしている間に、FTPでプロトコル上のエラーが発生しました: <a href=\"%U\">%U</a>"
 
 #: templates/ERR_ICAP_FAILURE+html.body.div.ul.li.p:33
 msgid "An Illegal response was received from the ICAP server."
@@ -180,18 +169,14 @@ msgstr ""
 msgid ""
 "An error condition occurred while reading data from the network. Please "
 "retry your request."
-msgstr ""
-"ネットワークからデータを受信している間にエラーが発生しました。再度、リクエス"
-"トしてください。"
+msgstr "ネットワークからデータの読み込み待ち中にエラーが発生しました。再度リクエストしてみてください。"
 
 #: templates/ERR_WRITE_ERROR+html.body.div.p:28
 #, fuzzy
 msgid ""
 "An error condition occurred while writing to the network. Please retry your "
 "request."
-msgstr ""
-"ネットワークにデータを送信している間にエラーが発生しました。再度リクエストし"
-"てください。"
+msgstr "ネットワークへデータを送信中にエラーが発生しました。再度リクエストしてみてください。"
 
 #: templates/error-details.txt+X509_V_ERR_APPLICATION_VERIFICATION.descr:133
 msgid "Application verification failure"
@@ -231,11 +216,11 @@ msgstr "キャッシュへのアクセスを拒否されました."
 #: templates/ERR_CACHE_MGR_ACCESS_DENIED+html.body.div.h2:15
 #: templates/ERR_CACHE_MGR_ACCESS_DENIED+html.body.div.blockquote.p:23
 msgid "Cache Manager Access Denied."
-msgstr "キャッシュマネジャへのアクセスを拒否されました."
+msgstr "ã\82­ã\83£ã\83\83ã\82·ã\83¥ã\83\9eã\83\8dã\83¼ã\82¸ã\83£ã\81¸ã\81®ã\82¢ã\82¯ã\82»ã\82¹ã\82\92æ\8b\92å\90¦ã\81\95ã\82\8cã\81¾ã\81\97ã\81\9fï¼\8e"
 
 #: templates/ERR_URN_RESOLVE+html.body.div.blockquote.p:23
 msgid "Cannot Resolve URN"
-msgstr "URN ã\81®è§£æ±ºã\81\8cできませんでした。"
+msgstr "URN ã\82\92解決できませんでした。"
 
 #: templates/error-details.txt+X509_V_ERR_CERT_CHAIN_TOO_LONG.descr:89
 msgid "Certificate chain too long"
@@ -272,15 +257,15 @@ msgstr "Certificate signature failure"
 
 #: templates/ERR_LIFETIME_EXP+html.body.div.blockquote.p:23
 msgid "Connection Lifetime Expired"
-msgstr "接続の存続時間が終了しました。"
+msgstr "接続の有効期間が切れました。"
 
 #: templates/ERR_CONNECT_FAIL+html.body.div.blockquote.p:23
 msgid "Connection to %I failed."
-msgstr "%I ã\81¸ã\81®æ\8e¥ç¶\9aã\81«å¤±æ\95\97ã\81\97ã\81¾した。"
+msgstr "%I ã\81«æ\8e¥ç¶\9aã\81§ã\81\8dã\81¾ã\81\9bã\82\93ã\81§した。"
 
 #: templates/ERR_INVALID_REQ+html.body.div.ul.li.p:32
 msgid "Content-Length missing for POST or PUT requests."
-msgstr "POSTまたはPUTのリクエストにContent-Lengthヘッダがありません。"
+msgstr "Content-Lengthヘッダが、POSTまたはPUTの要求に含まれていません。"
 
 #: templates/ERR_DIR_LISTING+html.body.div.h4:19
 msgid "Directory Content:"
@@ -343,15 +328,15 @@ msgstr "エラー"
 
 #: templates/ERR_CACHE_ACCESS_DENIED+html.head.title:4
 msgid "ERROR: Cache Access Denied"
-msgstr "ã\82¨ã\83©ã\83¼: ã\82­ã\83£ã\83\83ã\82·ã\83¥ã\81«アクセスを拒否されました。"
+msgstr "ã\82¨ã\83©ã\83¼: ã\82­ã\83£ã\83\83ã\82·ã\83¥ã\81¸ã\81®アクセスを拒否されました。"
 
 #: templates/ERR_CACHE_MGR_ACCESS_DENIED+html.head.title:4
 msgid "ERROR: Cache Manager Access Denied"
-msgstr "ã\82¨ã\83©ã\83¼: ã\82­ã\83£ã\83\83ã\82·ã\83¥ã\83»ã\83\9eã\83\8dã\83¼ã\82¸ã\83£ã\81«アクセスを拒否されました。"
+msgstr "ã\82¨ã\83©ã\83¼: ã\82­ã\83£ã\83\83ã\82·ã\83¥ã\83\9eã\83\8dã\83¼ã\82¸ã\83£ã\81¸ã\81®アクセスを拒否されました。"
 
 #: templates/ERR_FTP_PUT_ERROR+html.head.title:4
 msgid "ERROR: FTP upload failed"
-msgstr "エラー: FTP アップロードは失敗しました"
+msgstr "エラー: FTPでのアップロードに失敗しました。"
 
 #: templates/ERR_ACCESS_DENIED+html.head.title:4
 #: templates/ERR_ACL_TIME_QUOTA_EXCEEDED+html.head.title:4
@@ -414,7 +399,7 @@ msgstr "FTPは無効です。"
 
 #: templates/ERR_SECURE_CONNECT_FAIL+html.body.div.blockquote.p:23
 msgid "Failed to establish a secure connection to %I"
-msgstr "%Iã\81¸ã\81®å®\89å\85¨ã\81ªæ\8e¥ç¶\9aã\82\92確ç«\8bã\81«å¤±æ\95\97ã\81\97ã\81¾した。"
+msgstr "%Iã\81«å®\89å\85¨ã\81ªæ\8e¥ç¶\9aã\82\92確ç«\8bã\81§ã\81\8dã\81¾ã\81\9bã\82\93ã\81§した。"
 
 #: templates/ERR_FTP_PUT_CREATED+html.body.div.h2:15
 msgid "File created"
@@ -427,17 +412,17 @@ msgstr "ファイルを更新しました。"
 #: templates/ERR_AGENT_CONFIGURE+html.body.div.div.ul.li:26
 #: templates/ERR_AGENT_WPAD+html.body.div.div.ul.li:26
 msgid "For Firefox browsers go to: <ul>"
-msgstr ""
+msgstr "Firefoxブラウザをご利用の方はこちらに: <ul>"
 
 #: templates/ERR_AGENT_CONFIGURE+html.body.div.div.ul.li:34
 #: templates/ERR_AGENT_WPAD+html.body.div.div.ul.li:34
 msgid "For Internet Explorer browsers go to: <ul>"
-msgstr ""
+msgstr "ブラウザにInternet Exploreをご利用の方はこちらに: <ul>"
 
 #: templates/ERR_AGENT_CONFIGURE+html.body.div.div.ul.li:42
 #: templates/ERR_AGENT_WPAD+html.body.div.div.ul.li:42
 msgid "For Opera browsers go to: <ul>"
-msgstr ""
+msgstr "ブラウザにOperaをご利用の方はこちらに: <ul>"
 
 #: templates/error-details.txt+X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD.descr:61
 msgid "Format error in CRL's lastUpdate field"
@@ -457,7 +442,7 @@ msgstr "Format error in certificate's notBefore field"
 
 #: templates/ERR_FORWARDING_DENIED+html.body.div.blockquote.p:23
 msgid "Forwarding Denied."
-msgstr "転é\80\81ã\81¯拒否されました。"
+msgstr "転é\80\81ã\82\92拒否されました。"
 
 #: templates/ERR_GATEWAY_FAILURE+html.body.div.blockquote.p:23
 msgid "Gateway Proxy Failure"
@@ -523,7 +508,7 @@ msgstr "やあ、%Tの時点でURNには多くを期待しないでください
 #: templates/ERR_AGENT_CONFIGURE+html.body.div.p:24
 #: templates/ERR_AGENT_WPAD+html.body.div.p:24
 msgid "How to find these settings in your browser:"
-msgstr ""
+msgstr "ご利用のブラウザを設定する方法の探し方:"
 
 #: templates/ERR_ICAP_FAILURE+html.body.div.blockquote.p:23
 msgid "ICAP protocol error."
@@ -533,24 +518,22 @@ msgstr "ICAPのプロトコル・エラーです。"
 msgid ""
 "If you are making a GET request, then the item you are trying to download is "
 "too large."
-msgstr ""
-"GETの要求をしていたなら、ダウンロードしようとしていた対象が大きすぎます。"
+msgstr "GETの要求をしていたなら、ダウンロードしようとしたサイズが大きすぎます。"
 
 #: templates/ERR_TOO_BIG+html.body.div.p:26
 msgid ""
 "If you are making a POST or PUT request, then the item you are trying to "
 "upload is too large."
-msgstr ""
-"POSTまたはPUTの要求をしていたなら、アップロードしていた対象が大きすぎます。"
+msgstr "POSTまたはPUTの要求をしていたなら、アップロードしようとしたサイズが大きすぎます。"
 
 #: templates/ERR_INVALID_REQ+html.body.div.ul.li.p:33
 #: templates/ERR_INVALID_URL+html.body.div.ul.li.p:33
 msgid "Illegal character in hostname; underscores are not allowed."
-msgstr "ホスト名に不正な文字が使われています: アンダースコアは使えません。"
+msgstr "ホスト名に不正な文字が含まれています: アンダースコア(下線)は使えません。"
 
 #: templates/ERR_INVALID_URL+html.body.div.ul.li.p:32
 msgid "Illegal double-escape in the URL-Path"
-msgstr "不正な二重のエスケープがURLパスにあります。"
+msgstr "不正な二重のエスケープがURLパスに含まれています。"
 
 #: templates/ERR_AGENT_CONFIGURE+html.body.div.div.ul.li:30
 #: templates/ERR_AGENT_CONFIGURE+html.body.div.div.ul.li:38
@@ -590,7 +573,7 @@ msgstr ""
 
 #: templates/ERR_INVALID_REQ+html.body.div.ul.li.p:28
 msgid "Missing or unknown request method."
-msgstr "要求の方法が抜けているか不明です。"
+msgstr "リクエスト・メソッドが欠けているか、不明なメソッドです。"
 
 #: templates/ERR_NO_RELAY+html.body.div.blockquote.p:23
 msgid "No Wais Relay"
@@ -645,7 +628,7 @@ msgstr "読み込みタイムアウト"
 
 #: templates/ERR_INVALID_REQ+html.body.div.ul.li.p:31
 msgid "Request is too large."
-msgstr "リクエストが長すぎます。"
+msgstr "要求が大きすぎます。"
 
 #: templates/error-details.txt+X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT.detail:9
 #: templates/error-details.txt+X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY.detail:81
@@ -680,11 +663,11 @@ msgstr ""
 
 #: templates/ERR_AGENT_WPAD+html.body.div.div.ul.li:38
 msgid "Select Automatically detect settings"
-msgstr ""
+msgstr "自動検出の設定を選択してください。"
 
 #: templates/ERR_AGENT_WPAD+html.body.div.div.ul.li:46
 msgid "Select Use Automatic proxy configuration"
-msgstr ""
+msgstr "proxyの自動構成を選択してください。"
 
 #: templates/error-details.txt+X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT.descr:73
 msgid "Self signed certificate"
@@ -708,7 +691,7 @@ msgstr "ソケット作成に失敗"
 
 #: templates/ERR_INVALID_URL+html.body.div.p:26
 msgid "Some aspect of the requested URL is incorrect."
-msgstr "リクエストされたURLに不正な部分があります。"
+msgstr "指定されたURLに正しくない部分があります。"
 
 #: templates/ERR_CANNOT_FORWARD+html.body.div.p:28
 #: templates/ERR_CONFLICT_HOST+html.body.div.p:28
@@ -716,49 +699,43 @@ msgstr "リクエストされたURLに不正な部分があります。"
 #: templates/ERR_INVALID_REQ+html.body.div.p:26
 #: templates/ERR_INVALID_URL+html.body.div.p:28
 msgid "Some possible problems are:"
-msgstr "ありそうな問題: "
+msgstr "考えられる問題: "
 
 #: templates/ERR_CACHE_MGR_ACCESS_DENIED+html.body.div.p:26
 msgid ""
 "Sorry, you are not currently allowed to request %U from this cache manager "
 "until you have authenticated yourself."
-msgstr ""
-"申し訳ありませんが、あなた自身の認証を済ませるまで、このキャッシュマネージャ"
-"に %U をリクエストすることは現在許可されていません。"
+msgstr "申し訳ありませんが、あなた自身を認証するまで、このキャッシュマネージャは %U の要求を許可しません。"
 
 #: templates/ERR_CACHE_ACCESS_DENIED+html.body.div.p:26
 msgid ""
 "Sorry, you are not currently allowed to request %U from this cache until you "
 "have authenticated yourself."
-msgstr ""
-"申し訳ありませんが、あなた自身の認証を済ませるまで、このキャッシュに %U をリ"
-"クエストすることは現在許可されていません。"
+msgstr "申し訳ありませんが、あなた自身を認証するまで、このキャッシュは %U の要求を許可しません。"
 
 #: templates/ERR_ZERO_SIZE_OBJECT+html.body.div.p:26
 msgid "Squid did not receive any data for this request."
-msgstr "このリクエストにに対してSquidは何もデータを受け取りませんでした。"
+msgstr "この要求に対して、Squidは何もデータを受け取りませんでした。"
 
 #: templates/ERR_UNSUP_REQ+html.body.div.p:26
 msgid ""
 "Squid does not support all request methods for all access protocols. For "
 "example, you can not POST a Gopher request."
 msgstr ""
-"Squidã\81¯ã\81\99ã\81¹ã\81¦ã\81®ã\83\97ã\83­ã\83\88ã\82³ã\83«ã\81«å¯¾ã\81\97ã\81¦ã\80\81ã\81\99ã\81¹ã\81¦ã\81®ã\83ªã\82¯ã\82¨ã\82¹ã\83\88æ\96¹å¼\8fã\82\92ã\82µã\83\9dã\83¼ã\83\88ã\81\97ã\81¦ã\81\84ã\82\8bã\82\8f"
-"ã\81\91ã\81§ã\81¯ã\81\82ã\82\8aã\81¾ã\81\9bã\82\93ã\80\82ä¾\8bã\81\88ã\81°ã\80\81POSTã\82\92Gopherã\81®ã\83ªã\82¯ã\82¨ã\82¹ã\83\88ã\81§è¡\8cã\81\86ã\81\93ã\81¨ã\81¯ã\81§ã\81\8dã\81¾ã\81\9bã\82\93ã\80\82"
+"Squidã\81¯ã\81\99ã\81¹ã\81¦ã\81®ã\82¢ã\82¯ã\82»ã\82¹ã\83»ã\83\97ã\83­ã\83\88ã\82³ã\83«ã\81«å¯¾ã\81\97ã\81¦ã\80\81ã\81\99ã\81¹ã\81¦ã\81®ã\83ªã\82¯ã\82¨ã\82¹ã\83\88ã\83¡ã\82½ã\83\83ã\83\89ã\82\92ã\82µã\83\9dã\83¼ã\83\88ã\81\97ã\81¦ã\81\84ã\82\8bã\82\8fã\81\91ã\81§ã\81¯ã\81\82ã\82\8aã\81¾ã\81\9bã\82\93ã\80\82ä¾\8bã\81\88ã\81°ã\80\81POSTã\82\92Gopherã\81®ã\83ªã\82¯ã\82¨"
+"ストで行うことはできません。"
 
 #: templates/ERR_LIFETIME_EXP+html.body.div.p:26
 msgid ""
 "Squid has terminated the request because it has exceeded the maximum "
 "connection lifetime."
-msgstr "最大の接続有効時間が過ぎたため、Squidはリクエストを終了しました。"
+msgstr "最大の接続の有効時間が過ぎたため、Squidは要求を終了しました。"
 
 #: templates/ERR_SOCKET_FAILURE+html.body.div.p:28
 msgid ""
 "Squid is unable to create a TCP socket, presumably due to excessive load. "
 "Please retry your request."
-msgstr ""
-"おそらく過大な負荷のため、SquidはTCPソケットを作成できませんでした。再度リク"
-"エストしてください。"
+msgstr "おそらく過大な負荷のため、SquidはTCPソケットを作成できませんでした。再度リクエストしてみてください。"
 
 #: templates/ERR_FTP_FAILURE+html.body.div.p:22
 #: templates/ERR_FTP_FORBIDDEN+html.body.div.p:22
@@ -778,23 +755,21 @@ msgstr "DNSサーバの応答:"
 
 #: templates/ERR_ESI+html.body.div.p:26
 msgid "The ESI processor returned:"
-msgstr ""
+msgstr "ESI処理からの応答:"
 
 #: templates/ERR_FTP_UNAVAILABLE+html.body.div.p:20
 msgid "The FTP server was too busy to retrieve the URL: <a href=\"%U\">%U</a>"
-msgstr ""
-"以下のURLを取得しようとしているとき、FTPサーバの負荷が高すぎました: <a href="
-"\"%U\">%U</a>"
+msgstr "以下のURLを取得しようとしましたが、FTPサーバの負荷が高すぎました: <a href=\"%U\">%U</a>"
 
 #: templates/ERR_INVALID_RESP+html.body.div.p:26
 msgid ""
 "The HTTP Response message received from the contacted server could not be "
 "understood or was otherwise malformed. Please contact the site operator."
-msgstr ""
+msgstr "接続したサーバからのHTTP応答メッセージが解釈できないか、不正な形式です。サイトの運営担当者に連絡してください。"
 
 #: templates/ERR_ICAP_FAILURE+html.body.div.ul.li.p:32
 msgid "The ICAP server is not reachable."
-msgstr "ICAPサーバに到達到達できません。"
+msgstr "ICAPサーバに到達できません。"
 
 #: templates/ERR_CANNOT_FORWARD+html.body.div.ul.li:32
 msgid ""
@@ -842,24 +817,22 @@ msgstr "以下のURLを取得できませんでした: <a href=\"%U\">%U</a>"
 msgid ""
 "The following error was encountered while trying to retrieve the URL: <a "
 "href=\"%U\">%U</a>"
-msgstr ""
+msgstr "URL: <a href=\"%U\">%U</a> の取得中に以下のエラーが発生しました。"
 
 #: templates/ERR_URN_RESOLVE+html.body.div.p:20
 msgid ""
 "The following error was encountered while trying to retrieve the URN: <a "
 "href=\"%U\">%U</a>"
-msgstr ""
+msgstr "URN: <a href=\"%U\">%U</a> の取得中に以下のエラーが発生しました。"
 
 #: templates/ERR_CONNECT_FAIL+html.body.div.p:28
 #, fuzzy
 msgid "The remote host or network may be down. Please try the request again."
-msgstr ""
-"接続先のホストもしくはネットワークが稼働していません.しばらく待ってからもう"
-"一度試して下さい."
+msgstr "接続先のホストかネットワークが稼働していません。再び試してください。"
 
 #: templates/ERR_TOO_BIG+html.body.div.blockquote.p:23
 msgid "The request or reply is too large."
-msgstr "リクエストまたはリプライが大きすぎます。"
+msgstr "要求か応答が大きすぎます。"
 
 #: templates/ERR_ACCESS_DENIED+html.body.div.h2:15
 #: templates/ERR_ACL_TIME_QUOTA_EXCEEDED+html.body.div.h2:15
@@ -893,7 +866,7 @@ msgstr "リクエストまたはリプライが大きすぎます。"
 #: templates/ERR_WRITE_ERROR+html.body.div.h2:15
 #: templates/ERR_ZERO_SIZE_OBJECT+html.body.div.h2:15
 msgid "The requested URL could not be retrieved"
-msgstr "リクエストされた URL は取得できませんでした"
+msgstr "指定された URL を取得できませんでした"
 
 #: templates/ERR_FTP_FAILURE+html.body.div.p:27
 #: templates/ERR_FTP_FORBIDDEN+html.body.div.p:27
@@ -901,7 +874,7 @@ msgstr "リクエストされた URL は取得できませんでした"
 #: templates/ERR_FTP_PUT_ERROR+html.body.div.p:27
 #: templates/ERR_FTP_UNAVAILABLE+html.body.div.p:28
 msgid "The server responded with:"
-msgstr ""
+msgstr "サーバの応答: "
 
 #: templates/ERR_CONNECT_FAIL+html.body.div.p:26
 #: templates/ERR_ICAP_FAILURE+html.body.div.p:26
@@ -924,7 +897,7 @@ msgstr ""
 msgid ""
 "There is no WAIS Relay host defined for this Cache! Yell at the "
 "administrator."
-msgstr "WAIS リレー用ホストが定義されていません! 管理者に連絡してください."
+msgstr "WAISの中継に使用するホストがキャッシュに設定されていません! 管理者に連絡してください."
 
 #: templates/ERR_ACL_TIME_QUOTA_EXCEEDED+html.body.div.p:27
 #: templates/ERR_TOO_BIG+html.body.div.p:28
@@ -934,25 +907,23 @@ msgid ""
 "operates this cache. Please contact them directly if you feel this is an "
 "error."
 msgstr ""
-"ã\81\93ã\82\8cã\82\89ã\81®å\88¶é\99\90ã\81¯ã\80\81ã\81\93ã\81®ã\82­ã\83£ã\83\83ã\82·ã\83¥ã\81®é\81\8bç\94¨è\80\85ã\81«ã\82\88ã\81£ã\81¦èª²ã\81\95ã\82\8cã\81¦ã\81\84ã\81¾ã\81\99ã\80\82ã\81\93ã\82\8cã\81\8cã\82¨ã\83©ã\83¼ã\81 "
-"と感じるときは直接運用者に連絡して下さい。"
+"ã\81\93ã\82\8cã\82\89ã\81®å\88¶é\99\90ã\81¯ã\80\81ã\81\93ã\81®ã\82­ã\83£ã\83\83ã\82·ã\83¥ã\82\92é\81\8bç\94¨ã\81\97ã\81¦ã\81\84ã\82\8bã\82¤ã\83³ã\82¿ã\83¼ã\83\8dã\83\83ã\83\88ã\83»ã\82µã\83¼ã\83\93ã\82¹ã\81®æ\8f\90ä¾\9bè\80\85ã\81\8c課ã\81\97ã\81¦ã\81\84ã\81¾ã\81\99ã\80\82ã\81\93ã\82\8cã\81\8cé\96\93é\81\95ã\81\84ã\81 ã\81¨æ\84\9fã\81\98ã\82\8bã\81¨ã\81\8dã\81¯ã\80\81ç\9b´æ\8e¥ã\82µã\83¼ã\83\93ã\82¹ã\81®æ\8f\90ä¾\9bè\80\85ã\81«é\80£çµ¡ã\81\97ã\81¦"
+"下さい。"
 
 #: templates/ERR_UNSUP_HTTPVERSION+html.body.div.p:26
 msgid "This Squid does not accept the HTTP version you are attempting to use."
-msgstr ""
+msgstr "使用しようとされているHTTPのバージョンをSquidは受け付けません。"
 
 #: templates/ERR_FTP_DISABLED+html.body.div.p:26
 msgid "This cache does not support FTP."
-msgstr "キャッシュは FTP をサポートしていません."
+msgstr "ã\81\93ã\81®ã\82­ã\83£ã\83\83ã\82·ã\83¥ã\81¯ FTP ã\82\92ã\82µã\83\9dã\83¼ã\83\88ã\81\97ã\81¦ã\81\84ã\81¾ã\81\9bã\82\93ï¼\8e"
 
 #: templates/ERR_SHUTTING_DOWN+html.body.div.p:22
 #, fuzzy
 msgid ""
 "This cache is in the process of shutting down and can not service your "
 "request at this time. Please retry your request again soon."
-msgstr ""
-"このキャッシュは稼働停止の処理に入っていて、現在あなたのリクエストへのサービ"
-"スを提供できません。後で再度リクエストしてください."
+msgstr "このキャッシュは稼働停止の処理の段階で、現在あなたの要求に応えることができません。後で、再び試してください。"
 
 #: templates/ERR_FORWARDING_DENIED+html.body.div.p:26
 #, fuzzy
@@ -961,9 +932,8 @@ msgid ""
 "sibling relationship. Perhaps the client at %i is a cache which has been "
 "misconfigured."
 msgstr ""
-"キャッシュ間における関係を強制的に兄弟関係となるようにしているため,キャッ"
-"シュはあなたのリクエストを転送できませんでした.%i のキャッシュが誤った設定と"
-"なっているかもしれません."
+"キャッシュ間を強制的に兄弟関係となるようにしているため、キャッシュはあなたの要求を転送できませんでした。おそらく、%i "
+"のクライアントは、謝った設定のキャッシュでしょう。"
 
 #: templates/ERR_GATEWAY_FAILURE+html.body.div.p:28
 #, fuzzy
@@ -976,13 +946,15 @@ msgstr ""
 
 #: templates/ERR_ICAP_FAILURE+html.body.div.p:28
 msgid "This means that some aspect of the ICAP communication failed."
-msgstr ""
+msgstr "これはICAPの通信で何か失敗した面があったことを意味しています。"
 
 #: templates/ERR_FTP_PUT_ERROR+html.body.div.p:32
 msgid ""
 "This means that the FTP server may not have permission or space to store the "
 "file. Check the path, permissions, diskspace and try again."
 msgstr ""
+"これはFTPサーバにアクセス権がないか、ファイルを保存する領域が足りなかったことを意味しています。パス、アクセス権、ディスクの空き容量を確認して、再び試"
+"してください。"
 
 # 'address' in this text means the domain name.
 #: templates/ERR_DNS_FAIL+html.body.div.p:31
@@ -990,15 +962,14 @@ msgstr ""
 msgid ""
 "This means that the cache was not able to resolve the hostname presented in "
 "the URL. Check if the address is correct."
-msgstr ""
-"この意味は次の通りですキャッシュは URL 中のホスト名から IP address を調べるこ"
-"とができませんでした. アドレスが間違っていないか確認してください."
+msgstr "これはURLで示されているホスト名を、キャッシュがIPアドレスに解決できなかったことを意味します。URLが正しいかどうか確認してください。"
 
 #: templates/ERR_ESI+html.body.div.p:31
 msgid ""
 "This means that the surrogate was not able to process the ESI template. "
 "Please report this error to the webmaster."
 msgstr ""
+"これはESIのテンプレートの処理を代理サーバで行えなかったことを意味します。このエラーはサイトの管理者(webmaster)に報告してください。"
 
 #: templates/ERR_CONFLICT_HOST+html.body.div.p:26
 msgid ""
@@ -1017,9 +988,8 @@ msgid ""
 "comply with RFC 1738). If this is the cause, then the file can be found at "
 "<a href=\"%B\">%B</a>."
 msgstr ""
-"これは(RFC 1738に従っていない)絶対パスを含んだFTPのURLによる可能性がありま"
-"す。その場合に該当するなら、ファイルは<a href=\"%B\">%B</a>に見つかるかもしれ"
-"ません。"
+"これは(RFC 1738に従っていない)絶対パスを含んだFTPのURLによる可能性があります。もしそうなら、ファイルは<a href=\"%B\">%"
+"B</a>に見つかるかもしれません。"
 
 #: templates/ERR_SECURE_CONNECT_FAIL+html.body.div.p:28
 msgid ""
@@ -1028,6 +998,8 @@ msgid ""
 "host does not support secure connections, or the proxy is not satisfied with "
 "the host security credentials."
 msgstr ""
+"このプロキシーと接続先のホストは互いに受け入れられる、あなたの要求を扱うためのセキュリティの設定を得ることができませんでした。接続先のホストが安全な接続"
+"をサポートしていないか、プロキシーは接続先ホストが要求する証明書を満たせなかったといったことが考えられます."
 
 #: templates/ERR_ACL_TIME_QUOTA_EXCEEDED+html.body.div.p:26
 msgid ""
@@ -1049,19 +1021,19 @@ msgstr ""
 #: templates/ERR_AGENT_WPAD+html.body.div.div.ul.li:37
 msgid ""
 "Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy"
-msgstr ""
+msgstr "ツール -&gt; インターネット オプション -&gt; 接続 -&gt; LAN の設定 -&gt; プロキシ サーバー"
 
 #: templates/ERR_AGENT_CONFIGURE+html.body.div.div.ul.li:29
 #: templates/ERR_AGENT_WPAD+html.body.div.div.ul.li:29
 msgid ""
 "Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings"
-msgstr ""
+msgstr "ツール -&gt; オプション -&gt; 詳細 -&gt; ネットワーク -&gt; 接続設定"
 
 #: templates/ERR_AGENT_CONFIGURE+html.body.div.div.ul.li:45
 #: templates/ERR_AGENT_WPAD+html.body.div.div.ul.li:45
 msgid ""
 "Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers"
-msgstr ""
+msgstr "ツール -&gt; 設定 -&gt; 詳細 -&gt; ネットワーク -&gt; プロキシサーバー"
 
 #: templates/ERR_CONFLICT_HOST+html.body.div.blockquote.pre:23
 msgid "URI Host Conflict"
@@ -1085,11 +1057,11 @@ msgstr "Unable to decrypt certificate's signature"
 
 #: templates/ERR_DNS_FAIL+html.body.div.blockquote.p:23
 msgid "Unable to determine IP address from host name <q>%H</q>"
-msgstr "以下のホスト名の IP address を調べられません.<q>%H</q>"
+msgstr "ホスト名 <q>%H</q> の IPアドレスがわかりません。"
 
 #: templates/ERR_CANNOT_FORWARD+html.body.div.blockquote.p:23
 msgid "Unable to forward this request at this time."
-msgstr "現在,リクエストの転送はできません."
+msgstr "現在要求を送信できません。"
 
 #: templates/error-details.txt+X509_V_ERR_UNABLE_TO_GET_CRL.descr:13
 msgid "Unable to get certificate CRL"
@@ -1110,11 +1082,11 @@ msgstr "Unable to verify the first certificate"
 #: templates/ERR_UNSUP_HTTPVERSION+html.body.div.h2:15
 #: templates/ERR_UNSUP_HTTPVERSION+html.body.div.blockquote.p:23
 msgid "Unsupported HTTP version"
-msgstr ""
+msgstr "サポートしていないHTTPのバージョンです。"
 
 #: templates/ERR_UNSUP_REQ+html.body.div.blockquote.p:23
 msgid "Unsupported Request Method and Protocol"
-msgstr "ã\82µã\83\9dã\83¼ã\83\88ã\81\95ã\82\8cã\81¦ã\81\84ã\81ªã\81\84ã\83ªã\82¯ã\82¨ã\82¹ã\83\88\83\97ã\83­ã\83\88ã\82³ã\83«ã\81§ã\81\99ï¼\8e"
+msgstr "ã\82µã\83\9dã\83¼ã\83\88ã\81\97ã\81¦ã\81\84ã\81ªã\81\84ã\83ªã\82¯ã\82¨ã\82¹ã\83\88ã\83¡ã\82½ã\83\83ã\83\89ã\81¨ã\83\97ã\83­ã\83\88ã\82³ã\83«ã\81§ã\81\99ã\80\82"
 
 #: templates/error-details.txt+X509_V_ERR_INVALID_PURPOSE.descr:105
 msgid "Unsupported certificate purpose"
@@ -1124,20 +1096,18 @@ msgstr "Unsupported certificate purpose"
 msgid ""
 "Valid document was not found in the cache and <q>only-if-cached</q> "
 "directive was specified."
-msgstr ""
-"<q>only-if-cached</q> の指定がありましたが,その文書がキャッシュに存在してい"
-"ません."
+msgstr "<q>only-if-cached</q>を指定されていましたが、有効な文書はキャッシュに存在していませんでした。"
 
 #: templates/ERR_AGENT_CONFIGURE+html.head.title:4
 #: templates/ERR_AGENT_CONFIGURE+html.body.div.h2:15
 #: templates/ERR_AGENT_WPAD+html.head.title:4
 #: templates/ERR_AGENT_WPAD+html.body.div.h2:15
 msgid "Web Browser Configuration"
-msgstr ""
+msgstr "Webブラウザの設定"
 
 #: templates/ERR_WRITE_ERROR+html.body.div.blockquote.p:23
 msgid "Write Error"
-msgstr "送信処理中にエラーが発生しました."
+msgstr "書き込み中にエラーが発生しました。"
 
 #: templates/ERR_ONLY_IF_CACHED_MISS+html.body.div.p:26
 msgid ""
@@ -1204,7 +1174,7 @@ msgstr ""
 
 #: templates/ERR_ZERO_SIZE_OBJECT+html.body.div.blockquote.p:23
 msgid "Zero Sized Reply"
-msgstr "サイズがゼロの応答"
+msgstr "中身がありません."
 
 #~ msgid "ERROR: The requested URN not be retrieved"
 #~ msgstr "エラー: 要求されたURNからデータを取り出せませんでした。"
@@ -1224,10 +1194,8 @@ msgid ""
 "origin servers, and all configured parent caches are currently "
 "unreachable."
 msgstr ""
-"あなたのリクエストは,元のサーバもしくは他の親キャッシュサーバへ転送できま"
-"せん.これは次の理由により発生したと考えられますキャッシュ管理者が元のサー"
-"バに直接接続しないように設定した. 設定されている全ての親キャッシュサーバ"
-"へ現在到達できない."
+"あなたの要求を起源のサーバや、他のどの親キャッシュサーバに送ることができません。これはキャッシュの管理者が目的のサーバに直接接続しないように設定している"
+"か、設定されているすべての親のキャッシュサーバに現在到達できないことが理由として考えられます。"
 
 #~ msgid "While trying to PUT the following URL: <a href=\"%U\">%U</a>"
 #~ msgstr "以下の URL を PUT しようとした際に: <a href=\"%U\">%U</a>"
index 5475667d15ceda0dbc792055b288a64529ccb7d4..641b79aecc6b3ca42b62dca9a1d59cd984f33946 100644 (file)
@@ -8,15 +8,16 @@ msgstr ""
 "Project-Id-Version: squid\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2012-02-06 18:41+1300\n"
-"PO-Revision-Date: 2009-06-05 23:33+0000\n"
-"Last-Translator: Mohamad Faizul bin Zulkifli <piju@mylinux.net.my>\n"
+"PO-Revision-Date: 2013-10-31 13:40+0200\n"
+"Last-Translator: Amos <squid3@treenet.co.nz>\n"
 "Language-Team: Malay <ms@li.org>\n"
 "Language: ms\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+"X-Generator: Pootle 2.1.6\n"
 "X-Launchpad-Export-Date: 2009-06-06 12:04+0000\n"
-"X-Generator: Launchpad (build Unknown)\n"
 
 #: templates/ERR_FTP_FAILURE+html.body.div.blockquote.pre:29
 #: templates/ERR_FTP_FORBIDDEN+html.body.div.blockquote.pre:29
@@ -286,9 +287,8 @@ msgid "Directory: %U"
 msgstr "Direktori: %U"
 
 #: templates/ERR_DIR_LISTING+html.body.div.h2:14
-#, fuzzy
 msgid "Directory: <a href=\"%U\">%U</a>/"
-msgstr "Direktori: <a href=\"/\">%U</a>/"
+msgstr "Direktori: <a href=\"%U\">%U</a>/"
 
 #: templates/ERR_ACCESS_DENIED+html.body.div.h1:14
 #: templates/ERR_ACL_TIME_QUOTA_EXCEEDED+html.body.div.h1:14
@@ -745,7 +745,7 @@ msgstr "Subject issuer mismatch"
 
 #: templates/ERR_DNS_FAIL+html.body.div.p:26
 msgid "The DNS server returned:"
-msgstr ""
+msgstr "Pelayan DNS hantar :"
 
 #: templates/ERR_ESI+html.body.div.p:26
 msgid "The ESI processor returned:"
index c69cf00825994eefea9ec14ade967b4c039f5960..98088ec434552b7b5db2855bd924deccdbff400c 100644 (file)
@@ -8,7 +8,7 @@ msgstr ""
 "Project-Id-Version: squid\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2012-02-06 18:41+1300\n"
-"PO-Revision-Date: 2010-08-17 06:55+0200\n"
+"PO-Revision-Date: 2013-10-31 13:29+0200\n"
 "Last-Translator: Amos <squid3@treenet.co.nz>\n"
 "Language-Team: Dutch <nl@li.org>\n"
 "Language: nl\n"
@@ -388,9 +388,8 @@ msgid "ERROR: The requested URL could not be retrieved"
 msgstr "FOUT: De gevraagde URL kon niet worden opgehaald"
 
 #: templates/ERR_URN_RESOLVE+html.head.title:4
-#, fuzzy
 msgid "ERROR: The requested URN could not be retrieved"
-msgstr "FOUT: De gevraagde URL kon niet worden opgehaald"
+msgstr "FOUT: De gevraagde URN kon niet worden opgehaald"
 
 #: templates/ERR_ESI+html.body.div.blockquote.p:23
 msgid "ESI Processing failed."
@@ -400,12 +399,12 @@ msgstr "ESI processing mislukt."
 #: templates/ERR_FTP_PUT_MODIFIED+html.head.title:4
 #, fuzzy
 msgid "FTP PUT Successful."
-msgstr "FTP PUT Succesvol: Bestand aangemaakt"
+msgstr "FTP PUT succesvol."
 
 #: templates/ERR_FTP_PUT_ERROR+html.body.div.h2:15
 #, fuzzy
 msgid "FTP PUT upload failed"
-msgstr "FTP PUT/upload mislukt"
+msgstr "FTP PUT upload mislukt"
 
 #: templates/ERR_FTP_DISABLED+html.body.div.blockquote.p:23
 msgid "FTP is Disabled"
index 294e7a9985d239fd7883f07baf84f75dcf299d09..3d0bc75b0ee16592186cd8275275ae629b557dbc 100644 (file)
@@ -3,8 +3,8 @@ msgstr ""
 "Project-Id-Version: Squid-3\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2012-02-06 18:41+1300\n"
-"PO-Revision-Date: 2011-07-15 08:10+0200\n"
-"Last-Translator: Anonymous Pootle User\n"
+"PO-Revision-Date: 2013-10-31 14:34+0200\n"
+"Last-Translator: Amos <squid3@treenet.co.nz>\n"
 "Language-Team: Squid Developers <squid-dev@squid-cache.org>\n"
 "Language: pt\n"
 "MIME-Version: 1.0\n"
@@ -90,19 +90,23 @@ msgstr ""
 
 #: templates/ERR_DIR_LISTING+html.body.div.table.tr.th:28
 msgid "<a href=\"../\">Parent Directory</a> (<a href=\"/\">Root Directory</a>)"
-msgstr ""
+msgstr "<a href=\"../\">Diretório Pai</a> (<a href=\"/\">Diretório Raiz</a>)"
 
 #: templates/ERR_INVALID_REQ+html.body.div.p:20
 msgid ""
 "<b>Invalid Request</b> error was encountered while trying to process the "
 "request:"
 msgstr ""
+"Erro de <b>Requisição Inválida</b> foi encontrado enquanto tentava proceder "
+"a requisição."
 
 #: templates/ERR_INVALID_RESP+html.body.div.p:20
 msgid ""
 "<b>Invalid Response</b> error was encountered while trying to process the "
 "request:"
 msgstr ""
+"Erro de <b>Resposta Inválida</b> foi encontrado enquanto tentava proceder a "
+"requisição."
 
 #: templates/ERR_READ_TIMEOUT+html.body.div.p:28
 #, fuzzy
@@ -122,6 +126,8 @@ msgid ""
 "A non-recoverable internal failure or configuration problem prevents this "
 "request from being completed."
 msgstr ""
+"Uma falha não recuperável interna ou problema de configuração impede essa "
+"solicitação seja concluída."
 
 #: templates/ERR_ACCESS_DENIED+html.body.div.blockquote.p:23
 msgid "Access Denied."
@@ -161,7 +167,7 @@ msgstr ""
 
 #: templates/ERR_ICAP_FAILURE+html.body.div.ul.li.p:33
 msgid "An Illegal response was received from the ICAP server."
-msgstr ""
+msgstr "Uma resposta ilegal foi recebida do servidor ICAP."
 
 #: templates/ERR_CANNOT_FORWARD+html.body.div.ul.li:30
 msgid ""
@@ -270,7 +276,7 @@ msgstr "O tempo limite de conexão expirou"
 
 #: templates/ERR_CONNECT_FAIL+html.body.div.blockquote.p:23
 msgid "Connection to %I failed."
-msgstr ""
+msgstr "Conexão com %I falhou."
 
 #: templates/ERR_INVALID_REQ+html.body.div.ul.li.p:32
 msgid "Content-Length missing for POST or PUT requests."
@@ -278,7 +284,7 @@ msgstr ""
 
 #: templates/ERR_DIR_LISTING+html.body.div.h4:19
 msgid "Directory Content:"
-msgstr ""
+msgstr "Diretório Conteúdo:"
 
 #: templates/ERR_DIR_LISTING+html.body.div.table:-1
 msgid "Directory Listing"
@@ -286,11 +292,11 @@ msgstr ""
 
 #: templates/ERR_DIR_LISTING+html.head.title:4
 msgid "Directory: %U"
-msgstr ""
+msgstr "Diretório: %U"
 
 #: templates/ERR_DIR_LISTING+html.body.div.h2:14
 msgid "Directory: <a href=\"%U\">%U</a>/"
-msgstr ""
+msgstr "Diretório: <a href=\"%U\">%U</a>/"
 
 #: templates/ERR_ACCESS_DENIED+html.body.div.h1:14
 #: templates/ERR_ACL_TIME_QUOTA_EXCEEDED+html.body.div.h1:14
@@ -381,24 +387,21 @@ msgid "ERROR: The requested URL could not be retrieved"
 msgstr "ERRO: A URL solicitada não pode ser recuperada"
 
 #: templates/ERR_URN_RESOLVE+html.head.title:4
-#, fuzzy
 msgid "ERROR: The requested URN could not be retrieved"
-msgstr "ERRO: A URL solicitada não pode ser recuperada"
+msgstr "ERRO: A URN solicitada não pode ser recuperada"
 
 #: templates/ERR_ESI+html.body.div.blockquote.p:23
 msgid "ESI Processing failed."
-msgstr ""
+msgstr "O Processamento do ESI falhou."
 
 #: templates/ERR_FTP_PUT_CREATED+html.head.title:4
 #: templates/ERR_FTP_PUT_MODIFIED+html.head.title:4
-#, fuzzy
 msgid "FTP PUT Successful."
-msgstr "Sucesso no FTP PUT: Arquivo criado"
+msgstr "FTP PUT obteve sucesso."
 
 #: templates/ERR_FTP_PUT_ERROR+html.body.div.h2:15
-#, fuzzy
 msgid "FTP PUT upload failed"
-msgstr "FTP PUT/erro na carga"
+msgstr "O upload do FTP PUT falhou."
 
 #: templates/ERR_FTP_DISABLED+html.body.div.blockquote.p:23
 msgid "FTP is Disabled"
@@ -406,48 +409,46 @@ msgstr "FTP desabilitado"
 
 #: templates/ERR_SECURE_CONNECT_FAIL+html.body.div.blockquote.p:23
 msgid "Failed to establish a secure connection to %I"
-msgstr ""
+msgstr "Falha ao estabelecer uma conexão segura com %I"
 
 #: templates/ERR_FTP_PUT_CREATED+html.body.div.h2:15
-#, fuzzy
 msgid "File created"
-msgstr "Arquivo atualizado"
+msgstr "Criado arquivo"
 
 #: templates/ERR_FTP_PUT_MODIFIED+html.body.div.h2:15
-#, fuzzy
 msgid "File updated"
 msgstr "Arquivo atualizado"
 
 #: templates/ERR_AGENT_CONFIGURE+html.body.div.div.ul.li:26
 #: templates/ERR_AGENT_WPAD+html.body.div.div.ul.li:26
 msgid "For Firefox browsers go to: <ul>"
-msgstr ""
+msgstr "Para o navegador FireFox va para: <ul>"
 
 #: templates/ERR_AGENT_CONFIGURE+html.body.div.div.ul.li:34
 #: templates/ERR_AGENT_WPAD+html.body.div.div.ul.li:34
 msgid "For Internet Explorer browsers go to: <ul>"
-msgstr ""
+msgstr "Para o navegador Internet Explorer va para: <ul>"
 
 #: templates/ERR_AGENT_CONFIGURE+html.body.div.div.ul.li:42
 #: templates/ERR_AGENT_WPAD+html.body.div.div.ul.li:42
 msgid "For Opera browsers go to: <ul>"
-msgstr ""
+msgstr "Para o navegador Opera va para: <ul>"
 
 #: templates/error-details.txt+X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD.descr:61
 msgid "Format error in CRL's lastUpdate field"
-msgstr "Format error in CRL's lastUpdate field"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD.descr:65
 msgid "Format error in CRL's nextUpdate field"
-msgstr "Format error in CRL's nextUpdate field"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD.descr:57
 msgid "Format error in certificate's notAfter field"
-msgstr "Format error in certificate's notAfter field"
+msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD.descr:53
 msgid "Format error in certificate's notBefore field"
-msgstr "Format error in certificate's notBefore field"
+msgstr ""
 
 #: templates/ERR_FORWARDING_DENIED+html.body.div.blockquote.p:23
 msgid "Forwarding Denied."
@@ -455,7 +456,7 @@ msgstr "Expedição proibida."
 
 #: templates/ERR_GATEWAY_FAILURE+html.body.div.blockquote.p:23
 msgid "Gateway Proxy Failure"
-msgstr ""
+msgstr "O Gateway do Proxy Falhou."
 
 #: templates/ERR_ACCESS_DENIED+html.body.div.p:34
 #: templates/ERR_ACL_TIME_QUOTA_EXCEEDED+html.body.div.p:35
@@ -499,12 +500,14 @@ msgstr ""
 #: templates/ERR_WRITE_ERROR+html.body.div.p:36
 #: templates/ERR_ZERO_SIZE_OBJECT+html.body.div.p:34
 msgid "Generated %T by %h (%s)"
-msgstr ""
+msgstr "Gerado %T por %h (%s)"
 
 #: templates/ERR_INVALID_REQ+html.body.div.ul.li.p:34
 msgid ""
 "HTTP/1.1 <q>Expect:</q> feature is being asked from an HTTP/1.0 software."
 msgstr ""
+"HTTP/1.1 <q>Esperar:</q> recurso está sendo feita a partir de um programa "
+"HTTP/1.0."
 
 #: templates/error-details.txt+SQUID_ERR_SSL_HANDSHAKE.descr:1
 msgid "Handshake with SSL server failed"
@@ -517,20 +520,19 @@ msgstr "Não espere muita coisa de URNS em %T :-)"
 #: templates/ERR_AGENT_CONFIGURE+html.body.div.p:24
 #: templates/ERR_AGENT_WPAD+html.body.div.p:24
 msgid "How to find these settings in your browser:"
-msgstr ""
+msgstr "Como encontrar essas configurações em seu navegador:"
 
 #: templates/ERR_ICAP_FAILURE+html.body.div.blockquote.p:23
 msgid "ICAP protocol error."
-msgstr ""
+msgstr "Erro do protocolo ICAP."
 
 #: templates/ERR_TOO_BIG+html.body.div.p:27
-#, fuzzy
 msgid ""
 "If you are making a GET request, then the item you are trying to download is "
 "too large."
 msgstr ""
-"Se você estiver fazendo uma requisição GET, então o corpo da resposta (o que "
-"você está tentando baixar) é muito grande."
+"Se você estiver fazendo uma requisição GET, então o arquivo que esta "
+"tentando baixar é muito grande."
 
 #: templates/ERR_TOO_BIG+html.body.div.p:26
 msgid ""
@@ -547,7 +549,7 @@ msgstr "Hostname com caracter inválido; não são permitidos underscores."
 
 #: templates/ERR_INVALID_URL+html.body.div.ul.li.p:32
 msgid "Illegal double-escape in the URL-Path"
-msgstr ""
+msgstr "Escape-duplo Ilegal no URL-Path"
 
 #: templates/ERR_AGENT_CONFIGURE+html.body.div.div.ul.li:30
 #: templates/ERR_AGENT_CONFIGURE+html.body.div.div.ul.li:38
@@ -591,7 +593,6 @@ msgid "Missing or unknown request method."
 msgstr "Método desconhecido ou faltando (GET, POST)"
 
 #: templates/ERR_NO_RELAY+html.body.div.blockquote.p:23
-#, fuzzy
 msgid "No Wais Relay"
 msgstr "Sem Wais"
 
@@ -632,11 +633,11 @@ msgstr ""
 
 #: templates/ERR_PRECONDITION_FAILED+html.body.div.blockquote.p:23
 msgid "Precondition Failed."
-msgstr ""
+msgstr "Falha na Pré-condição."
 
 #: templates/ERR_READ_ERROR+html.body.div.blockquote.p:23
 msgid "Read Error"
-msgstr "Erro de leitura"
+msgstr "Erro de Leitura"
 
 #: templates/ERR_READ_TIMEOUT+html.body.div.blockquote.p:23
 msgid "Read Timeout"
@@ -679,11 +680,11 @@ msgstr ""
 
 #: templates/ERR_AGENT_WPAD+html.body.div.div.ul.li:38
 msgid "Select Automatically detect settings"
-msgstr ""
+msgstr "Selecionar automaticamente a detecção de configurações."
 
 #: templates/ERR_AGENT_WPAD+html.body.div.div.ul.li:46
 msgid "Select Use Automatic proxy configuration"
-msgstr ""
+msgstr "Selecione configuração automática do Proxy."
 
 #: templates/error-details.txt+X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT.descr:73
 msgid "Self signed certificate"
@@ -1206,7 +1207,7 @@ msgstr ""
 
 #: templates/ERR_ESI+html.body.div.p:33
 msgid "Your webmaster is <a href=\"mailto:%w\">%w</a>."
-msgstr ""
+msgstr "Seu webmaster é <a href=\"mailto:%w\">%w</a>."
 
 #: templates/ERR_ZERO_SIZE_OBJECT+html.body.div.blockquote.p:23
 msgid "Zero Sized Reply"
index eca21963ca5c4bfb3de969f7a011ca4e4ed447f4..7d0f027bbba30d6c2e0b220b6a0b5b29c725e971 100644 (file)
@@ -3,8 +3,8 @@ msgstr ""
 "Project-Id-Version: Squid-3\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2012-02-06 18:41+1300\n"
-"PO-Revision-Date: 2010-03-11 18:56+0200\n"
-"Last-Translator: Bratislav <batailic@gmail.com>\n"
+"PO-Revision-Date: 2013-10-31 13:15+0200\n"
+"Last-Translator: Francesco <kinkie@squid-cache.org>\n"
 "Language-Team: Squid Developers <squid-dev@squid-cache.org>\n"
 "Language: sr_LT\n"
 "MIME-Version: 1.0\n"
@@ -125,6 +125,8 @@ msgid ""
 "A non-recoverable internal failure or configuration problem prevents this "
 "request from being completed."
 msgstr ""
+"Interna greška ili problem sa konfiguracijom ne dozvoljava da se zahtev "
+"obradi."
 
 #: templates/ERR_ACCESS_DENIED+html.body.div.blockquote.p:23
 msgid "Access Denied."
@@ -190,7 +192,7 @@ msgstr ""
 
 #: templates/error-details.txt+X509_V_ERR_APPLICATION_VERIFICATION.descr:133
 msgid "Application verification failure"
-msgstr "Application verification failure"
+msgstr "Greška verifikacije aplikacije"
 
 #: templates/ERR_PRECONDITION_FAILED+html.body.div.blockquote.p:28
 msgid ""
index adcd88feafd508e814531e473483839e9cd91a8b..cd77713b6b96119e0ddd390eed91aad87431e151 100644 (file)
@@ -3,8 +3,8 @@ msgstr ""
 "Project-Id-Version: Squid-3\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2012-02-06 18:41+1300\n"
-"PO-Revision-Date: 2011-07-15 08:10+0200\n"
-"Last-Translator: Anonymous Pootle User\n"
+"PO-Revision-Date: 2013-10-31 13:15+0200\n"
+"Last-Translator: Francesco <kinkie@squid-cache.org>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
 "Language: sv\n"
 "MIME-Version: 1.0\n"
@@ -90,7 +90,7 @@ msgstr ""
 
 #: templates/ERR_DIR_LISTING+html.body.div.table.tr.th:28
 msgid "<a href=\"../\">Parent Directory</a> (<a href=\"/\">Root Directory</a>)"
-msgstr ""
+msgstr "<a href=\"../\">Föregående katalog</a> (<a href=\"/\">Rootkatalog</a>)"
 
 #: templates/ERR_INVALID_REQ+html.body.div.p:20
 msgid ""
@@ -284,11 +284,11 @@ msgstr "Content-Length saknas i POST eller PUT beg&auml;ran."
 
 #: templates/ERR_DIR_LISTING+html.body.div.h4:19
 msgid "Directory Content:"
-msgstr "Kataloginnehåll:"
+msgstr "Mappinnehåll:"
 
 #: templates/ERR_DIR_LISTING+html.body.div.table:-1
 msgid "Directory Listing"
-msgstr ""
+msgstr "Mappinnehåll"
 
 #: templates/ERR_DIR_LISTING+html.head.title:4
 msgid "Directory: %U"
@@ -959,7 +959,7 @@ msgstr ""
 
 #: templates/ERR_UNSUP_HTTPVERSION+html.body.div.p:26
 msgid "This Squid does not accept the HTTP version you are attempting to use."
-msgstr "Squid fungerar inte med den versionen av HTTP som du försöker använda"
+msgstr "Denna Squid accepterar inte den HTTP version du försöker använda."
 
 #: templates/ERR_FTP_DISABLED+html.body.div.p:26
 msgid "This cache does not support FTP."
index 7eeffc82714aa59996553165054eee6782034b1d..f89568849f6f8809867eda87aefa7f8dc96a8582 100644 (file)
@@ -3,8 +3,8 @@ msgstr ""
 "Project-Id-Version: Squid-3\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2012-02-06 18:41+1300\n"
-"PO-Revision-Date: 2011-07-15 08:10+0200\n"
-"Last-Translator: Anonymous Pootle User\n"
+"PO-Revision-Date: 2013-10-31 13:11+0200\n"
+"Last-Translator: Francesco <kinkie@squid-cache.org>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
 "Language: tr\n"
 "MIME-Version: 1.0\n"
@@ -158,7 +158,7 @@ msgid ""
 "\">%U</a>"
 msgstr ""
 "URL: <a href=\"%U\">%U</a> adresine erişilirken bir iletişim hatası meydana "
-"geldi."
+"geldi"
 
 #: templates/ERR_ICAP_FAILURE+html.body.div.ul.li.p:33
 msgid "An Illegal response was received from the ICAP server."
index 434f0328665a99708a26d44704c39ddaa6531803..91f31a90fda808f2d5e59aa4d070fe82edd591c0 100644 (file)
@@ -8,8 +8,8 @@ msgstr ""
 "Project-Id-Version: squid\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2012-02-06 18:41+1300\n"
-"PO-Revision-Date: 2011-07-15 08:10+0200\n"
-"Last-Translator: Anonymous Pootle User\n"
+"PO-Revision-Date: 2013-10-31 12:26+0200\n"
+"Last-Translator: Francesco <kinkie@squid-cache.org>\n"
 "Language-Team: Ukrainian <uk@li.org>\n"
 "Language: uk\n"
 "MIME-Version: 1.0\n"
@@ -26,31 +26,34 @@ msgstr ""
 #: templates/ERR_FTP_PUT_ERROR+html.body.div.blockquote.pre:29
 #: templates/ERR_FTP_UNAVAILABLE+html.body.div.blockquote.pre:30
 msgid "%F"
-msgstr ""
+msgstr "%F"
 
 #: templates/ERR_INVALID_REQ+html.body.div.blockquote.pre:23
 #: templates/ERR_INVALID_RESP+html.body.div.blockquote.pre:23
 msgid "%R"
-msgstr ""
+msgstr "%R"
 
 #: templates/ERR_ESI+html.body.div.blockquote.pre:28
+#, fuzzy
 msgid "%Z"
-msgstr ""
+msgstr "%Z"
 
 #: templates/ERR_FTP_FAILURE+html.body.div.blockquote.pre:24
 #: templates/ERR_FTP_FORBIDDEN+html.body.div.blockquote.pre:24
 #: templates/ERR_FTP_NOT_FOUND+html.body.div.blockquote.pre:24
 #: templates/ERR_FTP_PUT_ERROR+html.body.div.blockquote.pre:24
 #: templates/ERR_FTP_UNAVAILABLE+html.body.div.blockquote.pre:25
+#, fuzzy
 msgid "%f"
-msgstr ""
+msgstr "%f"
 
 #: templates/ERR_FTP_FAILURE+html.body.div.blockquote.pre:30
 #: templates/ERR_FTP_FORBIDDEN+html.body.div.blockquote.pre:30
 #: templates/ERR_FTP_NOT_FOUND+html.body.div.blockquote.pre:30
 #: templates/ERR_FTP_UNAVAILABLE+html.body.div.blockquote.pre:31
+#, fuzzy
 msgid "%g"
-msgstr ""
+msgstr "%g"
 
 #: templates/error-details.txt+X509_V_ERR_OUT_OF_MEM.detail:69
 msgid "%ssl_error_descr"
@@ -92,8 +95,9 @@ msgstr "%ssl_error_descr: %ssl_subject"
 
 #: templates/ERR_DIR_LISTING+html.body.div.blockquote.pre:22
 #: templates/ERR_DNS_FAIL+html.body.div.blockquote.pre:28
+#, fuzzy
 msgid "%z"
-msgstr ""
+msgstr "%z"
 
 #: templates/ERR_DIR_LISTING+html.body.div.table.tr.th:28
 msgid "<a href=\"../\">Parent Directory</a> (<a href=\"/\">Root Directory</a>)"
@@ -114,7 +118,6 @@ msgid ""
 msgstr "<b>Невірна відповідь</b> виникла при обробці запиту:"
 
 #: templates/ERR_READ_TIMEOUT+html.body.div.p:28
-#, fuzzy
 msgid ""
 "A Timeout occurred while waiting to read data from the network. The network "
 "or server may be down or congested. Please retry your request."
@@ -137,15 +140,14 @@ msgid "Access Denied."
 msgstr "Доступ заборонено"
 
 #: templates/ERR_ACCESS_DENIED+html.body.div.p:26
-#, fuzzy
 msgid ""
 "Access control configuration prevents your request from being allowed at "
 "this time. Please contact your service provider if you feel this is "
 "incorrect."
 msgstr ""
 "Налаштування контролю доступу забороняє обробку Вашого запиту в даний час. "
-"Ð\91Ñ\83дÑ\8c-лаÑ\81ка, Ð¿Ð¾Ñ\81пÑ\96лкÑ\83йÑ\82еÑ\81Ñ\8c з Вашим постачальником Інтернет послуг, якщо Ви "
-"вважаєте це неправильним."
+"Ð\91Ñ\83дÑ\8c-лаÑ\81ка, Ð·Ð²'Ñ\8fжÑ\96Ñ\82Ñ\8cÑ\81Ñ\8f з Вашим постачальником Інтернет послуг, якщо Ви "
+"вважаєте, що це неправильно."
 
 #: templates/ERR_CANNOT_FORWARD+html.body.div.ul.li:31
 msgid "All configured parent caches may be currently unreachable."
@@ -177,15 +179,13 @@ msgid ""
 msgstr ""
 
 #: templates/ERR_READ_ERROR+html.body.div.p:28
-#, fuzzy
 msgid ""
 "An error condition occurred while reading data from the network. Please "
 "retry your request."
 msgstr ""
-"Ð\9fÑ\96д Ñ\87аÑ\81 Ñ\87иÑ\82аннÑ\8f даних з мережі сталася помилка. Будь-ласка, повторіть запит."
+"Ð\9fÑ\80и Ñ\87иÑ\82аннÑ\96 даних з мережі сталася помилка. Будь-ласка, повторіть запит."
 
 #: templates/ERR_WRITE_ERROR+html.body.div.p:28
-#, fuzzy
 msgid ""
 "An error condition occurred while writing to the network. Please retry your "
 "request."
@@ -425,17 +425,17 @@ msgstr "Файл поновлено"
 #: templates/ERR_AGENT_CONFIGURE+html.body.div.div.ul.li:26
 #: templates/ERR_AGENT_WPAD+html.body.div.div.ul.li:26
 msgid "For Firefox browsers go to: <ul>"
-msgstr ""
+msgstr "Для браузерів Firefox перейдіть до: <ul>"
 
 #: templates/ERR_AGENT_CONFIGURE+html.body.div.div.ul.li:34
 #: templates/ERR_AGENT_WPAD+html.body.div.div.ul.li:34
 msgid "For Internet Explorer browsers go to: <ul>"
-msgstr ""
+msgstr "Для браузерів Internet Explorer перейдіть до: <ul>"
 
 #: templates/ERR_AGENT_CONFIGURE+html.body.div.div.ul.li:42
 #: templates/ERR_AGENT_WPAD+html.body.div.div.ul.li:42
 msgid "For Opera browsers go to: <ul>"
-msgstr ""
+msgstr "Для браузерів Opera перейдіть до: <ul>"
 
 #: templates/error-details.txt+X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD.descr:61
 msgid "Format error in CRL's lastUpdate field"
@@ -509,20 +509,21 @@ msgstr "Згенеровано %T на %h (%s)"
 msgid ""
 "HTTP/1.1 <q>Expect:</q> feature is being asked from an HTTP/1.0 software."
 msgstr ""
+"Запит з використанням заголовку <q>Expect:</q> протоколу HTTP/1.1 здійснено "
+"до програмного забезпечення яке підтримує протокол HTTP/1.0."
 
 #: templates/error-details.txt+SQUID_ERR_SSL_HANDSHAKE.descr:1
 msgid "Handshake with SSL server failed"
 msgstr ""
 
 #: templates/ERR_URN_RESOLVE+html.body.div.p:26
-#, fuzzy
 msgid "Hey, don't expect too much from URNs on %T :)"
-msgstr "Ð\9dе Ð²Ð°Ñ\80Ñ\82о Ð¾Ñ\87Ñ\96кÑ\83ваÑ\82и надто багато від URN'ів на %T."
+msgstr "Ð\9dе Ð¾Ñ\87Ñ\96кÑ\83йÑ\82е надто багато від URN'ів на %T."
 
 #: templates/ERR_AGENT_CONFIGURE+html.body.div.p:24
 #: templates/ERR_AGENT_WPAD+html.body.div.p:24
 msgid "How to find these settings in your browser:"
-msgstr ""
+msgstr "Як знайти ці налаштування у Вашому браузері:"
 
 #: templates/ERR_ICAP_FAILURE+html.body.div.blockquote.p:23
 msgid "ICAP protocol error."
@@ -549,9 +550,8 @@ msgid "Illegal character in hostname; underscores are not allowed."
 msgstr "Неприпустимий символ в імені сервера; символ підкреслення заборонено."
 
 #: templates/ERR_INVALID_URL+html.body.div.ul.li.p:32
-#, fuzzy
 msgid "Illegal double-escape in the URL-Path"
-msgstr "В шляху URL присутній зайвий символ <q>/</q>;"
+msgstr ""
 
 #: templates/ERR_AGENT_CONFIGURE+html.body.div.div.ul.li:30
 #: templates/ERR_AGENT_CONFIGURE+html.body.div.div.ul.li:38
@@ -682,11 +682,11 @@ msgstr ""
 
 #: templates/ERR_AGENT_WPAD+html.body.div.div.ul.li:38
 msgid "Select Automatically detect settings"
-msgstr ""
+msgstr "Виберіть \"Автоматичне визначення параметрів\""
 
 #: templates/ERR_AGENT_WPAD+html.body.div.div.ul.li:46
 msgid "Select Use Automatic proxy configuration"
-msgstr ""
+msgstr "Виберіть \" Автоматичне налаштування проксі\" "
 
 #: templates/error-details.txt+X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT.descr:73
 msgid "Self signed certificate"
@@ -854,10 +854,9 @@ msgid ""
 msgstr "При отриманні URN: <a href=\"%U\">%U</a> виникла помилка."
 
 #: templates/ERR_CONNECT_FAIL+html.body.div.p:28
-#, fuzzy
 msgid "The remote host or network may be down. Please try the request again."
 msgstr ""
-"Ð\92Ñ\96ддалений Ð²Ñ\83зел Ñ\87и Ð¼ÐµÑ\80ежа Ð½Ðµ Ð²Ñ\96дповÑ\96даÑ\8eÑ\82Ñ\8c.  Будь-ласка, повторіть запит."
+"Ð\92Ñ\96ддалений Ð²Ñ\83зел Ñ\87и Ð¼ÐµÑ\80ежа Ð¼Ð¾Ð¶Ð»Ð¸Ð²Ð¾ Ð½ÐµÐ´Ð¾Ñ\81Ñ\82Ñ\83пнÑ\96.  Будь-ласка, повторіть запит."
 
 #: templates/ERR_TOO_BIG+html.body.div.blockquote.p:23
 msgid "The request or reply is too large."
@@ -922,23 +921,21 @@ msgid ""
 msgstr ""
 
 #: templates/ERR_NO_RELAY+html.body.div.p:26
-#, fuzzy
 msgid ""
 "There is no WAIS Relay host defined for this Cache! Yell at the "
 "administrator."
 msgstr ""
-"Ð\94лÑ\8f Ð´Ð°Ð½Ð¾Ð³Ð¾ ÐºÐµÑ\88Ñ\83 Ð½Ðµ Ð²Ð¸Ð·Ð½Ð°Ñ\87ено WAIS Relay Ð²Ñ\83зол. Ð\9fокÑ\80иÑ\87Ñ\96Ñ\82Ñ\8c Ð½Ð° Ð\90дмÑ\96нÑ\96Ñ\81Ñ\82Ñ\80аÑ\82оÑ\80а."
+"Ð\94лÑ\8f Ð´Ð°Ð½Ð¾Ð³Ð¾ ÐºÐµÑ\88Ñ\83 Ð½Ðµ Ð²Ð¸Ð·Ð½Ð°Ñ\87ений WAIS Relay Ð²Ñ\83зел! Ð\9fоÑ\81каÑ\80жÑ\96Ñ\82Ñ\8cÑ\81Ñ\8f Ð°Ð´Ð¼Ñ\96нÑ\96Ñ\81Ñ\82Ñ\80аÑ\82оÑ\80Ñ\83."
 
 #: templates/ERR_ACL_TIME_QUOTA_EXCEEDED+html.body.div.p:27
 #: templates/ERR_TOO_BIG+html.body.div.p:28
-#, fuzzy
 msgid ""
 "These limits have been established by the Internet Service Provider who "
 "operates this cache. Please contact them directly if you feel this is an "
 "error."
 msgstr ""
-"Ці ліміти встановлено Інтернет постачальником, котрий керує даним кешом. "
-"Ð\91Ñ\83дÑ\8c-лаÑ\81ка, Ð·Ð²'Ñ\8fжÑ\96Ñ\82Ñ\8cÑ\81Ñ\8f Ð· Ð½Ð¸Ð¼, Ñ\8fкÑ\89о Ð\92и Ð²Ð²Ð°Ð¶Ð°Ñ\94Ñ\82е Ð´Ð°Ð½Ðµ Ð¿Ð¾Ð²Ñ\96домленнÑ\8f помилкою."
+"Ці ліміти встановлені Інтернет провайдером, який керує даним кешом. "
+"Ð\91Ñ\83дÑ\8c-лаÑ\81ка, Ð·Ð²'Ñ\8fжÑ\96Ñ\82Ñ\8cÑ\81Ñ\8f Ð±ÐµÐ·Ð¿Ð¾Ñ\81еÑ\80еднÑ\8cо Ð· Ð½Ð¸Ð¼, Ñ\8fкÑ\89о Ð\92и Ð²Ð²Ð°Ð¶Ð°Ñ\94Ñ\82е Ñ\86е помилкою."
 
 #: templates/ERR_UNSUP_HTTPVERSION+html.body.div.p:26
 msgid "This Squid does not accept the HTTP version you are attempting to use."
@@ -949,23 +946,21 @@ msgid "This cache does not support FTP."
 msgstr "FTP відключено"
 
 #: templates/ERR_SHUTTING_DOWN+html.body.div.p:22
-#, fuzzy
 msgid ""
 "This cache is in the process of shutting down and can not service your "
 "request at this time. Please retry your request again soon."
 msgstr ""
-"Зараз кеш в процесі припинення роботи і не може виконати Ваш запит. Будь-"
-"ласка, повторіть запит через деякий час."
+"Зараз кеш в процесі припинення роботи і не може виконати Ваш запит в даний "
+"час. Будь-ласка, повторіть запит пізніше."
 
 #: templates/ERR_FORWARDING_DENIED+html.body.div.p:26
-#, fuzzy
 msgid ""
 "This cache will not forward your request because it is trying to enforce a "
 "sibling relationship. Perhaps the client at %i is a cache which has been "
 "misconfigured."
 msgstr ""
-"Цей кеш не перешле Ваш запит, через намагання встановити родинні "
-"взаÑ\94мовÑ\96дноÑ\81ини. Ð¡ÐºÐ¾Ñ\80Ñ\96Ñ\88 Ð·Ð° Ð²Ñ\81е ÐºÐ»Ñ\96Ñ\94нÑ\82 %i - Ð½ÐµÐ²Ñ\96Ñ\80но Ñ\81конÑ\84Ñ\96гÑ\83Ñ\80ований ÐºÐµÑ\88."
+"Цей кеш не перешле Ваш запит, через намагання встановити родинні відносини. "
+"Скоріш за все клієнт %i - невірно сконфігурований кеш."
 
 #: templates/ERR_GATEWAY_FAILURE+html.body.div.p:28
 #, fuzzy
@@ -1012,18 +1007,17 @@ msgstr ""
 
 #: templates/ERR_PRECONDITION_FAILED+html.body.div.p:26
 msgid "This means:"
-msgstr ""
+msgstr "Це означає:"
 
 #: templates/ERR_FTP_NOT_FOUND+html.body.div.p:33
-#, fuzzy
 msgid ""
 "This might be caused by an FTP URL with an absolute path (which does not "
 "comply with RFC 1738). If this is the cause, then the file can be found at "
 "<a href=\"%B\">%B</a>."
 msgstr ""
-"Це може бути викликано FTP адресою з абсолютним URL шляхом (який не "
-"відповідає стандарту RFC 1738). В такому випадку, файл може бути знайдений "
-"за адресою <a href=\"%B\">%B</a>."
+"Це може бути викликано FTP адресою з абсолютним шляхом (що не відповідає "
+"стандарту RFC 1738). В такому випадку, файл може бути знайдений за адресою "
+"<a href=\"%B\">%B</a>."
 
 #: templates/ERR_SECURE_CONNECT_FAIL+html.body.div.p:28
 msgid ""
@@ -1057,18 +1051,24 @@ msgstr ""
 msgid ""
 "Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy"
 msgstr ""
+"Інструменти -&gt; Властивості браузера -&gt; З'єднання -&gt; Налаштування "
+"LAN -&gt; Проксі"
 
 #: templates/ERR_AGENT_CONFIGURE+html.body.div.div.ul.li:29
 #: templates/ERR_AGENT_WPAD+html.body.div.div.ul.li:29
 msgid ""
 "Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings"
 msgstr ""
+"Інструменти -&gt; Опції -&gt; Додатково -&gt; Мережа -&gt; Параметри "
+"з'єднання"
 
 #: templates/ERR_AGENT_CONFIGURE+html.body.div.div.ul.li:45
 #: templates/ERR_AGENT_WPAD+html.body.div.div.ul.li:45
 msgid ""
 "Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers"
 msgstr ""
+"Інструменти -&gt; Налаштування -&gt; Додатково -&gt; Мережа -&gt; Проксі "
+"сервера"
 
 #: templates/ERR_CONFLICT_HOST+html.body.div.blockquote.pre:23
 msgid "URI Host Conflict"
@@ -1117,7 +1117,7 @@ msgstr "Unable to verify the first certificate"
 #: templates/ERR_UNSUP_HTTPVERSION+html.body.div.h2:15
 #: templates/ERR_UNSUP_HTTPVERSION+html.body.div.blockquote.p:23
 msgid "Unsupported HTTP version"
-msgstr "Версія HTTP протоколу не підпримується"
+msgstr "Версія HTTP протоколу не підтримується"
 
 #: templates/ERR_UNSUP_REQ+html.body.div.blockquote.p:23
 msgid "Unsupported Request Method and Protocol"
@@ -1128,42 +1128,41 @@ msgid "Unsupported certificate purpose"
 msgstr "Unsupported certificate purpose"
 
 #: templates/ERR_ONLY_IF_CACHED_MISS+html.body.div.blockquote.p:23
-#, fuzzy
 msgid ""
 "Valid document was not found in the cache and <q>only-if-cached</q> "
 "directive was specified."
 msgstr ""
-"Необхідний документ не знайдений в кеші і визначена директива <q>only-if-"
-"cached</q> (<q>тільки в кеші</q>)"
+"Необхідний документ не знайдений в кеші і визначена директива <q>\"тільки в "
+"кеші\"</q>"
 
 #: templates/ERR_AGENT_CONFIGURE+html.head.title:4
 #: templates/ERR_AGENT_CONFIGURE+html.body.div.h2:15
 #: templates/ERR_AGENT_WPAD+html.head.title:4
 #: templates/ERR_AGENT_WPAD+html.body.div.h2:15
 msgid "Web Browser Configuration"
-msgstr ""
+msgstr "Конфігурація браузера"
 
 #: templates/ERR_WRITE_ERROR+html.body.div.blockquote.p:23
 msgid "Write Error"
 msgstr "Помилка запису"
 
 #: templates/ERR_ONLY_IF_CACHED_MISS+html.body.div.p:26
-#, fuzzy
 msgid ""
 "You have issued a request with a <q>only-if-cached</q> cache control "
 "directive. The document was not found in the cache, <em>or</em> it required "
 "revalidation prohibited by the <q>only-if-cached</q> directive."
 msgstr ""
-"Ви надіслали запит з директивою керування кешу <q>only-if-cached</q> "
-"(<q>тільки в кеші</q>). Документ не знайдений в кеші, <em>або</em> він "
-"потребує оновлення, що заборонено директивою <q>only-if-cached</q> "
-"(<q>тільки в кеші</q>)."
+"Ви надіслали запит з директивою керування кешу <q>\"тільки в кеші\"</q>. "
+"Документ не знайдений в кеші, <em>або</em> він потребує оновлення, що "
+"заборонено директивою <q>\"тільки в кеші\"</q>."
 
 #: templates/ERR_AGENT_CONFIGURE+html.body.div.blockquote.p:21
 #: templates/ERR_AGENT_WPAD+html.body.div.blockquote.p:21
 msgid ""
 "Your Web Browser configuration needs to be corrected to use this network."
 msgstr ""
+"Конфігурація Вашого браузера потребує коригувань для використання цієї "
+"мережі."
 
 #: templates/ERR_ACCESS_DENIED+html.body.div.p:28
 #: templates/ERR_ACL_TIME_QUOTA_EXCEEDED+html.body.div.p:29
@@ -1226,7 +1225,6 @@ msgstr "Відповідь нульової довжини"
 #~ msgid "Parent Directory"
 #~ msgstr "Попередня директорія"
 
-#, fuzzy
 msgid ""
 "This request could not be forwarded to the origin server or to any parent "
 "caches. The most likely cause for this error is that the cache "
@@ -1234,9 +1232,9 @@ msgid ""
 "origin servers, and all configured parent caches are currently "
 "unreachable."
 msgstr ""
-"Даний запит не може бути пересланий ні до первинного сервера ні до будь-"
-"якого з батьківських кешів. Найбільш ймовірною причиною є те, що "
-"Ð\90дміністратор кешу заборонив здійснювати прямі з'єднання до первинних "
+"Даний запит не може бути пересланий ні до первинного сервера ні до "
+"будь-якого з батьківських кешів. Найбільш імовірною причиною є те, що "
+"адміністратор кешу заборонив здійснювати прямі з'єднання до первинних "
 "серверів, та всі визначені батьківські кеш-сервера зараз недосяжні."
 
 #~ msgid "While trying to PUT the following URL: <a href=\"%U\">%U</a>"
index ff417e8839b58327aad105f0c3914fdd2393dd0e..32f09a4ca88edd9a1d06160e88edec7641943d11 100644 (file)
@@ -15,8 +15,8 @@
 #include <sys/types.h>
 #include <sys/param.h>
 #include <string.h>
-#include "usersfile.h"
 #include "msntauth.h"
+#include "usersfile.h"
 
 static usersfile AllowUsers;
 static int init = 0;
index ddc995b442414c5e0acd252b00cb7a9d034aa266..c1d7cc00a7fe8d4c51ee0fbaa6379c0d761d827f 100644 (file)
@@ -16,8 +16,8 @@
 #include <sys/types.h>
 #include <sys/param.h>
 #include <string.h>
-#include "usersfile.h"
 #include "msntauth.h"
+#include "usersfile.h"
 
 static usersfile DenyUsers;
 static int init = 0;
index 1890d4eda5eebfb6e71ca1dcd7fd688ce85e92b7..5390d746f458ba47aecf2a7a662e0ad984df4e65 100644 (file)
@@ -23,8 +23,8 @@
 #include <stdio.h>
 #endif
 
-#include "md5.h"
 #include "crypt_md5.h"
+#include "md5.h"
 
 static unsigned char itoa64[] =        /* 0 ... 63 => ascii - 64 */
     "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
index 075eb5b6678b27dbeaeaff6c3f34cf1f48825fb7..01657199aef78c2cb82f9ccccbc55ac40d1e4cb0 100644 (file)
@@ -2,12 +2,25 @@
  * Written By Rabellino Sergio (rabellino@di.unito.it) For Solaris 2.x
  */
 #include "squid.h"
+
+#if HAVE_STDLIB_H
 #include <stdlib.h>
+#endif
+#if HAVE_STDIO_H
 #include <stdio.h>
+#endif
+#if HAVE_STRING_H
 #include <string.h>
+#endif
+#if HAVE_SYSLOG_H
 #include <syslog.h>
+#endif
+#if HAVE_SYS_TYPES_H
 #include <sys/types.h>
+#endif
+#if HAVE_RPC_RPC_H
 #include <rpc/rpc.h>
+#endif
 
 #if _SQUID_FREEBSD_  && !defined(BOOL_DEFINED)
 // BUG: FreeBSD rpcsvc/yp_* headers try to redefine bool unless we match their non-standard hack.
 #endif
 
 #include <rpcsvc/ypclnt.h>
+
+#if HAVE_RPCSVC_YP_PROT_H
 #include <rpcsvc/yp_prot.h>
+#endif
 
 #include "nis_support.h"
 
index 4b66a61a877affcade4e4fccea86852a507f8627..9d046673e63f65856736fabbbc3d28653383d449 100755 (executable)
@@ -1 +1,5 @@
-AC_CHECK_HEADERS([rpcsvc/yp_prot.h],[BUILD_HELPER="NIS"])
+AC_CHECK_HEADERS([sys/types.h rpc/rpc.h rpcsvc/yp_prot.h],[BUILD_HELPER="NIS"],,AC_INCLUDES_DEFAULT([
+#if HAVE_RPC_RPC_H
+#include <rpc/rpc.h>
+#endif
+]))
index 0672a1e644feb11109f7b65b1bd15bc3dc59d78e..4b8f7dac4e648805f057cbd11956f06b96ee96b9 100644 (file)
@@ -48,8 +48,8 @@
 #include "squid.h"
 #include "helpers/defines.h"
 #include "md5.h"
-#include "radius.h"
 #include "radius-util.h"
+#include "radius.h"
 
 #if HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
index 039108e76c2f54bda08a41996e5a7442e3584f98..8834eabd706b369e4ead9295e30f5a099f21dc05 100644 (file)
@@ -36,9 +36,9 @@
 #include <crypt.h>
 #endif
 
-#include "util.h"
 #include "hash.h"
 #include "rfc2617.h"
+#include "util.h"
 
 typedef struct _request_data {
     char *user;
index 6f1bb672e119d9baa48f1c3c6cec7ecff169dcdb..02ac4225c5ad5c6e5c926e35d2644fa7e8730344 100644 (file)
@@ -39,9 +39,9 @@
 #include <crypt.h>
 #endif
 
-#include "util.h"
 #include "hash.h"
 #include "rfc2617.h"
+#include "util.h"
 
 typedef struct _request_data {
     char *user;
index 8867366de44b49248f14212a2dbc7170559bc4e5..08bdb97d44e4650bb16bc48c650a8dbd6cdfae9a 100644 (file)
@@ -31,8 +31,8 @@
  */
 #include "squid.h"
 #include "helpers/defines.h"
-#include "util.h"
 #include "rfc1738.h"
+#include "util.h"
 
 #ifdef HAVE_LDAP
 
index b9ebd25c4f7d9673ae657c947561abf8ffe87735..73e7ec582e9d0edb4d8f82e813c17a689b94e4b9 100644 (file)
@@ -640,11 +640,11 @@ tool_ldap_open(struct main_args * margs, char *host, int port, char *ssl)
     memset(url, 0, sizeof(*url));
 #ifdef HAVE_LDAP_URL_LUD_SCHEME
     if (ssl)
-        url->lud_scheme = (char *) "ldaps";
+        url->lud_scheme = xstrdup("ldaps");
     else
-        url->lud_scheme = (char *) "ldap";
+        url->lud_scheme = xstrdup("ldap");
 #endif
-    url->lud_host = host;
+    url->lud_host = xstrdup(host);
     url->lud_port = port;
 #ifdef HAVE_LDAP_SCOPE_DEFAULT
     url->lud_scope = LDAP_SCOPE_DEFAULT;
@@ -707,9 +707,9 @@ tool_ldap_open(struct main_args * margs, char *host, int port, char *ssl)
             url = (LDAPURLDesc *) xmalloc(sizeof(*url));
             memset(url, 0, sizeof(*url));
 #ifdef HAVE_LDAP_URL_LUD_SCHEME
-            url->lud_scheme = (char *) "ldaps";
+            url->lud_scheme = xstrdup("ldaps");
 #endif
-            url->lud_host = host;
+            url->lud_host = xstrdup(host);
             url->lud_port = port;
 #ifdef HAVE_LDAP_SCOPE_DEFAULT
             url->lud_scope = LDAP_SCOPE_DEFAULT;
index 49ead4ed4cf56df7f219c8d7751b4a5fb2adb925..0743d81ecec122c17a7497a48d6d0f7b61d41705 100644 (file)
@@ -43,8 +43,8 @@
 #include <time.h>
 #endif
 
-#include "util.h"
 #include "base64.h"
+#include "util.h"
 
 #if HAVE_KRB5_H
 #if HAVE_BROKEN_SOLARIS_KRB5_H
index 7668ac0abaac1b313db8bb8a70f005dd3293e175..511e862458950fb18f7f47a51b57d052268b1e5a 100644 (file)
@@ -30,9 +30,9 @@
  * Hosted at http://sourceforge.net/projects/squidkerbauth
  */
 #include "squid.h"
-#include "rfc1738.h"
 #include "compat/getaddrinfo.h"
 #include "compat/getnameinfo.h"
+#include "rfc1738.h"
 
 #if HAVE_GSSAPI
 
index 27901ef5fcec3366baabbed73042492e6d729f17..29382a9cd5bd1bfaf3d00f105589347883f1483d 100644 (file)
@@ -28,9 +28,9 @@
  */
 
 #include "squid.h"
-#include "rfc1738.h"
 #include "compat/getaddrinfo.h"
 #include "compat/getnameinfo.h"
+#include "rfc1738.h"
 
 #include "negotiate_kerberos.h"
 
index c1544cf0165a1435f9a153cbd27a1cfd90dd709c..ffdea6759d65d31454da456bdfb4a7f5df8b3352 100644 (file)
@@ -10,8 +10,8 @@ typedef int64_t snint;
 #endif
 
 #include "snmp.h"
-#include "snmp_impl.h"
 #include "snmp_api.h"
+#include "snmp_impl.h"
 
 /* MIB definitions
  * SQUID-MIB
index d79738bbfda5d1864b718d0d72148c2a65432a8e..e0423156188df456cf7b663b57100af893c32be7 100644 (file)
 #include "snmp_session.h"
 
 /* The various modules */
-#include "snmp_vars.h"
-#include "snmp_pdu.h"
 #include "snmp_msg.h"
+#include "snmp_pdu.h"
+#include "snmp_vars.h"
 
 /* Other functions */
+#include "snmp_api_error.h"
 #include "snmp_coexist.h"
-#include "version.h"
 #include "snmp_error.h"
-#include "snmp_api_error.h"
+#include "version.h"
 /* Other stuff I didn't touch */
-#include "snmp_impl.h"
-#include "snmp_api.h"
-#include "snmp-internal.h"
 #include "parse.h"
+#include "snmp-internal.h"
+#include "snmp_api.h"
 #include "snmp_debug.h"
+#include "snmp_impl.h"
 
 #endif /* SQUID_SNMP_H */
index 5b7d72cc70cbc8fa13af5001ef1833099d1880d9..3398a5dc3323b48f9bde58430abb4b09fe4a900a 100644 (file)
@@ -1,7 +1,7 @@
 include $(top_srcdir)/src/Common.am
 
-DIST_SUBDIRS = ntlmauth profiler rfcnb smblib libTrie
-SUBDIRS=
+DIST_SUBDIRS = ntlmauth profiler rfcnb smblib libTrie snmplib
+SUBDIRS=$(makesnmplib)
 EXTRA_DIST=
 
 if USE_ESI
index 8809f695843ad494c81d5343b7f326a9ab978cfd..c66b1c549d8cee93acfbd0626d4156560c975f81 100644 (file)
@@ -148,7 +148,7 @@ register char *pc;
 int n;
 {
     for (; n--; pc++, a++)
-        *a = e[*pc];
+        *a = e[(int)*pc];
 }
 
 static void
@@ -164,7 +164,7 @@ register char *schl;
 
     for (i = 0; i < 8; i++) {
         for (j = 0, sbval = 0; j < 6; j++)
-            sbval = (sbval << 1) | (nachr_r[*e++] ^ *schl++);
+            sbval = (sbval << 1) | (nachr_r[(int)*e++] ^ *schl++);
         sbval = S_BOX[i][sbval];
         for (tp += 4, j = 4; j--; sbval >>= 1)
             *--tp = sbval & 1;
@@ -173,7 +173,7 @@ register char *schl;
 
     e = PERM;
     for (i = 0; i < BS2; i++)
-        *nachr_l++ ^= tmp[*e++];
+        *nachr_l++ ^= tmp[(int)*e++];
 }
 
 void
index f5e3f399d5071ff79c139713f9128709e7305005..32e39afa6c8dc9cb16afee02366d62add72cd60d 100644 (file)
@@ -22,8 +22,8 @@
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#include "TrieNode.h"
 #include "TrieCharTransform.h"
+#include "TrieNode.h"
 
 #if !_USE_INLINE_
 #include "Trie.cci"
index 60fbf54cf78885b3fc6beb8c4d4694ac135c45f0..a641444697ec3028beef233ade34abee8940667c 100644 (file)
@@ -18,8 +18,8 @@
  */
 
 #include "squid.h"
-#include "TrieNode.h"
 #include "TrieCharTransform.h"
+#include "TrieNode.h"
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
index c5f36e46bb6ea7f5f5a0b01e4933070f8c2141f6..882914eab3ac8579c281d6cd2b9a57079762cb2b 100644 (file)
@@ -18,8 +18,8 @@
  */
 
 #ifdef __cplusplus
-#include "TrieNode.h"
 #include "TrieCharTransform.h"
+#include "TrieNode.h"
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
index 06108bd9e4f0c6a05f8bb3778261b8acf347a703..c586c2343070f8cb1eac89401e3416265f9e053b 100644 (file)
@@ -45,8 +45,8 @@
 
 #include "squid.h"
 #include <string.h>
-#include "rfc2617.h"
 #include "md5.h"
+#include "rfc2617.h"
 
 void
 CvtHex(const HASH Bin, HASHHEX Hex)
index b53a238e3a218a9ef9379a89b516b5f841dc5173..06af87b4b7f6f4877079e689d613885999ef63bc 100644 (file)
@@ -1,6 +1,6 @@
 #include "squid.h"
-#include "rfc2671.h"
 #include "rfc1035.h"
+#include "rfc2671.h"
 
 int
 rfc2671RROptPack(char *buf, size_t sz, ssize_t edns_sz)
index b3d39e028d65c7a569867bac684ca9df2912e283..7d4a2a222632cb2c1a8a3ef7c43c7ba82d22aec8 100644 (file)
@@ -76,8 +76,8 @@
 #include <strings.h>
 #endif
 
-#include "rfc3596.h"
 #include "rfc2671.h"
+#include "rfc3596.h"
 
 #ifndef SQUID_RFC1035_H
 #error RFC3596 Library depends on RFC1035
index 0ae24dee5bff953338d31308b4f1cc1599560a0f..8dbda9d6e82992687f444b82dc805ad4df2efde9 100644 (file)
 #define BOOL int
 typedef short int16;
 
+#if HAVE_NETDB_H
 #include <netdb.h>
+#endif
 #include <sys/types.h>
+#if HAVE_NETINET_IN_H
 #include <netinet/in.h>
+#endif
+#if HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
+#endif
 #include <signal.h>
 #include <errno.h>
 #include <stdio.h>
index 4b7b237a2a6eadb495567b0781b05c316713e279..096db453811d80d076473fb8e4965ad95b9e4563 100644 (file)
@@ -24,8 +24,8 @@
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */
 
-#include "smblib/smblib-priv.h"
 #include "rfcnb/rfcnb.h"
+#include "smblib/smblib-priv.h"
 
 #include <signal.h>
 #if HAVE_STRING_H
index a67de30a28449370b05a8ee45cfd98ca13d12be3..0ce10b67d1bc893cb7fdfbc3f3f8849b9a560bc9 100644 (file)
@@ -24,8 +24,8 @@
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */
 
-#include "smblib/smblib-priv.h"
 #include "rfcnb/rfcnb.h"
+#include "smblib/smblib-priv.h"
 
 #include <signal.h>
 #if HAVE_STRING_H
index 47abdca38344c819eb71f1295e2efb9c27e6f0cd..afd7cf3401f705a894702e43d317108d751380d6 100644 (file)
@@ -24,8 +24,8 @@
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */
 
-#include "smblib/smblib-priv.h"
 #include "rfcnb/rfcnb.h"
+#include "smblib/smblib-priv.h"
 
 #if HAVE_STRING_H
 #include <string.h>
index 2496d867b41570f5eddfc8bfd35ae1c46398af5d..ea628ab749d5f1d91c78afed5a281ad6c89ed94d 100644 (file)
@@ -24,8 +24,8 @@
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */
 
-#include "smblib/smblib-priv.h"
 #include "rfcnb/rfcnb.h"
+#include "smblib/smblib-priv.h"
 
 #if HAVE_STRING_H
 #include <string.h>
index 5640da5efb9c8a4e0b9e204aaa243a049d54cac4..ebb261fa1338ef934ce4700f6c58f60495500457 100644 (file)
@@ -26,8 +26,8 @@
 #ifndef _SMBLIB_PRIV_H_
 #define _SMBLIB_PRIV_H_
 
-#include "smblib/std-defines.h"
 #include "smblib/smblib-common.h"
+#include "smblib/std-defines.h"
 #include <sys/types.h>
 #include <unistd.h>
 
index 893ab7d77c458a62d65b8f0d3db4608390a2e714..ee05a006710dd3fcd5d8e0fbf16290942bba2a69 100644 (file)
@@ -25,9 +25,9 @@
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */
 
-#include "smblib/smblib.h"
-#include "smblib/smblib-priv.h"
 #include "rfcnb/rfcnb.h"
+#include "smblib/smblib-priv.h"
+#include "smblib/smblib.h"
 
 #if HAVE_STRING_H
 #include <string.h>
index 7eade4fc6c6493343a0546199769f41eafdb40f1..3a2fd54158aa1673b24d2bf98e6fd5d5af311bef 100644 (file)
@@ -29,9 +29,9 @@ int SMBlib_errno;
 int SMBlib_SMB_Error;
 #define SMBLIB_ERRNO
 
-#include "smblib/smblib.h"
-#include "smblib/smblib-priv.h"
 #include "rfcnb/rfcnb.h"
+#include "smblib/smblib-priv.h"
+#include "smblib/smblib.h"
 
 #include <signal.h>
 #if HAVE_STRING_H
index aa501f4230680d50ac578a23c11c88f6618edff7..4e6ae003009cf4cb45f9e8ad980de08bed25240d 100644 (file)
@@ -26,9 +26,9 @@
 #ifndef _SMBLIB_SMBLIB_H
 #define _SMBLIB_SMBLIB_H
 
-#include "std-defines.h"
 #include "smblib-common.h"
 #include "smblib/smbencrypt.h"
+#include "std-defines.h"
 
 #ifdef __cplusplus
 extern "C" {
similarity index 100%
rename from snmplib/Makefile.am
rename to lib/snmplib/Makefile.am
similarity index 100%
rename from snmplib/asn1.c
rename to lib/snmplib/asn1.c
similarity index 100%
rename from snmplib/coexistance.c
rename to lib/snmplib/coexistance.c
index dc97168b51c8172031f657d8ddab054ebcfce563..dd8e209b60baab55096e7ef010c81884a08a6f26 100644 (file)
 #include <netdb.h>
 #endif
 
-#include "snmp.h"
 #include "asn1.h"
-#include "snmp_vars.h"
-#include "snmp_pdu.h"
-#include "snmp_error.h"
+#include "snmp.h"
 #include "snmp_api_error.h"
+#include "snmp_error.h"
+#include "snmp_pdu.h"
+#include "snmp_vars.h"
 
 #include "util.h"
 
similarity index 100%
rename from snmplib/mib.c
rename to lib/snmplib/mib.c
index 22dbe1da4fdc3f119f6d97f48f177eed0213278b..707f307f7aa28ef83d8bf7b91013fe3b9559e813 100644 (file)
@@ -74,12 +74,12 @@ SOFTWARE.
 #include "asn1.h"
 #include "snmp.h"
 
+#include "parse.h"
+#include "snmp_api.h"
+#include "snmp_impl.h"
 #include "snmp_pdu.h"
-#include "snmp_vars.h"
 #include "snmp_session.h"
-#include "snmp_impl.h"
-#include "snmp_api.h"
-#include "parse.h"
+#include "snmp_vars.h"
 
 #include "util.h"
 
similarity index 100%
rename from snmplib/parse.c
rename to lib/snmplib/parse.c
similarity index 100%
rename from snmplib/snmp_api.c
rename to lib/snmplib/snmp_api.c
index e587a516149a8dac59b5366a4754066520315026..ba6703d0f73c7b9e68536421ea1dfbef840ed7e3 100644 (file)
 #include "snmp.h"
 
 #include "snmp-internal.h"
+#include "snmp_error.h"
 #include "snmp_impl.h"
+#include "snmp_msg.h"
+#include "snmp_pdu.h"
 #include "snmp_session.h"
-#include "snmp_error.h"
 #include "snmp_vars.h"
-#include "snmp_pdu.h"
-#include "snmp_msg.h"
 
 #include "snmp_api.h"
 #include "snmp_api_error.h"
similarity index 100%
rename from snmplib/snmp_msg.c
rename to lib/snmplib/snmp_msg.c
index 623c81090f537541546ea00f260db489a2dce819..985ad43b015cd6999a8b379d8ff62e79c5366f81 100644 (file)
 #include <netdb.h>
 #endif
 
-#include "snmp.h"
 #include "asn1.h"
-#include "snmp_vars.h"
-#include "snmp_pdu.h"
+#include "snmp.h"
 #include "snmp_msg.h"
+#include "snmp_pdu.h"
+#include "snmp_vars.h"
 
 /*
  * RFC 1901: Introduction to Community-based SNMPv2
similarity index 100%
rename from snmplib/snmp_pdu.c
rename to lib/snmplib/snmp_pdu.c
index d5b4d4fdff26aa3643892a12c581197b7b237d8b..44a4d25715d8ca3fbe951eba873a8e6cde47e509 100644 (file)
 #include <netdb.h>
 #endif
 
-#include "snmp.h"
 #include "asn1.h"
+#include "snmp.h"
+#include "snmp_api_error.h"
 #include "snmp_error.h"
-#include "snmp_vars.h"
-#include "snmp_pdu.h"
 #include "snmp_msg.h"
-#include "snmp_api_error.h"
+#include "snmp_pdu.h"
+#include "snmp_vars.h"
 
 #include "util.h"
 
similarity index 100%
rename from snmplib/snmp_vars.c
rename to lib/snmplib/snmp_vars.c
index 0ace96c1ed829e4aa02384244ac63a605ff99063..a05f14d3735890e0169851a8715a5481efc128bb 100644 (file)
 #include <netdb.h>
 #endif
 
-#include "snmp.h"
 #include "asn1.h"
+#include "snmp.h"
 #include "snmp_vars.h"
 #if 0
 #include "mibii.h"
 #endif
 #include "snmp_api_error.h"
-#include "snmp_pdu.h"
 #include "snmp_msg.h"
+#include "snmp_pdu.h"
 
 #include "util.h"
 
index ed793e0c062826187f3b8ff0b1bc387b1be1dc80..a052247eacfe14819a7517e377ae04c66ffde68b 100755 (executable)
@@ -96,18 +96,18 @@ make_snapshot()
 set +e
 
 # autotool derived files not kept in trunk, but still need to bootstrap for make dist
-../commit/bootstrap squid-3
-make_snapshot ../commit/squid-3/mksnapshot.sh trunk v3 3.HEAD 6
-
-rm -f /server/httpd/htdocs/squid-cache.org/CONTRIBUTORS.new
-cp ../commit/squid-3/CONTRIBUTORS /server/httpd/htdocs/squid-cache.org/CONTRIBUTORS.new
-chmod 444 /server/httpd/htdocs/squid-cache.org/CONTRIBUTORS.new
-mv -f /server/httpd/htdocs/squid-cache.org/CONTRIBUTORS.new /server/httpd/htdocs/squid-cache.org/content/CONTRIBUTORS.txt
-
-rm -f /server/httpd/htdocs/squid-cache.org/SPONSORS.new
-cp ../commit/squid-3/SPONSORS /server/httpd/htdocs/squid-cache.org/SPONSORS.new
-chmod 444 /server/httpd/htdocs/squid-cache.org/SPONSORS.new
-mv -f /server/httpd/htdocs/squid-cache.org/SPONSORS.new /server/httpd/htdocs/squid-cache.org/content/SPONSORS.txt
+#../commit/bootstrap squid-3
+#make_snapshot ../commit/squid-3/mksnapshot.sh trunk v3 3.HEAD 6
+
+#rm -f /server/httpd/htdocs/squid-cache.org/CONTRIBUTORS.new
+#cp ../commit/squid-3/CONTRIBUTORS /server/httpd/htdocs/squid-cache.org/CONTRIBUTORS.new
+#chmod 444 /server/httpd/htdocs/squid-cache.org/CONTRIBUTORS.new
+#mv -f /server/httpd/htdocs/squid-cache.org/CONTRIBUTORS.new /server/httpd/htdocs/squid-cache.org/content/CONTRIBUTORS.txt
+#
+#rm -f /server/httpd/htdocs/squid-cache.org/SPONSORS.new
+#cp ../commit/squid-3/SPONSORS /server/httpd/htdocs/squid-cache.org/SPONSORS.new
+#chmod 444 /server/httpd/htdocs/squid-cache.org/SPONSORS.new
+#mv -f /server/httpd/htdocs/squid-cache.org/SPONSORS.new /server/httpd/htdocs/squid-cache.org/content/SPONSORS.txt
 
 ../commit/bootstrap squid-3.4
 make_snapshot ../commit/squid-3/mksnapshot.sh 3.4 v3 3.4 30
index 4004476265a894cbd4e5097851a9b7f80e91bcb2..0ecb756d986dcd214ef3a3a187e9073edd0b2584 100755 (executable)
@@ -67,6 +67,17 @@ for FILENAME in `ls -1`; do
                fi
        fi
 
+       ${ROOT}/scripts/sort-includes.pl ${FILENAME} >${FILENAME}.sorted
+       if test -e ${FILENAME} -a -e "${FILENAME}.sorted"; then
+               md51=`cat  ${FILENAME}| tr -d "\n \t\r" | $MD5`;
+               md52=`cat  ${FILENAME}.sorted| tr -d "\n \t\r" | $MD5`;
+
+               if test "$md51" != "$md52" ; then
+                       echo "NOTICE: File $PWD/${FILENAME} changed #include order"
+               fi
+               mv ${FILENAME}.sorted ${FILENAME}
+       fi
+
        #
        # REQUIRE squid.h first #include
        #
index 698a41c5b09887baf0c449cc7097c2153c28e82b..73da24e3ea36a1a8ee79f00793c1fe7c415c0c24 100644 (file)
 #include "anyp/PortCfg.h"
 #include "base/RefCount.h"
 #include "comm/Connection.h"
-#include "HttpHeader.h"
+#include "HierarchyLogEntry.h"
 #include "http/ProtocolVersion.h"
+#include "HttpHeader.h"
 #include "HttpRequestMethod.h"
-#include "HierarchyLogEntry.h"
 #include "icp_opcode.h"
 #include "ip/Address.h"
 #include "LogTags.h"
+#include "MessageSizes.h"
 #include "Notes.h"
 #if ICAP_CLIENT
 #include "adaptation/icap/Elements.h"
@@ -84,7 +85,10 @@ public:
 
     public:
         HttpDetails() : method(Http::METHOD_NONE), code(0), content_type(NULL),
-                timedout(false), aborted(false) {}
+                timedout(false),
+                aborted(false),
+                clientRequestSz(),
+                clientReplySz() {}
 
         HttpRequestMethod method;
         int code;
@@ -97,6 +101,17 @@ public:
         const char *statusSfx() const {
             return timedout ? "_TIMEDOUT" : (aborted ? "_ABORTED" : "");
         }
+
+        /// counters for the original request received from client
+        // TODO calculate header and payload better (by parser)
+        // XXX payload encoding overheads not calculated at all yet.
+        MessageSizes clientRequestSz;
+
+        /// counters for the response sent to client
+        // TODO calculate header and payload better (by parser)
+        // XXX payload encoding overheads not calculated at all yet.
+        MessageSizes clientReplySz;
+
     } http;
 
     /** \brief This subclass holds log info for ICP protocol
@@ -144,10 +159,6 @@ public:
 
     public:
         CacheDetails() : caddr(),
-                requestSize(0),
-                replySize(0),
-                requestHeadersSize(0),
-                replyHeadersSize(0),
                 highOffset(0),
                 objectSize(0),
                 code (LOG_TAG_NONE),
@@ -158,17 +169,14 @@ public:
                 ssluser(NULL),
 #endif
                 port(NULL) {
-            ;
+            caddr.setNoAddr();
         }
 
         Ip::Address caddr;
-        int64_t requestSize;
-        int64_t replySize;
-        int requestHeadersSize; ///< received, including request line
-        int replyHeadersSize; ///< sent, including status line
         int64_t highOffset;
         int64_t objectSize;
         LogTags code;
+        struct timeval start_time; ///< The time the master transaction started
         int msec;
         const char *rfc931;
         const char *extuser;
index cd7387497c776da571955ff249931eb2653198d7..548450440f9634f3f082465d3fe5ebd1a71359d0 100644 (file)
@@ -5,6 +5,10 @@
     does not get linked in, because nobody is using these classes by name.
 */
 
+#if USE_ADAPTATION
+#include "acl/AdaptationService.h"
+#include "acl/AdaptationServiceData.h"
+#endif
 #include "acl/AllOf.h"
 #include "acl/AnyOf.h"
 #if USE_SQUID_EUI
@@ -24,8 +28,8 @@
 #endif
 #include "acl/FilledChecklist.h"
 #include "acl/Gadgets.h"
-#include "acl/HierCodeData.h"
 #include "acl/HierCode.h"
+#include "acl/HierCodeData.h"
 #include "acl/HttpHeaderData.h"
 #include "acl/HttpRepHeader.h"
 #include "acl/HttpReqHeader.h"
 #include "acl/LocalIp.h"
 #include "acl/LocalPort.h"
 #include "acl/MaxConnection.h"
-#include "acl/MethodData.h"
 #include "acl/Method.h"
+#include "acl/MethodData.h"
 #include "acl/MyPortName.h"
 #include "acl/Note.h"
 #include "acl/NoteData.h"
 #include "acl/PeerName.h"
-#include "acl/ProtocolData.h"
 #include "acl/Protocol.h"
+#include "acl/ProtocolData.h"
 #include "acl/Random.h"
 #include "acl/Referer.h"
 #include "acl/RegexData.h"
 #include "acl/SourceDomain.h"
 #include "acl/SourceIp.h"
 #if USE_SSL
-#include "acl/SslErrorData.h"
-#include "acl/SslError.h"
-#include "acl/CertificateData.h"
 #include "acl/Certificate.h"
+#include "acl/CertificateData.h"
+#include "acl/SslError.h"
+#include "acl/SslErrorData.h"
 #endif
 #include "acl/Strategised.h"
 #include "acl/Strategy.h"
 #include "acl/ServerCertificate.h"
 #endif
 #include "acl/Tag.h"
-#include "acl/TimeData.h"
 #include "acl/Time.h"
+#include "acl/TimeData.h"
 #include "acl/Url.h"
 #include "acl/UrlLogin.h"
 #include "acl/UrlPath.h"
 #include "acl/UrlPort.h"
 #include "acl/UserData.h"
 #if USE_AUTH
-#include "auth/AclProxyAuth.h"
 #include "auth/AclMaxUserIp.h"
+#include "auth/AclProxyAuth.h"
 #endif
 #if USE_IDENT
 #include "ident/AclIdent.h"
@@ -193,3 +197,8 @@ Acl::AllOf Acl::AllOf::RegistryEntry_;
 
 ACL::Prototype ACLNote::RegistryProtoype(&ACLNote::RegistryEntry_, "note");
 ACLStrategised<HttpRequest *> ACLNote::RegistryEntry_(new ACLNoteData, ACLNoteStrategy::Instance(), "note");
+
+#if USE_ADAPTATION
+ACL::Prototype ACLAdaptationService::RegistryProtoype(&ACLAdaptationService::RegistryEntry_, "adaptation_service");
+ACLStrategised<const char *> ACLAdaptationService::RegistryEntry_(new ACLAdaptationServiceData, ACLAdaptationServiceStrategy::Instance(), "adaptation_service");
+#endif
index 2894c0643ff14ea4dd84f49b4d19de22a3ec71d2..40182054320bbfe7ecea27e6658b46ee10eab091 100644 (file)
@@ -1,9 +1,9 @@
 #ifndef SQUID_BODY_PIPE_H
 #define SQUID_BODY_PIPE_H
 
-#include "MemBuf.h"
 #include "base/AsyncJob.h"
 #include "base/CbcPointer.h"
+#include "MemBuf.h"
 
 class BodyPipe;
 
index db8c5f375c2ec93a3a6996a344b2ac3453bd2578..f9ab4ab92df0b92f54145dfce583f06c77955429 100644 (file)
@@ -1,9 +1,9 @@
 #include "squid.h"
 #include "base/TextException.h"
-#include "Debug.h"
-#include "Parsing.h"
 #include "ChunkedCodingParser.h"
+#include "Debug.h"
 #include "MemBuf.h"
+#include "Parsing.h"
 
 ChunkedCodingParser::Step ChunkedCodingParser::psChunkSize = &ChunkedCodingParser::parseChunkSize;
 ChunkedCodingParser::Step ChunkedCodingParser::psUnusedChunkExtension = &ChunkedCodingParser::parseUnusedChunkExtension;
index 3108e2cf76baf2d36f4eff7cbc2b8bf324878b5d..07f7e902203a2faa6529a7346a993338b2a4ab81 100644 (file)
@@ -1,12 +1,12 @@
 #ifndef SQUID__SRC_CLIENTINFO_H
 #define SQUID__SRC_CLIENTINFO_H
 
-#include "ip/Address.h"
+#include "cbdata.h"
+#include "enums.h"
 #include "hash.h"
+#include "ip/Address.h"
 #include "LogTags.h"
-#include "enums.h"
 #include "typedefs.h"
-#include "cbdata.h"
 #include <deque>
 
 #if USE_DELAY_POOLS
index 5003e78faa4e4b31cbb5b4097c62c5c7012c4667..9ec9f4ff6674d2a801ab4a692995cc400674725d 100644 (file)
@@ -3,8 +3,8 @@
 
 #include "base/AsyncCall.h"
 #include "base/AsyncJobCalls.h"
-#include "comm_err_t.h"
 #include "comm/forward.h"
+#include "comm_err_t.h"
 #include "MasterXaction.h"
 
 /* CommCalls implement AsyncCall interface for comm_* callbacks.
index 7a6cd8701d534cf9e4464f9a076422ed57df8055..210d73919797c0e702e332818988c6858eaa0eaf 100644 (file)
 #ifndef COMMREAD_H
 #define COMMREAD_H
 
+#include "CbDataList.h"
 #include "comm.h"
-#include "CommCalls.h"
 #include "comm/forward.h"
-#include "CbDataList.h"
+#include "CommCalls.h"
 
 class CommRead
 {
index af04d37012aae8d9490f092c15fd55bbdefa94e2..19ff567823295e2135a8abcad56712b4225979a8 100644 (file)
@@ -37,8 +37,8 @@
 #define COMMONPOOL_H
 
 #if USE_DELAY_POOLS
-#include "SquidString.h"
 #include "CompositePoolNode.h"
+#include "SquidString.h"
 
 /*
  \ingroup DelayPoolsAPI
index e064b960bbe122a06c9909791a5cf7e7c259c0eb..af6fafcc93bce6dd0d336a5c23c95a0b01573def 100644 (file)
 #include "squid.h"
 
 #if USE_DELAY_POOLS
-#include "DelayPool.h"
-#include "CommonPool.h"
 #include "acl/Acl.h"
 #include "acl/Gadgets.h"
+#include "CommonPool.h"
+#include "DelayPool.h"
 #include "Store.h"
 
 DelayPool::DelayPool() : pool (NULL), access (NULL)
index 36e1fc04bb39c7bc70caf56e4de3206dae1ad235..8b95b0d194427703cbc508abf1733632210d4d1e 100644 (file)
@@ -38,8 +38,8 @@
 #define DELAYPOOL_H
 
 #if USE_DELAY_POOLS
-#include "CompositePoolNode.h"
 #include "acl/forward.h"
+#include "CompositePoolNode.h"
 
 class StoreEntry;
 
index 342506c28953cdbe1fe58c01833c41e4c7695313..61b6e4c620ef5993ed4ca39d1150f61dc9ec1463 100644 (file)
 #if USE_DELAY_POOLS
 
 #include "auth/Gadgets.h"
+#include "base/Vector.h"
 #include "CompositePoolNode.h"
-#include "DelayIdComposite.h"
 #include "DelayBucket.h"
+#include "DelayIdComposite.h"
 #include "DelaySpec.h"
-#include "base/Vector.h"
 #include "splay.h"
 
 /// \ingroup DelayPoolsAPI
index 885cbbd1981e98470e8b2ef50f9fe74fab030767..6ac274791c2dada93235aef87ebfdf81320e23d7 100644 (file)
 
 #include "auth/Gadgets.h"
 #include "auth/User.h"
+#include "base/Vector.h"
 #include "CompositePoolNode.h"
-#include "DelayIdComposite.h"
 #include "DelayBucket.h"
+#include "DelayIdComposite.h"
 #include "DelaySpec.h"
-#include "base/Vector.h"
 #include "splay.h"
 
 /// \ingroup DelayPoolsAPI
index 05ca6232a4d570341cac745158abd6baf98cc764..67c5e51aa4187785723ecb29884c2b2fd24b3d53 100644 (file)
@@ -2,8 +2,8 @@
  * DEBUG: section 05    Comm
  */
 #include "squid.h"
-#include "globals.h" /* for Squid_MaxFD */
 #include "DescriptorSet.h"
+#include "globals.h" /* for Squid_MaxFD */
 
 // pre-allocates descriptor store and index for Squid_MaxFD descriptors
 DescriptorSet::DescriptorSet(): descriptors_(NULL), index_(NULL),
index 7a4b9df4ab19bbaae158d5a704834a934e6a76ac..b16e4dc0103c5c6d78c6b2b12c405b8f20dc0a8a 100644 (file)
 #include "squid.h"
 #include "AIODiskFile.h"
 #include "AIODiskIOStrategy.h"
+#include "disk.h"
 #include "DiskIO/IORequestor.h"
 #include "DiskIO/ReadRequest.h"
 #include "DiskIO/WriteRequest.h"
-#include "disk.h"
 #include "globals.h"
 
 #if HAVE_ERRNO_H
index 15e052c177f299733704ebc167f903e4ab32f9de..4153645b92defa2bad6a07c38121edfcef7b38b7 100644 (file)
@@ -33,9 +33,9 @@
 
 #if USE_DISKIO_AIO
 
-#include "DiskIO/DiskFile.h"
 #include "async_io.h"
 #include "cbdata.h"
+#include "DiskIO/DiskFile.h"
 #include "SquidString.h"
 
 class AIODiskIOStrategy;
index 4f2b9ab667a70a0f1e8e88a7cf2c29821896ee90..21c4685c22afcce320b22b231bf968714f3442af 100644 (file)
@@ -41,8 +41,8 @@
  */
 
 #include "squid.h"
-#include "AIODiskIOStrategy.h"
 #include "AIODiskFile.h"
+#include "AIODiskIOStrategy.h"
 #include "DiskIO/IORequestor.h"
 #include "DiskIO/ReadRequest.h"
 #include "DiskIO/WriteRequest.h"
index e43717876ef099aab8abde03a41f2d254304c124..9bace9b294ad4c7fe31c1cadbdca162df0cca9a1 100644 (file)
@@ -33,8 +33,8 @@
 
 #if USE_DISKIO_AIO
 
-#include "DiskIO/DiskIOStrategy.h"
 #include "async_io.h"
+#include "DiskIO/DiskIOStrategy.h"
 
 class AIODiskIOStrategy : public DiskIOStrategy
 {
index a7504a28c4dcf1c7b39f83c6d7ff532359a8e8e9..606d2473da3fe8a27b9dc1c32ee12df2fa122eaf 100644 (file)
@@ -32,8 +32,8 @@
  */
 
 #include "squid.h"
-#include "DiskIO/AIO/aio_win32.h"
 #include "comm.h"
+#include "DiskIO/AIO/aio_win32.h"
 #include "fd.h"
 #include "StatCounters.h"
 #include "win32.h"
index d44dde48f18b86bb4ca8f78c375144851e9ea042..06ef4231e5bf6eebc83919afbfe33004d069febe 100644 (file)
 #include "BlockingFile.h"
 #include "Debug.h"
 #include "defines.h"
-#include "globals.h"
+#include "disk.h"
 #include "DiskIO/IORequestor.h"
 #include "DiskIO/ReadRequest.h"
 #include "DiskIO/WriteRequest.h"
-#include "disk.h"
+#include "globals.h"
 
 #if HAVE_ERRNO_H
 #include <errno.h>
index 8bffd4f117bd75f7d7a3b491d4c7a05229059846..eaa52e46342df2b0dc53b871275571d579053e81 100644 (file)
@@ -32,8 +32,8 @@
  */
 
 #include "squid.h"
-#include "BlockingIOStrategy.h"
 #include "BlockingFile.h"
+#include "BlockingIOStrategy.h"
 #include "unlinkd.h"
 
 bool
index 6da6fd0c04b68506020ca0846416a450ce9dc0d1..8ca6230b03f4a7733ded3dd9807b8178485715e2 100644 (file)
@@ -7,8 +7,8 @@
 #define SQUID_DISKD_ACTION_H
 
 #include "ipc/forward.h"
-#include "mgr/forward.h"
 #include "mgr/Action.h"
+#include "mgr/forward.h"
 
 /// store disk daemon stats
 class DiskdActionData
index 4120b37e986c90662865d3fa0542e4deac5ca5a4..b3e5e57bad93dd9e30f9791b780c5d1360dd83e1 100644 (file)
@@ -32,9 +32,9 @@
  */
 
 #include "squid.h"
-#include "DiskdFile.h"
 #include "ConfigOption.h"
 #include "diomsg.h"
+#include "DiskdFile.h"
 #include "DiskdIOStrategy.h"
 #include "DiskIO/IORequestor.h"
 #include "DiskIO/ReadRequest.h"
index 4ef7543e8b671be7f3a32a4f3df34a2df5cfc739..cb1a482a25a45e0fa8e974af522c8819b2d34bd4 100644 (file)
 #include "squid.h"
 #include "comm/Loops.h"
 #include "ConfigOption.h"
+#include "diomsg.h"
+#include "DiskdFile.h"
 #include "DiskdIOStrategy.h"
 #include "DiskIO/DiskFile.h"
-#include "DiskdFile.h"
-#include "diomsg.h"
 #include "fd.h"
-#include "Store.h"
-#include "StatCounters.h"
 #include "SquidConfig.h"
 #include "SquidIpc.h"
 #include "SquidTime.h"
+#include "StatCounters.h"
+#include "Store.h"
 #include "unlinkd.h"
 
 #if HAVE_SYS_IPC_H
index 5c00e1f67d03ac24c84b064309fb2f9a186de989..5febb1a1b53f7f6ef845a80e061b7b105d210e7a 100644 (file)
 #include "dlink.h"
 #include "typedefs.h"
 
+/* this non-standard-conformant include is needed in order to have stat(2) and struct stat
+   properly defined on some systems (e.g. OpenBSD 5.4) */
+#if HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+
 #if AUFS_IO_THREADS
 #define NUMTHREADS AUFS_IO_THREADS
 #else
index bc16d41518ff5d9fc9ae7d77948729a2f2f10780..660391a970f9b9bca0b1d3240ab596536c373b45 100644 (file)
 
 #include "squid.h"
 #include "disk.h"
-#include "DiskThreadsDiskFile.h"
 #include "DiskIO/IORequestor.h"
 #include "DiskIO/ReadRequest.h"
 #include "DiskIO/WriteRequest.h"
+#include "DiskThreadsDiskFile.h"
 #include "fd.h"
 #include "Generic.h"
 #include "globals.h"
index c436e701dd11bd8eb37d5e07f3471348ef5d0b3f..60e17a1db3b80eb8165a31804197bbadab10872c 100644 (file)
 
 #include "squid.h"
 #include "DiskThreads.h"
-#include "Store.h"
-#include "fde.h"
 #include "DiskThreadsIOStrategy.h"
+#include "fde.h"
 #include "Generic.h"
+#include "Store.h"
 
 AIOCounts squidaio_counts;
 
index dba711984eec1b5da5076a4eab8670fcb0f04034..bdee5a3865b59018765701e3f5af4b3ac4f3641c 100644 (file)
@@ -5,11 +5,11 @@
 #include "squid.h"
 #include "base/RunnersRegistry.h"
 #include "base/TextException.h"
+#include "disk.h"
 #include "DiskIO/IORequestor.h"
 #include "DiskIO/IpcIo/IpcIoFile.h"
 #include "DiskIO/ReadRequest.h"
 #include "DiskIO/WriteRequest.h"
-#include "disk.h"
 #include "fd.h"
 #include "globals.h"
 #include "ipc/mem/Pages.h"
index 3d1409ad2b79a874bc43f3f036dbbedba0ff4185..ed84869c2d3ab5e25098870f82dcd4405e26f2e8 100644 (file)
@@ -5,9 +5,9 @@
 #include "cbdata.h"
 #include "DiskIO/DiskFile.h"
 #include "DiskIO/IORequestor.h"
-#include "SquidString.h"
 #include "ipc/forward.h"
 #include "ipc/mem/Page.h"
+#include "SquidString.h"
 #include <list>
 #include <map>
 #include <memory>
index 314c934bdab6b4eadef34933f0980609701601d1..2c067463707b19ecf13b6b049d8728bdf991beeb 100644 (file)
@@ -4,11 +4,11 @@
 
 #include "squid.h"
 #include "Debug.h"
+#include "disk.h"
 #include "DiskIO/IORequestor.h"
 #include "DiskIO/Mmapped/MmappedFile.h"
 #include "DiskIO/ReadRequest.h"
 #include "DiskIO/WriteRequest.h"
-#include "disk.h"
 #include "globals.h"
 
 #if HAVE_SYS_MMAN_H
index 247ada8e23001d145222f7681c672535088881d1..e10be5fcfd9f0069301a3965cf2b98224fd5f618 100644 (file)
 
 #include "squid.h"
 #include "AsyncEngine.h"
+#include "base/AsyncCallQueue.h"
 #include "Debug.h"
 #include "EventLoop.h"
-#include "base/AsyncCallQueue.h"
 #include "SquidTime.h"
 
+EventLoop *EventLoop::Running = NULL;
+
 EventLoop::EventLoop() : errcount(0), last_loop(false), timeService(NULL),
         primaryEngine(NULL),
         loop_delay(EVENT_LOOP_TIMEOUT),
@@ -96,7 +98,12 @@ EventLoop::run()
 {
     prepareToRun();
 
+    assert(!Running);
+    Running = this;
+
     while (!runOnce());
+
+    Running = NULL;
 }
 
 bool
index fe267760652b52ee47e8d4e15414f0c2b305656b..3070051053d42705f0f0be560e74cdfa417c1269 100644 (file)
@@ -89,6 +89,10 @@ public:
 
     int errcount;
 
+    /// the [main program] loop running now; may be nil
+    /// for simplicity, we assume there are no concurrent loops
+    static EventLoop *Running;
+
 private:
     /** setup state variables prior to running */
     void prepareToRun();
index 9925320cdec68a0f274e3ffdc0397856bd2bdf64..a8a459cd079624fc6ae575c6a7ce612e28cf6998 100644 (file)
@@ -49,7 +49,8 @@
 
 CBDATA_CLASS_INIT(ExternalACLEntry);
 
-ExternalACLEntry::ExternalACLEntry()
+ExternalACLEntry::ExternalACLEntry() :
+        notes()
 {
     lru.next = lru.prev = NULL;
     result = ACCESS_DENIED;
@@ -67,6 +68,11 @@ ExternalACLEntry::update(ExternalACLEntryData const &someData)
 {
     date = squid_curtime;
     result = someData.result;
+
+    // replace all notes. not combine
+    notes.entries.clean();
+    notes.append(&someData.notes);
+
 #if USE_AUTH
     user = someData.user;
     password = someData.password;
index 47d713811076e71ed9cdeabb3f9f1f9716e5de0e..8181bdb56d181e8db08751f1240b4224500c2467 100644 (file)
@@ -45,6 +45,7 @@
 #include "acl/Acl.h"
 #include "cbdata.h"
 #include "hash.h"
+#include "Notes.h"
 #include "SquidString.h"
 
 class external_acl;
@@ -62,6 +63,10 @@ public:
     ExternalACLEntryData() : result(ACCESS_DUNNO) {}
 
     allow_t result;
+
+    /// list of all kv-pairs returned by the helper
+    NotePairs notes;
+
 #if USE_AUTH
     // TODO use an AuthUser to hold this info
     String user;
@@ -88,6 +93,10 @@ public:
     dlink_node lru;
     allow_t result;
     time_t date;
+
+    /// list of all kv-pairs returned by the helper
+    NotePairs notes;
+
 #if USE_AUTH
     String user;
     String password;
index b5087bbac01040e6b2b29e6fb7db068cae264408..1dd0576fd31c3c85065cb4aa0c4afcc1b08d4134 100644 (file)
@@ -1,7 +1,7 @@
 #include "squid.h"
 #include "base/TextException.h"
-#include "SquidTime.h"
 #include "FadingCounter.h"
+#include "SquidTime.h"
 
 #if HAVE_MATH_H
 #include <math.h>
index 2936ad20ff818d92b18414cc7851bc328a3c5f4a..05d8e82ca9161bce6991243bc315632078489832 100644 (file)
@@ -36,8 +36,8 @@
 #include "acl/FilledChecklist.h"
 #include "acl/Gadgets.h"
 #include "anyp/PortCfg.h"
-#include "CachePeer.h"
 #include "CacheManager.h"
+#include "CachePeer.h"
 #include "client_side.h"
 #include "comm/Connection.h"
 #include "comm/ConnOpener.h"
 #if USE_SSL
 #include "ssl/cert_validate_message.h"
 #include "ssl/Config.h"
-#include "ssl/helper.h"
-#include "ssl/support.h"
 #include "ssl/ErrorDetail.h"
+#include "ssl/helper.h"
 #include "ssl/ServerBump.h"
+#include "ssl/support.h"
 #endif
 #if HAVE_ERRNO_H
 #include <errno.h>
@@ -163,7 +163,7 @@ void FwdState::start(Pointer aSelf)
 #endif
 
     // do full route options selection
-    peerSelect(&serverDestinations, request, entry, fwdPeerSelectionCompleteWrapper, this);
+    peerSelect(&serverDestinations, request, al, entry, fwdPeerSelectionCompleteWrapper, this);
 }
 
 #if STRICT_ORIGINAL_DST
@@ -713,17 +713,17 @@ FwdState::negotiateSSL(int fd)
                     if (Ssl::CertErrors *errs = static_cast<Ssl::CertErrors*>(SSL_get_ex_data(ssl, ssl_ex_index_ssl_errors)))
                         serverBump->sslErrors = cbdataReference(errs);
                 }
-            }
 
-            // For intercepted connections, set the host name to the server
-            // certificate CN. Otherwise, we just hope that CONNECT is using
-            // a user-entered address (a host name or a user-entered IP).
-            const bool isConnectRequest = !request->clientConnectionManager->port->flags.isIntercepted();
-            if (request->flags.sslPeek && !isConnectRequest) {
-                if (X509 *srvX509 = errDetails->peerCert()) {
-                    if (const char *name = Ssl::CommonHostName(srvX509)) {
-                        request->SetHost(name);
-                        debugs(83, 3, HERE << "reset request host: " << name);
+                // For intercepted connections, set the host name to the server
+                // certificate CN. Otherwise, we just hope that CONNECT is using
+                // a user-entered address (a host name or a user-entered IP).
+                const bool isConnectRequest = !request->clientConnectionManager->port->flags.isIntercepted();
+                if (request->flags.sslPeek && !isConnectRequest) {
+                    if (X509 *srvX509 = errDetails->peerCert()) {
+                        if (const char *name = Ssl::CommonHostName(srvX509)) {
+                            request->SetHost(name);
+                            debugs(83, 3, HERE << "reset request host: " << name);
+                        }
                     }
                 }
             }
@@ -964,7 +964,8 @@ FwdState::initiateSSL()
         // unless it was the CONNECT request with a user-typed address.
         const char *hostname = request->GetHost();
         const bool hostnameIsIp = request->GetHostIsNumeric();
-        const bool isConnectRequest = !request->clientConnectionManager->port->flags.isIntercepted();
+        const bool isConnectRequest = request->clientConnectionManager.valid() &&
+                                      !request->clientConnectionManager->port->flags.isIntercepted();
         if (!request->flags.sslPeek || isConnectRequest)
             SSL_set_ex_data(ssl, ssl_ex_index_server, (void*)hostname);
 
index a1b70f2a2c612319fda80175a8c7a00d9f42fc59..5472b5164be55b238ef942e3aac34a358d34d0b0 100644 (file)
@@ -1,8 +1,8 @@
 #ifndef SQUID_FORWARD_H
 #define SQUID_FORWARD_H
 
-#include "base/Vector.h"
 #include "base/RefCount.h"
+#include "base/Vector.h"
 #include "comm.h"
 #include "comm/Connection.h"
 #include "err_type.h"
index ba46f0411182bf140d46a1aefb6bbb96eb2ffa4b..f8359f84f483c2937550940655ef327a875ee258 100644 (file)
@@ -2,8 +2,8 @@
 #include "cache_cf.h"
 #include "ConfigParser.h"
 #include "Debug.h"
-#include "HelperChildConfig.h"
 #include "globals.h"
+#include "HelperChildConfig.h"
 #include "Parsing.h"
 
 #include <string.h>
index 433a9e0b69664208a601c1d1d93d5d96799db215..80857e539424258ddf44dd45c97d619e1aa5d39a 100644 (file)
@@ -4,11 +4,11 @@
  */
 #include "squid.h"
 #include "ConfigParser.h"
-#include "HelperReply.h"
+#include "Debug.h"
 #include "helper.h"
+#include "HelperReply.h"
 #include "rfc1738.h"
 #include "SquidString.h"
-#include "Debug.h"
 
 HelperReply::HelperReply(char *buf, size_t len) :
         result(HelperReply::Unknown),
index de2614ee3bd83405072da8891adc4944c2e118c1..921eb07c5fb7b87cc4507189f06619bb4b80951b 100644 (file)
@@ -37,8 +37,8 @@
 #include "hier_code.h"
 #include "http/StatusCode.h"
 #include "lookup_t.h"
-#include "rfc2181.h"
 #include "PingData.h"
+#include "rfc2181.h"
 
 class HierarchyLogEntry
 {
index 667329446c90f2d56efed1c7d5128d5637cb0654..fb3fa8e600267f97efd00007887ff8153876033b 100644 (file)
@@ -1,8 +1,8 @@
 #ifndef SQUID_HTTP_CONTROL_MSG_H
 #define SQUID_HTTP_CONTROL_MSG_H
 
-#include "HttpReply.h"
 #include "base/AsyncCall.h"
+#include "HttpReply.h"
 
 class HttpControlMsg;
 
index 9b2afe5a019dab287ef7b534d95e572b4c7b0a9f..b550ce720b8684e3efb3228e983cdf5454d6690d 100644 (file)
  */
 
 #include "squid.h"
-#include "base/StringArea.h"
+#include "HttpHdrCc.h"
 #include "HttpHeader.h"
 #include "HttpHeaderFieldStat.h"
 #include "HttpHeaderStat.h"
 #include "HttpHeaderTools.h"
-#include "HttpHdrCc.h"
+#include "SBuf.h"
 #include "StatHist.h"
 #include "Store.h"
 #include "StrList.h"
@@ -71,7 +71,7 @@ static HttpHeaderCcFields CcAttrs[CC_ENUM_END] = {
 };
 
 /// Map an header name to its type, to expedite parsing
-typedef std::map<const StringArea,http_hdr_cc_type> CcNameToIdMap_t;
+typedef std::map<const SBuf,http_hdr_cc_type> CcNameToIdMap_t;
 static CcNameToIdMap_t CcNameToIdMap;
 
 /// used to walk a table of http_header_cc_type structs
@@ -90,7 +90,7 @@ httpHdrCcInitModule(void)
     for (int32_t i = 0; i < CC_ENUM_END; ++i) {
         const HttpHeaderCcFields &f=CcAttrs[i];
         assert(i == f.id); /* verify assumption: the id is the key into the array */
-        const StringArea k(f.name,strlen(f.name));
+        const SBuf k(f.name);
         CcNameToIdMap[k]=f.id;
     }
 }
@@ -131,7 +131,7 @@ HttpHdrCc::parse(const String & str)
         }
 
         /* find type */
-        const CcNameToIdMap_t::const_iterator i=CcNameToIdMap.find(StringArea(item,nlen));
+        const CcNameToIdMap_t::const_iterator i=CcNameToIdMap.find(SBuf(item,nlen));
         if (i==CcNameToIdMap.end())
             type=CC_OTHER;
         else
index 4256a8bfbb7bb7e2390d37f006a33e302ab64ad5..d50068390e94e3b11cb0dad7ad81091b5691fa0d 100644 (file)
@@ -30,8 +30,8 @@
  *
  */
 
-#include "defines.h"
 #include "Debug.h"
+#include "defines.h"
 
 bool
 HttpHdrCc::isSet(http_hdr_cc_type id) const
index af1cb4a65602a1122b76bde794c1d91aad089c65..7a3904dd159c9c958f239f627383d135b0d90265 100644 (file)
@@ -78,7 +78,7 @@ public:
     void Private(String &v) {
         setMask(CC_PRIVATE,true);
         // uses append for multi-line headers
-        if (private_.defined())
+        if (private_.size() > 0)
             private_.append(",");
         private_.append(v);
     }
@@ -90,7 +90,7 @@ public:
     void noCache(String &v) {
         setMask(CC_NO_CACHE,true);
         // uses append for multi-line headers
-        if (no_cache.defined())
+        if (no_cache.size() > 0)
             no_cache.append(",");
         no_cache.append(v);
     }
index a47fdae4a29a2e5d2d49dcee0d58e330cdfb562d..bea0c7a42c1ba4765deaa918f445a92bbb676122 100644 (file)
  */
 
 #include "squid.h"
-#include "Store.h"
-#include "HttpHeaderRange.h"
 #include "client_side_request.h"
-#include "HttpReply.h"
+#include "HttpHeaderRange.h"
 #include "HttpHeaderTools.h"
+#include "HttpReply.h"
+#include "Store.h"
 #include "StrList.h"
 
 /*
index 52dc243046fe25a9789fda899cca6f5d324d04b2..523fe772fd0bf2e53d98b3a49be5522cadb930bd 100644 (file)
@@ -364,9 +364,9 @@ HttpHdrSc::findTarget(const char *target)
     while (node) {
         HttpHdrScTarget *sct = (HttpHdrScTarget *)node->data;
 
-        if (target && sct->target.defined() && !strcmp (target, sct->target.termedBuf()))
+        if (target && sct->target.size() > 0 && !strcmp(target, sct->target.termedBuf()))
             return sct;
-        else if (!target && sct->target.undefined())
+        else if (!target && sct->target.size() == 0)
             return sct;
 
         node = node->next;
index 25e583d665f9c70ecc586380a19f21b4e1bfd7ae..36b3fafafa1e913040a1f6e04bcacf242af33415 100644 (file)
@@ -30,9 +30,9 @@
 #ifndef SQUID_HTTPHDRSURROGATECONTROLTARGET_H
 #define SQUID_HTTPHDRSURROGATECONTROLTARGET_H
 
-#include "MemPool.h"
 #include "defines.h"
 #include "dlink.h"
+#include "MemPool.h"
 #include "SquidString.h"
 #include "typedefs.h"
 
index 60aeb264722b21bb8ddc37fb0505fc1bd8837a80..c08d01a53897e0fe7020eceed793d25497e941b2 100644 (file)
 #include "mgr/Registration.h"
 #include "profiler/Profiler.h"
 #include "rfc1123.h"
+#include "SquidConfig.h"
+#include "SquidString.h"
 #include "StatHist.h"
 #include "Store.h"
 #include "StrList.h"
-#include "SquidConfig.h"
-#include "SquidString.h"
 #include "TimeOrTag.h"
 
 /*
@@ -549,6 +549,7 @@ HttpHeader::parse(const char *header_start, const char *header_end)
 {
     const char *field_ptr = header_start;
     HttpHeaderEntry *e, *e2;
+    bool warnOnError = (Config.onoff.relaxed_header_parser <= 0 ? DBG_IMPORTANT : 2);
 
     PROF_start(HttpHeaderParse);
 
@@ -560,7 +561,8 @@ HttpHeader::parse(const char *header_start, const char *header_end)
     if ((nulpos = (char*)memchr(header_start, '\0', header_end - header_start))) {
         debugs(55, DBG_IMPORTANT, "WARNING: HTTP header contains NULL characters {" <<
                getStringPrefix(header_start, nulpos) << "}\nNULL\n{" << getStringPrefix(nulpos+1, header_end));
-        goto reset;
+        PROF_stop(HttpHeaderParse);
+        return reset();
     }
 
     /* common format headers are "<name>:[ws]<value>" lines delimited by <CRLF>.
@@ -573,8 +575,11 @@ HttpHeader::parse(const char *header_start, const char *header_end)
             const char *this_line = field_ptr;
             field_ptr = (const char *)memchr(field_ptr, '\n', header_end - field_ptr);
 
-            if (!field_ptr)
-                goto reset;    /* missing <LF> */
+            if (!field_ptr) {
+                // missing <LF>
+                PROF_stop(HttpHeaderParse);
+                return reset();
+            }
 
             field_end = field_ptr;
 
@@ -590,17 +595,18 @@ HttpHeader::parse(const char *header_start, const char *header_end)
                             cr_only = false;
                     }
                     if (cr_only) {
-                        debugs(55, DBG_IMPORTANT, "WARNING: Rejecting HTTP request with a CR+ "
+                        debugs(55, DBG_IMPORTANT, "SECURITY WARNING: Rejecting HTTP request with a CR+ "
                                "header field to prevent request smuggling attacks: {" <<
                                getStringPrefix(header_start, header_end) << "}");
-                        goto reset;
+                        PROF_stop(HttpHeaderParse);
+                        return reset();
                     }
                 }
             }
 
             /* Barf on stray CR characters */
             if (memchr(this_line, '\r', field_end - this_line)) {
-                debugs(55, DBG_IMPORTANT, "WARNING: suspicious CR characters in HTTP header {" <<
+                debugs(55, warnOnError, "WARNING: suspicious CR characters in HTTP header {" <<
                        getStringPrefix(field_start, field_end) << "}");
 
                 if (Config.onoff.relaxed_header_parser) {
@@ -610,49 +616,53 @@ HttpHeader::parse(const char *header_start, const char *header_end)
                         *p = ' ';
                         ++p;
                     }
-                } else
-                    goto reset;
+                } else {
+                    PROF_stop(HttpHeaderParse);
+                    return reset();
+                }
             }
 
             if (this_line + 1 == field_end && this_line > field_start) {
-                debugs(55, DBG_IMPORTANT, "WARNING: Blank continuation line in HTTP header {" <<
+                debugs(55, warnOnError, "WARNING: Blank continuation line in HTTP header {" <<
                        getStringPrefix(header_start, header_end) << "}");
-                goto reset;
+                PROF_stop(HttpHeaderParse);
+                return reset();
             }
         } while (field_ptr < header_end && (*field_ptr == ' ' || *field_ptr == '\t'));
 
         if (field_start == field_end) {
             if (field_ptr < header_end) {
-                debugs(55, DBG_IMPORTANT, "WARNING: unparseable HTTP header field near {" <<
+                debugs(55, warnOnError, "WARNING: unparseable HTTP header field near {" <<
                        getStringPrefix(field_start, header_end) << "}");
-                goto reset;
+                PROF_stop(HttpHeaderParse);
+                return reset();
             }
 
             break;             /* terminating blank line */
         }
 
         if ((e = HttpHeaderEntry::parse(field_start, field_end)) == NULL) {
-            debugs(55, DBG_IMPORTANT, "WARNING: unparseable HTTP header field {" <<
+            debugs(55, warnOnError, "WARNING: unparseable HTTP header field {" <<
                    getStringPrefix(field_start, field_end) << "}");
-            debugs(55, Config.onoff.relaxed_header_parser <= 0 ? 1 : 2,
-                   " in {" << getStringPrefix(header_start, header_end) << "}");
+            debugs(55, warnOnError, " in {" << getStringPrefix(header_start, header_end) << "}");
 
             if (Config.onoff.relaxed_header_parser)
                 continue;
-            else
-                goto reset;
+
+            PROF_stop(HttpHeaderParse);
+            return reset();
         }
 
         if (e->id == HDR_CONTENT_LENGTH && (e2 = findEntry(e->id)) != NULL) {
-//            if (e->value.cmp(e2->value.termedBuf()) != 0) {
             if (e->value != e2->value) {
                 int64_t l1, l2;
-                debugs(55, Config.onoff.relaxed_header_parser <= 0 ? 1 : 2,
-                       "WARNING: found two conflicting content-length headers in {" << getStringPrefix(header_start, header_end) << "}");
+                debugs(55, warnOnError, "WARNING: found two conflicting content-length headers in {" <<
+                       getStringPrefix(header_start, header_end) << "}");
 
                 if (!Config.onoff.relaxed_header_parser) {
                     delete e;
-                    goto reset;
+                    PROF_stop(HttpHeaderParse);
+                    return reset();
                 }
 
                 if (!httpHeaderParseOffset(e->value.termedBuf(), &l1)) {
@@ -669,27 +679,25 @@ HttpHeader::parse(const char *header_start, const char *header_end)
                     continue;
                 }
             } else {
-                debugs(55, Config.onoff.relaxed_header_parser <= 0 ? 1 : 2,
-                       "NOTICE: found double content-length header");
+                debugs(55, warnOnError, "NOTICE: found double content-length header");
+                delete e;
 
-                if (Config.onoff.relaxed_header_parser) {
-                    delete e;
+                if (Config.onoff.relaxed_header_parser)
                     continue;
-                } else {
-                    delete e;
-                    goto reset;
-                }
+
+                PROF_stop(HttpHeaderParse);
+                return reset();
             }
         }
 
         if (e->id == HDR_OTHER && stringHasWhitespace(e->name.termedBuf())) {
-            debugs(55, Config.onoff.relaxed_header_parser <= 0 ? 1 : 2,
-                   "WARNING: found whitespace in HTTP header name {" <<
+            debugs(55, warnOnError, "WARNING: found whitespace in HTTP header name {" <<
                    getStringPrefix(field_start, field_end) << "}");
 
             if (!Config.onoff.relaxed_header_parser) {
                 delete e;
-                goto reset;
+                PROF_stop(HttpHeaderParse);
+                return reset();
             }
         }
 
@@ -703,9 +711,6 @@ HttpHeader::parse(const char *header_start, const char *header_end)
 
     PROF_stop(HttpHeaderParse);
     return 1;                  /* even if no fields where found, it is a valid header */
-reset:
-    PROF_stop(HttpHeaderParse);
-    return reset();
 }
 
 /* packs all the entries using supplied packer */
index 1b1900799011e043e0c66c4feb3982b1db10c7e4..f5a37a7488b076abc429aff2506e9740d733ad32 100644 (file)
@@ -29,8 +29,8 @@
  *
  */
 
-#include "SquidString.h"
 #include "HttpHeaderFieldStat.h"
+#include "SquidString.h"
 
 /// compiled version of HttpHeaderFieldAttrs plus stats. Currently a POD.
 class HttpHeaderFieldInfo
index 588f1c6902ef2ef76a44bd83908b6bde96e04901..0f6a2646073f365f9745e6dec69b5829db49c1a4 100644 (file)
  */
 
 #include "squid.h"
-#include "globals.h"
 #include "acl/FilledChecklist.h"
 #include "acl/Gadgets.h"
-#include "client_side_request.h"
 #include "client_side.h"
+#include "client_side_request.h"
 #include "comm/Connection.h"
 #include "compat/strtoll.h"
 #include "ConfigParser.h"
 #include "fde.h"
+#include "globals.h"
 #include "HttpHdrContRange.h"
 #include "HttpHeader.h"
 #include "HttpHeaderFieldInfo.h"
@@ -294,7 +294,7 @@ httpHeaderParseQuotedString(const char *start, const int len, String *val)
         return 0;
     }
     /* Make sure it's defined even if empty "" */
-    if (!val->defined())
+    if (!val->termedBuf())
         val->limitInit("", 0);
     return 1;
 }
index 829cd778c101cbfb5f8491fa554c5ab5919fab04..f20ba6838f382eb6661198ed380759eeae95830e 100644 (file)
 
 #include "base/Lock.h"
 #include "BodyPipe.h"
+#include "http/ProtocolVersion.h"
+#include "http/StatusCode.h"
 #include "HttpHeader.h"
 #include "HttpRequestMethod.h"
-#include "http/StatusCode.h"
-#include "http/ProtocolVersion.h"
 
 /// common parts of HttpRequest and HttpReply
 class HttpMsg : public RefCountable
index fffa869c60bd8d5fae8069f36f9dea00f0256fe7..a7df80b8a9ac5ef8c8d88fb56e610cf4686edd78 100644 (file)
@@ -270,7 +270,7 @@ HttpReply::validatorsMatch(HttpReply const * otherRep) const
 
     two = otherRep->header.getStrOrList(HDR_ETAG);
 
-    if (one.undefined() || two.undefined() || one.caseCmp(two)!=0 ) {
+    if (one.size()==0 || two.size()==0 || one.caseCmp(two)!=0 ) {
         one.clean();
         two.clean();
         return 0;
@@ -284,7 +284,7 @@ HttpReply::validatorsMatch(HttpReply const * otherRep) const
 
     two = otherRep->header.getStrOrList(HDR_CONTENT_MD5);
 
-    if (one.undefined() || two.undefined() || one.caseCmp(two) != 0 ) {
+    if (one.size()==0 || two.size()==0 || one.caseCmp(two)!=0 ) {
         one.clean();
         two.clean();
         return 0;
index c7f3f3e3641039855929a6008c4a0a3f3ffea64b..93758fc1341708d912f75917fc2179e0d23ae3df 100644 (file)
 #ifndef SQUID_HTTPREPLY_H
 #define SQUID_HTTPREPLY_H
 
+#include "http/StatusLine.h"
 #include "HttpBody.h"
 #include "HttpMsg.h"
 #include "HttpRequest.h"
-#include "http/StatusLine.h"
 
 void httpReplyInitModule(void);
 
index 59629f44e9b735d2a87b7abf38bad7ce2ac7154f..32b8a3fc5752c4d11c7a0af1216e2849ff16b566 100644 (file)
--- a/src/ICP.h
+++ b/src/ICP.h
@@ -39,8 +39,8 @@
 #include "comm/forward.h"
 #include "icp_opcode.h"
 #include "ip/Address.h"
-#include "StoreClient.h"
 #include "LogTags.h"
+#include "StoreClient.h"
 
 class HttpRequest;
 
index 62fad1d2090e342fb9fbf6e44be9ce63cbc4d9ee..60eb820b2ad4e36b907343ba8fe1d1b85cef8e4f 100644 (file)
@@ -39,8 +39,8 @@
 #if USE_LEAKFINDER
 
 #include "LeakFinder.h"
-#include "Store.h"
 #include "SquidTime.h"
+#include "Store.h"
 
 /* ========================================================================= */
 
index fee975dd546b81c9105b006dead722eb3ff60ac2..02e75b423feaf5f2ca454e8b6a79dad3650b2fcb 100644 (file)
@@ -24,6 +24,21 @@ SBUF_SOURCE= \
        SBufExceptions.h \
        SBufExceptions.cc
 
+STOREMETA_SOURCE = \
+       StoreMeta.cc \
+       StoreMeta.h \
+       StoreMetaMD5.cc \
+       StoreMetaMD5.h \
+       StoreMetaSTD.cc \
+       StoreMetaSTD.h \
+       StoreMetaSTDLFS.cc \
+       StoreMetaSTDLFS.h \
+       StoreMetaObjSize.h \
+       StoreMetaURL.cc \
+       StoreMetaURL.h \
+       StoreMetaVary.cc \
+       StoreMetaVary.h
+
 LOADABLE_MODULES_SOURCES = \
        LoadableModule.h \
        LoadableModule.cc \
@@ -427,6 +442,7 @@ squid_SOURCES = \
        MemBuf.cc \
        MemObject.cc \
        MemObject.h \
+       MessageSizes.h \
        mime.h \
        mime.cc \
        mime_header.h \
@@ -435,8 +451,8 @@ squid_SOURCES = \
        multicast.cc \
        neighbors.h \
        neighbors.cc \
-       Notes.cc \
        Notes.h \
+       Notes.cc \
        Packer.cc \
        Packer.h \
        Parsing.cc \
@@ -465,6 +481,8 @@ squid_SOURCES = \
        send-announce.h \
        send-announce.cc \
        $(SBUF_SOURCE) \
+       SBufDetailedStats.h \
+       SBufDetailedStats.cc \
        SBufStatsAction.h \
        SBufStatsAction.cc \
        $(SNMP_SOURCE) \
@@ -508,21 +526,9 @@ squid_SOURCES = \
        store_swapin.cc \
        store_swapmeta.cc \
        store_swapout.cc \
-       StoreMeta.cc \
-       StoreMeta.h \
-       StoreMetaMD5.cc \
-       StoreMetaMD5.h \
-       StoreMetaSTD.cc \
-       StoreMetaSTD.h \
-       StoreMetaSTDLFS.cc \
-       StoreMetaSTDLFS.h \
-       StoreMetaObjSize.h \
        StoreMetaUnpacker.cc \
        StoreMetaUnpacker.h \
-       StoreMetaURL.cc \
-       StoreMetaURL.h \
-       StoreMetaVary.cc \
-       StoreMetaVary.h \
+       $(STOREMETA_SOURCE) \
        StoreSearch.h \
        StoreStats.cc \
        StoreStats.h \
@@ -724,16 +730,11 @@ ufsdump_SOURCES = \
        Parsing.h \
        store_key_md5.h \
        store_key_md5.cc \
-       StoreMeta.cc \
-       StoreMetaMD5.cc \
-       StoreMetaSTD.cc \
-       StoreMetaSTDLFS.cc \
+       tests/stub_StoreMeta.cc \
        StoreMetaUnpacker.cc \
-       StoreMetaURL.cc \
-       StoreMetaVary.cc \
        String.cc \
        SquidNew.cc \
-       time.cc \
+       tests/stub_time.cc \
        ufsdump.cc \
        dlink.h \
        dlink.cc \
@@ -745,12 +746,10 @@ ufsdump_SOURCES = \
        fd.h \
        tests/stub_fd.cc
 ufsdump_LDADD = \
-       $(AUTH_ACL_LIBS) \
        ident/libident.la \
        acl/libacls.la \
        eui/libeui.la \
        acl/libstate.la \
-       $(AUTH_LIBS) \
        acl/libapi.la \
        base/libbase.la \
        libsquid.la \
@@ -768,12 +767,10 @@ ufsdump_LDADD = \
        $(MINGW_LIBS) \
        $(XTRA_LIBS)
 ufsdump_DEPENDENCIES = \
-       $(AUTH_ACL_LIBS) \
        ident/libident.la \
        acl/libacls.la \
        eui/libeui.la \
        acl/libstate.la \
-       $(AUTH_LIBS) \
        acl/libapi.la \
        base/libbase.la \
        libsquid.la \
@@ -926,7 +923,7 @@ DEFAULT_ERROR_DIR   = $(datadir)/errors
 # Make location configure settings available to the code
 DEFS += -DDEFAULT_CONFIG_FILE=\"$(DEFAULT_CONFIG_FILE)\" -DDEFAULT_SQUID_DATA_DIR=\"$(datadir)\" -DDEFAULT_SQUID_CONFIG_DIR=\"$(sysconfdir)\"
 
-snmp_core.o snmp_agent.o: ../snmplib/libsnmplib.a $(top_srcdir)/include/cache_snmp.h
+snmp_core.o snmp_agent.o: ../lib/snmplib/libsnmplib.a $(top_srcdir)/include/cache_snmp.h
 
 globals.cc: globals.h mk-globals-c.awk
        $(AWK) -f $(srcdir)/mk-globals-c.awk < $(srcdir)/globals.h > $@ || ($(RM) -f $@ && exit 1)
@@ -1079,8 +1076,14 @@ check_PROGRAMS+=\
        tests/testSBuf \
        tests/testConfigParser \
        tests/testStatHist \
-       tests/testVector \
-       $(STORE_TESTS)
+       tests/testVector
+
+if HAVE_FS_ROCK
+check_PROGRAMS += tests/testRock
+endif
+if HAVE_FS_UFS
+check_PROGRAMS += tests/testUfs
+endif
 
 ## NP: required to run the above list. check_PROGRAMS only builds the binaries...
 TESTS += $(check_PROGRAMS)
@@ -1113,7 +1116,7 @@ tests_testHttpReply_SOURCES=\
        cbdata.cc \
        cbdata.h \
        ConfigParser.cc \
-       ETag.cc \
+       tests/stub_ETag.cc \
        fatal.h \
        tests/stub_fatal.cc \
        HttpBody.h \
@@ -1141,17 +1144,22 @@ tests_testHttpReply_SOURCES=\
        HttpReply.cc \
        HttpReply.h \
        Mem.h \
-       mem.cc \
+       tests/stub_mem.cc \
        RegexList.h \
        RegexList.cc \
        MemBuf.cc \
        MemBuf.h \
        mime_header.h \
        mime_header.cc \
+       Notes.h \
+       Notes.cc \
        Packer.cc \
        Packer.h \
        SquidString.h \
        SquidTime.h \
+       $(SBUF_SOURCE) \
+       SBufDetailedStats.h \
+       tests/stub_SBufDetailedStats.cc \
        String.cc \
        StrList.h \
        StrList.cc \
@@ -1165,6 +1173,7 @@ tests_testHttpReply_SOURCES=\
        tests/stub_errorpage.cc \
        tests/stub_HelperChildConfig.cc \
        tests/stub_libformat.cc \
+       tests/stub_libauth.cc \
        StatCounters.h \
        StatCounters.cc \
        StatHist.h \
@@ -1178,7 +1187,7 @@ tests_testHttpReply_SOURCES=\
        tests/testHttpReply.cc \
        tests/testHttpReply.h \
        tests/testMain.cc \
-       time.cc \
+       tests/stub_time.cc \
        url.cc \
        URLScheme.cc \
        wordlist.h \
@@ -1191,7 +1200,6 @@ tests_testHttpReply_LDADD=\
        acl/libacls.la \
        acl/libapi.la \
        acl/libstate.la \
-       $(AUTH_LIBS) \
        anyp/libanyp.la \
        ip/libip.la \
        base/libbase.la \
@@ -1213,7 +1221,7 @@ tests_testACLMaxUserIP_SOURCES= \
        ConfigParser.cc \
        DiskIO/ReadRequest.cc \
        DiskIO/WriteRequest.cc \
-       ETag.cc \
+       tests/stub_ETag.cc \
        event.cc \
        fatal.h \
        tests/stub_fatal.cc \
@@ -1241,6 +1249,8 @@ tests_testACLMaxUserIP_SOURCES= \
        int.cc \
        MasterXaction.cc \
        MasterXaction.h \
+       Notes.cc \
+       Notes.h \
        SquidList.h \
        SquidList.cc \
        mem_node.cc \
@@ -1254,22 +1264,20 @@ tests_testACLMaxUserIP_SOURCES= \
        StrList.cc \
        tests/stub_StatHist.cc \
        stmem.cc \
+       $(SBUF_SOURCE) \
+       SBufDetailedStats.h \
+       tests/stub_SBufDetailedStats.cc \
        String.cc \
        store_dir.cc \
        StoreIOState.cc \
-       StoreMeta.cc \
-       StoreMetaMD5.cc \
-       StoreMetaSTD.cc \
-       StoreMetaSTDLFS.cc \
+       tests/stub_StoreMeta.cc \
        StoreMetaUnpacker.cc \
-       StoreMetaURL.cc \
-       StoreMetaVary.cc \
        StoreSwapLogData.cc \
        store_key_md5.h \
        store_key_md5.cc \
        swap_log_op.cc \
        swap_log_op.h \
-       SwapDir.cc \
+       tests/stub_SwapDir.cc \
        SwapDir.h \
        log/access_log.h \
        tests/stub_access_log.cc \
@@ -1286,6 +1294,7 @@ tests_testACLMaxUserIP_SOURCES= \
        tests/stub_HttpRequest.cc \
        tests/stub_HttpReply.cc \
        tests/stub_ipc_TypedMsgHdr.cc \
+       tests/stub_libauth.cc \
        tests/stub_libcomm.cc \
        tests/stub_libformat.cc \
        tests/stub_libsslsquid.cc \
@@ -1308,13 +1317,13 @@ tests_testACLMaxUserIP_SOURCES= \
        tests/testACLMaxUserIP.cc \
        tests/testACLMaxUserIP.h \
        tests/testMain.cc \
-       time.cc \
+       tests/stub_time.cc \
        url.cc \
        URL.h \
        URLScheme.cc \
        URLScheme.h \
        Mem.h \
-       mem.cc \
+       tests/stub_mem.cc \
        MemBuf.cc \
        wordlist.h \
        wordlist.cc
@@ -1327,7 +1336,6 @@ tests_testACLMaxUserIP_LDADD= \
        acl/libacls.la \
        eui/libeui.la \
        acl/libstate.la \
-       $(AUTH_LIBS) \
        acl/libapi.la \
        anyp/libanyp.la \
        base/libbase.la \
@@ -1354,7 +1362,7 @@ tests_testBoilerplate_SOURCES = \
        tests/testBoilerplate.cc \
        tests/testMain.cc \
        tests/testBoilerplate.h \
-       time.cc
+       tests/stub_time.cc
 nodist_tests_testBoilerplate_SOURCES = \
        $(TESTSOURCES)
 tests_testBoilerplate_LDADD= \
@@ -1369,7 +1377,6 @@ tests_testBoilerplate_DEPENDENCIES = \
 ## Tests of the CacheManager module.
 tests_testCacheManager_SOURCES = \
        AccessLogEntry.cc \
-       $(ACL_REGISTRATION_SOURCES) \
        debug.cc \
        HttpParser.cc \
        HttpParser.h \
@@ -1378,7 +1385,7 @@ tests_testCacheManager_SOURCES = \
        HttpRequest.cc \
        HttpRequestMethod.cc \
        Mem.h \
-       mem.cc \
+       tests/stub_mem.cc \
        String.cc \
        tests/testCacheManager.cc \
        tests/testCacheManager.h \
@@ -1386,6 +1393,7 @@ tests_testCacheManager_SOURCES = \
        tests/stub_main_cc.cc \
        tests/stub_ipc_Forwarder.cc \
        tests/stub_store_stats.cc \
+       tests/stub_EventLoop.cc \
        time.cc \
        BodyPipe.cc \
        cache_manager.cc \
@@ -1396,9 +1404,9 @@ tests_testCacheManager_SOURCES = \
        RefreshPattern.h \
        cache_cf.cc \
        CacheDigest.h \
-       CacheDigest.cc \
+       tests/stub_CacheDigest.cc \
        carp.h \
-       carp.cc \
+       tests/stub_carp.cc \
        cbdata.cc \
        ChunkedCodingParser.cc \
        client_db.h \
@@ -1423,7 +1431,7 @@ tests_testCacheManager_SOURCES = \
        dlink.cc \
        $(DNSSOURCE) \
        errorpage.cc \
-       ETag.cc \
+       tests/stub_ETag.cc \
        event.cc \
        external_acl.cc \
        ExternalACLEntry.cc \
@@ -1483,7 +1491,6 @@ tests_testCacheManager_SOURCES = \
        multicast.h \
        multicast.cc \
        mem_node.cc \
-       MemBlob.cc \
        MemBuf.cc \
        MemObject.cc \
        mime.h \
@@ -1506,11 +1513,14 @@ tests_testCacheManager_SOURCES = \
        peer_userhash.h \
        peer_userhash.cc \
        redirect.h \
-       redirect.cc \
+       tests/stub_redirect.cc \
        refresh.h \
        refresh.cc \
        RemovalPolicy.cc \
        Server.cc \
+       $(SBUF_SOURCE) \
+       SBufDetailedStats.h \
+       tests/stub_SBufDetailedStats.cc \
        $(SNMP_SOURCE) \
        SquidMath.h \
        SquidMath.cc \
@@ -1522,13 +1532,15 @@ tests_testCacheManager_SOURCES = \
        StatHist.h \
        StrList.h \
        StrList.cc \
+       tests/stub_libauth_acls.cc \
+       tests/stub_libauth.cc \
        tests/stub_StatHist.cc \
        stmem.cc \
        repl_modules.h \
        store.cc \
        store_client.cc \
        store_digest.h \
-       store_digest.cc \
+       tests/stub_store_digest.cc \
        store_dir.cc \
        store_io.cc \
        store_key_md5.h \
@@ -1543,18 +1555,13 @@ tests_testCacheManager_SOURCES = \
        store_swapout.cc \
        StoreFileSystem.cc \
        StoreIOState.cc \
-       StoreMeta.cc \
-       StoreMetaMD5.cc \
-       StoreMetaSTD.cc \
-       StoreMetaSTDLFS.cc \
+       tests/stub_StoreMeta.cc \
        StoreMetaUnpacker.cc \
-       StoreMetaURL.cc \
-       StoreMetaVary.cc \
        StoreSwapLogData.cc \
        tools.h \
        tools.cc \
-       tunnel.cc \
-       SwapDir.cc \
+       tests/stub_tunnel.cc \
+       tests/stub_SwapDir.cc \
        MemStore.cc \
        $(UNLINKDSOURCE) \
        url.cc \
@@ -1562,9 +1569,9 @@ tests_testCacheManager_SOURCES = \
        urn.h \
        urn.cc \
        wccp2.h \
-       wccp2.cc \
+       tests/stub_wccp2.cc \
        whois.h \
-       whois.cc \
+       tests/stub_whois.cc \
        FadingCounter.cc \
        $(WIN32_SOURCE) \
        wordlist.h \
@@ -1575,11 +1582,9 @@ nodist_tests_testCacheManager_SOURCES = \
 # comm.cc only requires comm/libcomm.la until fdc_table is dead.
 tests_testCacheManager_LDADD = \
        http/libsquid-http.la \
-       $(AUTH_ACL_LIBS) \
        ident/libident.la \
        acl/libacls.la \
        acl/libstate.la \
-       $(AUTH_LIBS) \
        acl/libapi.la \
        base/libbase.la \
        libsquid.la \
@@ -1617,7 +1622,7 @@ tests_testCacheManager_DEPENDENCIES = \
 
 tests_testDiskIO_SOURCES = \
        CacheDigest.h \
-       CacheDigest.cc \
+       tests/stub_CacheDigest.cc \
        cbdata.cc \
        client_db.h \
        ClientInfo.h \
@@ -1627,7 +1632,7 @@ tests_testDiskIO_SOURCES = \
        $(DISKIO_SOURCE) \
        disk.h \
        disk.cc \
-       ETag.cc \
+       tests/stub_ETag.cc \
        EventLoop.cc \
        event.cc \
        fatal.h \
@@ -1666,7 +1671,9 @@ tests_testDiskIO_SOURCES = \
        MemObject.cc \
        mem_node.cc \
        Mem.h \
-       mem.cc \
+       tests/stub_mem.cc \
+       Notes.h \
+       Notes.cc \
        Packer.cc \
        Parsing.cc \
        refresh.h \
@@ -1679,15 +1686,13 @@ tests_testDiskIO_SOURCES = \
        StatHist.h \
        tests/stub_StatHist.cc \
        stmem.cc \
+       $(SBUF_SOURCE) \
+       SBufDetailedStats.h \
+       tests/stub_SBufDetailedStats.cc \
        StoreFileSystem.cc \
        StoreIOState.cc \
-       StoreMeta.cc \
-       StoreMetaMD5.cc \
-       StoreMetaSTD.cc \
-       StoreMetaSTDLFS.cc \
+       tests/stub_StoreMeta.cc \
        StoreMetaUnpacker.cc \
-       StoreMetaURL.cc \
-       StoreMetaVary.cc \
        StoreSwapLogData.cc \
        store_dir.cc \
        store_io.cc \
@@ -1700,7 +1705,7 @@ tests_testDiskIO_SOURCES = \
        String.cc \
        StrList.h \
        StrList.cc \
-       SwapDir.cc \
+       tests/stub_SwapDir.cc \
        log/access_log.h \
        tests/stub_access_log.cc \
        tests/stub_acl.cc \
@@ -1722,6 +1727,8 @@ tests_testDiskIO_SOURCES = \
        tests/stub_internal.cc \
        tests/stub_ipc.cc \
        tests/stub_ipcache.cc \
+       tests/stub_libauth_acls.cc \
+       tests/stub_libauth.cc \
        tests/stub_libeui.cc \
        tests/stub_libformat.cc \
        tests/stub_libicmp.cc \
@@ -1740,7 +1747,7 @@ tests_testDiskIO_SOURCES = \
        tests/testMain.cc \
        tests/testStoreSupport.cc \
        tests/testStoreSupport.h \
-       time.cc \
+       tests/stub_time.cc \
        $(UNLINKDSOURCE) \
        url.cc \
        URLScheme.cc \
@@ -1760,11 +1767,9 @@ tests_testDiskIO_LDADD = \
        SquidConfig.o \
        CommCalls.o \
        DnsLookupDetails.o \
-       $(AUTH_ACL_LIBS) \
        ident/libident.la \
        acl/libacls.la \
        acl/libstate.la \
-       $(AUTH_LIBS) \
        libsquid.la \
        comm/libcomm.la \
        anyp/libanyp.la \
@@ -1797,10 +1802,9 @@ tests_testDiskIO_DEPENDENCIES = \
 ## Tests of the Even module.
 tests_testEvent_SOURCES = \
        AccessLogEntry.cc \
-       $(ACL_REGISTRATION_SOURCES) \
        BodyPipe.cc \
        CacheDigest.h \
-       CacheDigest.cc \
+       tests/stub_CacheDigest.cc \
        cache_cf.h \
        AuthReg.h \
        YesNoNone.h \
@@ -1809,7 +1813,7 @@ tests_testEvent_SOURCES = \
        cache_cf.cc \
        cache_manager.cc \
        carp.h \
-       carp.cc \
+       tests/stub_carp.cc \
        cbdata.cc \
        ChunkedCodingParser.cc \
        client_db.h \
@@ -1835,7 +1839,7 @@ tests_testEvent_SOURCES = \
        dlink.cc \
        $(DNSSOURCE) \
        errorpage.cc \
-       ETag.cc \
+       tests/stub_ETag.cc \
        event.cc \
        EventLoop.h \
        EventLoop.cc \
@@ -1901,9 +1905,8 @@ tests_testEvent_SOURCES = \
        MasterXaction.cc \
        MasterXaction.h \
        Mem.h \
-       mem.cc \
+       tests/stub_mem.cc \
        mem_node.cc \
-       MemBlob.cc \
        MemBuf.cc \
        MemObject.cc \
        mime.h \
@@ -1928,13 +1931,16 @@ tests_testEvent_SOURCES = \
        peer_userhash.h \
        peer_userhash.cc \
        redirect.h \
-       redirect.cc \
+       tests/stub_redirect.cc \
        refresh.h \
        refresh.cc \
        RemovalPolicy.cc \
        Server.cc \
        StrList.h \
        StrList.cc \
+       $(SBUF_SOURCE) \
+       SBufDetailedStats.h \
+       tests/stub_SBufDetailedStats.cc \
        $(SNMP_SOURCE) \
        SquidMath.cc \
        SquidMath.h \
@@ -1950,7 +1956,7 @@ tests_testEvent_SOURCES = \
        store.cc \
        store_client.cc \
        store_digest.h \
-       store_digest.cc \
+       tests/stub_store_digest.cc \
        store_dir.cc \
        store_io.cc \
        store_key_md5.h \
@@ -1965,28 +1971,25 @@ tests_testEvent_SOURCES = \
        store_swapout.cc \
        StoreFileSystem.cc \
        StoreIOState.cc \
-       StoreMeta.cc \
-       StoreMetaMD5.cc \
-       StoreMetaSTD.cc \
-       StoreMetaSTDLFS.cc \
+       tests/stub_StoreMeta.cc \
        StoreMetaUnpacker.cc \
-       StoreMetaURL.cc \
-       StoreMetaVary.cc \
        StoreSwapLogData.cc \
        String.cc \
-       SwapDir.cc \
+       tests/stub_SwapDir.cc \
        tests/CapturingStoreEntry.h \
        tests/testEvent.cc \
        tests/testEvent.h \
        tests/testMain.cc \
        tests/stub_main_cc.cc \
        tests/stub_ipc_Forwarder.cc \
+       tests/stub_libauth_acls.cc \
+       tests/stub_libauth.cc \
        tests/stub_libeui.cc \
        tests/stub_store_stats.cc \
        time.cc \
        tools.h \
        tools.cc \
-       tunnel.cc \
+       tests/stub_tunnel.cc \
        MemStore.cc \
        $(UNLINKDSOURCE) \
        url.cc \
@@ -1994,9 +1997,9 @@ tests_testEvent_SOURCES = \
        urn.h \
        urn.cc \
        wccp2.h \
-       wccp2.cc \
+       tests/stub_wccp2.cc \
        whois.h \
-       whois.cc \
+       tests/stub_whois.cc \
        $(WIN32_SOURCE) \
        wordlist.h \
        wordlist.cc
@@ -2005,11 +2008,9 @@ nodist_tests_testEvent_SOURCES = \
        $(DISKIO_GEN_SOURCE)
 tests_testEvent_LDADD = \
        http/libsquid-http.la \
-       $(AUTH_ACL_LIBS) \
        ident/libident.la \
        acl/libacls.la \
        acl/libstate.la \
-       $(AUTH_LIBS) \
        acl/libapi.la \
        base/libbase.la \
        libsquid.la \
@@ -2047,10 +2048,9 @@ tests_testEvent_DEPENDENCIES = \
 ## Tests of the EventLoop module.
 tests_testEventLoop_SOURCES = \
        AccessLogEntry.cc \
-       $(ACL_REGISTRATION_SOURCES) \
        BodyPipe.cc \
        CacheDigest.h \
-       CacheDigest.cc \
+       tests/stub_CacheDigest.cc \
        cache_manager.cc \
        cache_cf.h \
        AuthReg.h \
@@ -2059,7 +2059,7 @@ tests_testEventLoop_SOURCES = \
        RefreshPattern.h \
        cache_cf.cc \
        carp.h \
-       carp.cc \
+       tests/stub_carp.cc \
        cbdata.cc \
        ChunkedCodingParser.cc \
        client_db.h \
@@ -2085,7 +2085,7 @@ tests_testEventLoop_SOURCES = \
        dlink.cc \
        $(DNSSOURCE) \
        errorpage.cc \
-       ETag.cc \
+       tests/stub_ETag.cc \
        EventLoop.h \
        EventLoop.cc \
        event.cc \
@@ -2150,11 +2150,10 @@ tests_testEventLoop_SOURCES = \
        SquidList.cc \
        MasterXaction.cc \
        MasterXaction.h \
-       MemBlob.cc \
        MemBuf.cc \
        MemObject.cc \
        Mem.h \
-       mem.cc \
+       tests/stub_mem.cc \
        mem_node.cc \
        mime.h \
        mime.cc \
@@ -2179,10 +2178,13 @@ tests_testEventLoop_SOURCES = \
        peer_userhash.cc \
        RemovalPolicy.cc \
        redirect.h \
-       redirect.cc \
+       tests/stub_redirect.cc \
        refresh.h \
        refresh.cc \
        Server.cc \
+       $(SBUF_SOURCE) \
+       SBufDetailedStats.h \
+       tests/stub_SBufDetailedStats.cc \
        $(SNMP_SOURCE) \
        SquidMath.h \
        SquidMath.cc \
@@ -2199,7 +2201,7 @@ tests_testEventLoop_SOURCES = \
        store.cc \
        store_client.cc \
        store_digest.h \
-       store_digest.cc \
+       tests/stub_store_digest.cc \
        store_dir.cc \
        store_io.cc \
        store_key_md5.h \
@@ -2214,29 +2216,26 @@ tests_testEventLoop_SOURCES = \
        store_swapout.cc \
        StoreFileSystem.cc \
        StoreIOState.cc \
-       StoreMeta.cc \
-       StoreMetaMD5.cc \
-       StoreMetaSTD.cc \
-       StoreMetaSTDLFS.cc \
+       tests/stub_StoreMeta.cc \
        StoreMetaUnpacker.cc \
-       StoreMetaURL.cc \
-       StoreMetaVary.cc \
        StoreSwapLogData.cc \
        String.cc \
        StrList.h \
        StrList.cc \
-       SwapDir.cc \
+       tests/stub_SwapDir.cc \
        tests/testEventLoop.cc \
        tests/testEventLoop.h \
        tests/testMain.cc \
        tests/stub_main_cc.cc \
        tests/stub_ipc_Forwarder.cc \
+       tests/stub_libauth_acls.cc \
+       tests/stub_libauth.cc \
        tests/stub_libeui.cc \
        tests/stub_store_stats.cc \
        time.cc \
        tools.h \
        tools.cc \
-       tunnel.cc \
+       tests/stub_tunnel.cc \
        MemStore.cc \
        $(UNLINKDSOURCE) \
        url.cc \
@@ -2244,9 +2243,9 @@ tests_testEventLoop_SOURCES = \
        urn.h \
        urn.cc \
        wccp2.h \
-       wccp2.cc \
+       tests/stub_wccp2.cc \
        whois.h \
-       whois.cc \
+       tests/stub_whois.cc \
        $(WIN32_SOURCE) \
        wordlist.h \
        wordlist.cc
@@ -2255,11 +2254,9 @@ nodist_tests_testEventLoop_SOURCES = \
        $(DISKIO_GEN_SOURCE)
 tests_testEventLoop_LDADD = \
        http/libsquid-http.la \
-       $(AUTH_ACL_LIBS) \
        ident/libident.la \
        acl/libacls.la \
        acl/libstate.la \
-       $(AUTH_LIBS) \
        acl/libapi.la \
        base/libbase.la \
        libsquid.la \
@@ -2296,7 +2293,6 @@ tests_testEventLoop_DEPENDENCIES = \
 
 tests_test_http_range_SOURCES = \
        AccessLogEntry.cc \
-       $(ACL_REGISTRATION_SOURCES) \
        BodyPipe.cc \
        cache_cf.h \
        AuthReg.h \
@@ -2306,9 +2302,9 @@ tests_test_http_range_SOURCES = \
        cache_cf.cc \
        cache_manager.cc \
        CacheDigest.h \
-       CacheDigest.cc \
+       tests/stub_CacheDigest.cc \
        carp.h \
-       carp.cc \
+       tests/stub_carp.cc \
        cbdata.cc \
        ChunkedCodingParser.cc \
        client_db.h \
@@ -2334,12 +2330,11 @@ tests_test_http_range_SOURCES = \
        dlink.cc \
        $(DNSSOURCE) \
        errorpage.cc \
-       ETag.cc \
+       tests/stub_ETag.cc \
        event.cc \
-       external_acl.cc \
-       ExternalACLEntry.cc \
        FadingCounter.cc \
        fatal.h \
+       tests/stub_libauth.cc \
        tests/stub_fatal.cc \
        fd.h \
        fd.cc \
@@ -2397,11 +2392,10 @@ tests_test_http_range_SOURCES = \
        SquidList.cc \
        MasterXaction.cc \
        MasterXaction.h \
-       MemBlob.cc \
        MemBuf.cc \
        MemObject.cc \
        Mem.h \
-       mem.cc \
+       tests/stub_mem.cc \
        mem_node.cc \
        mime.h \
        mime.cc \
@@ -2425,11 +2419,14 @@ tests_test_http_range_SOURCES = \
        peer_userhash.cc \
        pconn.cc \
        redirect.h \
-       redirect.cc \
+       tests/stub_redirect.cc \
        refresh.h \
        refresh.cc \
        RemovalPolicy.cc \
        Server.cc \
+       $(SBUF_SOURCE) \
+       SBufDetailedStats.h \
+       tests/stub_SBufDetailedStats.cc \
        $(SNMP_SOURCE) \
        SquidMath.h \
        SquidMath.cc \
@@ -2445,7 +2442,7 @@ tests_test_http_range_SOURCES = \
        store.cc \
        store_client.cc \
        store_digest.h \
-       store_digest.cc \
+       tests/stub_store_digest.cc \
        store_dir.cc \
        store_key_md5.h \
        store_key_md5.cc \
@@ -2460,37 +2457,34 @@ tests_test_http_range_SOURCES = \
        store_swapout.cc \
        StoreFileSystem.cc \
        StoreIOState.cc \
-       StoreMeta.cc \
-       StoreMetaMD5.cc \
-       StoreMetaSTD.cc \
-       StoreMetaSTDLFS.cc \
+       tests/stub_StoreMeta.cc \
        StoreMetaUnpacker.cc \
-       StoreMetaURL.cc \
-       StoreMetaVary.cc \
        StoreSwapLogData.cc \
        String.cc \
        StrList.h \
        StrList.cc \
-       SwapDir.cc \
+       tests/stub_SwapDir.cc \
        tests/test_http_range.cc \
+       tests/stub_external_acl.cc \
        tests/stub_ipc_Forwarder.cc \
        tests/stub_libeui.cc \
        tests/stub_main_cc.cc \
        tests/stub_MemStore.cc \
        tests/stub_store_stats.cc \
+       tests/stub_EventLoop.cc \
        time.cc \
        tools.h \
        tools.cc \
-       tunnel.cc \
+       tests/stub_tunnel.cc \
        $(UNLINKDSOURCE) \
        url.cc \
        URLScheme.cc \
        urn.h \
        urn.cc \
        wccp2.h \
-       wccp2.cc \
+       tests/stub_wccp2.cc \
        whois.h \
-       whois.cc \
+       tests/stub_whois.cc \
        $(WIN32_SOURCE) \
        wordlist.h \
        wordlist.cc
@@ -2499,11 +2493,9 @@ nodist_tests_test_http_range_SOURCES = \
        $(DISKIO_GEN_SOURCE)
 tests_test_http_range_LDADD = \
        http/libsquid-http.la \
-       $(AUTH_ACL_LIBS) \
        ident/libident.la \
        acl/libacls.la \
        acl/libstate.la \
-       $(AUTH_LIBS) \
        acl/libapi.la \
        libsquid.la \
        ip/libip.la \
@@ -2544,7 +2536,7 @@ tests_testHttpParser_SOURCES = \
        MemBuf.cc \
        MemBuf.h \
        Mem.h \
-       mem.cc \
+       tests/stub_mem.cc \
        String.cc \
        cache_cf.h \
        YesNoNone.h \
@@ -2558,7 +2550,7 @@ tests_testHttpParser_SOURCES = \
        tests/testHttpParser.cc \
        tests/testHttpParser.h \
        tests/testMain.cc \
-       time.cc \
+       tests/stub_time.cc \
        wordlist.h \
        wordlist.cc
 nodist_tests_testHttpParser_SOURCES = \
@@ -2579,7 +2571,6 @@ tests_testHttpParser_DEPENDENCIES = \
 ## Tests of the HttpRequest module.
 tests_testHttpRequest_SOURCES = \
        AccessLogEntry.cc \
-       $(ACL_REGISTRATION_SOURCES) \
        HttpParser.cc \
        HttpParser.h \
        RequestFlags.h \
@@ -2587,7 +2578,7 @@ tests_testHttpRequest_SOURCES = \
        HttpRequest.cc \
        HttpRequestMethod.cc \
        Mem.h \
-       mem.cc \
+       tests/stub_mem.cc \
        String.cc \
        tests/testHttpRequest.h \
        tests/testHttpRequest.cc \
@@ -2595,10 +2586,12 @@ tests_testHttpRequest_SOURCES = \
        tests/testHttpRequestMethod.cc \
        tests/testMain.cc \
        tests/stub_DiskIOModule.cc \
+       tests/stub_libauth.cc \
        tests/stub_main_cc.cc \
        tests/stub_ipc_Forwarder.cc \
        tests/stub_libeui.cc \
        tests/stub_store_stats.cc \
+       tests/stub_EventLoop.cc \
        time.cc \
        BodyPipe.cc \
        cache_manager.cc \
@@ -2610,9 +2603,9 @@ tests_testHttpRequest_SOURCES = \
        cache_cf.cc \
        debug.cc \
        CacheDigest.h \
-       CacheDigest.cc \
+       tests/stub_CacheDigest.cc \
        carp.h \
-       carp.cc \
+       tests/stub_carp.cc \
        cbdata.cc \
        ChunkedCodingParser.cc \
        client_db.h \
@@ -2636,7 +2629,7 @@ tests_testHttpRequest_SOURCES = \
        dlink.cc \
        $(DNSSOURCE) \
        errorpage.cc \
-       ETag.cc \
+       tests/stub_ETag.cc \
        external_acl.cc \
        ExternalACLEntry.cc \
        fatal.h \
@@ -2692,7 +2685,6 @@ tests_testHttpRequest_SOURCES = \
        multicast.h \
        multicast.cc \
        mem_node.cc \
-       MemBlob.cc \
        MemBuf.cc \
        MemObject.cc \
        mime.h \
@@ -2715,11 +2707,15 @@ tests_testHttpRequest_SOURCES = \
        peer_userhash.h \
        peer_userhash.cc \
        redirect.h \
-       redirect.cc \
+       tests/stub_libauth_acls.cc \
+       tests/stub_redirect.cc \
        refresh.h \
        refresh.cc \
        RemovalPolicy.cc \
        Server.cc \
+       $(SBUF_SOURCE) \
+       SBufDetailedStats.h \
+       tests/stub_SBufDetailedStats.cc \
        $(SNMP_SOURCE) \
        SquidMath.h \
        SquidMath.cc \
@@ -2735,7 +2731,7 @@ tests_testHttpRequest_SOURCES = \
        store.cc \
        store_client.cc \
        store_digest.h \
-       store_digest.cc \
+       tests/stub_store_digest.cc \
        store_dir.cc \
        store_io.cc \
        store_key_md5.h \
@@ -2750,30 +2746,25 @@ tests_testHttpRequest_SOURCES = \
        store_swapout.cc \
        StoreFileSystem.cc \
        StoreIOState.cc \
-       StoreMeta.cc \
-       StoreMetaMD5.cc \
-       StoreMetaSTD.cc \
-       StoreMetaSTDLFS.cc \
+       tests/stub_StoreMeta.cc \
        StoreMetaUnpacker.cc \
-       StoreMetaURL.cc \
-       StoreMetaVary.cc \
        StoreSwapLogData.cc \
        StrList.h \
        StrList.cc \
        event.cc \
        tools.h \
        tools.cc \
-       tunnel.cc \
-       SwapDir.cc \
+       tests/stub_tunnel.cc \
+       tests/stub_SwapDir.cc \
        MemStore.cc \
        url.cc \
        URLScheme.cc \
        urn.h \
        urn.cc \
        wccp2.h \
-       wccp2.cc \
+       tests/stub_wccp2.cc \
        whois.h \
-       whois.cc \
+       tests/stub_whois.cc \
        FadingCounter.cc \
        $(WIN32_SOURCE) \
        wordlist.h \
@@ -2781,11 +2772,9 @@ tests_testHttpRequest_SOURCES = \
 nodist_tests_testHttpRequest_SOURCES = \
        $(BUILT_SOURCES)
 tests_testHttpRequest_LDADD = \
-       $(AUTH_ACL_LIBS) \
        ident/libident.la \
        acl/libacls.la \
        acl/libstate.la \
-       $(AUTH_LIBS) \
        acl/libapi.la \
        libsquid.la \
        ip/libip.la \
@@ -2824,7 +2813,7 @@ tests_testHttpRequest_DEPENDENCIES = \
 ## first line - what we are testing.
 tests_testStore_SOURCES= \
        CacheDigest.h \
-       CacheDigest.cc \
+       tests/stub_CacheDigest.cc \
        cbdata.cc \
        ClientInfo.h \
        ConfigOption.cc \
@@ -2865,10 +2854,12 @@ tests_testStore_SOURCES= \
        MasterXaction.cc \
        MasterXaction.h \
        Mem.h \
-       mem.cc \
+       tests/stub_mem.cc \
        mem_node.cc \
        MemBuf.cc \
        MemObject.cc \
+       Notes.h \
+       Notes.cc \
        Packer.cc \
        Parsing.cc \
        RemovalPolicy.cc \
@@ -2885,16 +2876,14 @@ tests_testStore_SOURCES= \
        store_io.cc \
        store_swapout.cc \
        StoreIOState.cc \
-       StoreMeta.cc \
-       StoreMetaMD5.cc \
-       StoreMetaSTD.cc \
-       StoreMetaSTDLFS.cc \
+       tests/stub_StoreMeta.cc \
        StoreMetaUnpacker.cc \
-       StoreMetaURL.cc \
-       StoreMetaVary.cc \
        StoreSwapLogData.cc \
        store_key_md5.h \
        store_key_md5.cc \
+       $(SBUF_SOURCE) \
+       SBufDetailedStats.h \
+       tests/stub_SBufDetailedStats.cc \
        String.cc \
        StrList.h \
        StrList.cc \
@@ -2918,6 +2907,7 @@ tests_testStore_SOURCES= \
        tests/stub_helper.cc \
        tests/stub_HelperChildConfig.cc \
        tests/stub_http.cc \
+       tests/stub_libauth.cc \
        tests/stub_libeui.cc \
        tests/stub_libformat.cc \
        HttpBody.h \
@@ -2950,7 +2940,7 @@ tests_testStore_SOURCES= \
        tests/testStoreSupport.h \
        tests/TestSwapDir.cc \
        tests/TestSwapDir.h \
-       time.cc \
+       tests/stub_time.cc \
        url.cc \
        URLScheme.cc \
        wordlist.h \
@@ -2964,11 +2954,9 @@ nodist_tests_testStore_SOURCES= \
 
 tests_testStore_LDADD= \
        http/libsquid-http.la \
-       $(AUTH_ACL_LIBS) \
        ident/libident.la \
        acl/libacls.la \
        acl/libstate.la \
-       $(AUTH_LIBS) \
        acl/libapi.la \
        base/libbase.la \
        libsquid.la \
@@ -2998,7 +2986,7 @@ tests_testStore_DEPENDENCIES = \
 tests_testString_SOURCES = \
        ClientInfo.h \
        Mem.h \
-       mem.cc \
+       tests/stub_mem.cc \
        MemBuf.cc \
        String.cc \
        tests/testMain.cc \
@@ -3012,7 +3000,7 @@ tests_testString_SOURCES = \
        tests/stub_HelperChildConfig.cc \
        tools.h \
        tests/stub_tools.cc \
-       time.cc \
+       tests/stub_time.cc \
        wordlist.h \
        wordlist.cc
 nodist_tests_testString_SOURCES = \
@@ -3034,11 +3022,9 @@ tests_testString_DEPENDENCIES = \
 SWAP_TEST_DS =\
        repl_modules.o \
        $(DISK_LIBS) \
-       $(AUTH_ACL_LIBS) \
        ident/libident.la \
        acl/libacls.la \
        acl/libstate.la \
-       $(AUTH_LIBS) \
        acl/libapi.la \
        base/libbase.la \
        libsquid.la \
@@ -3058,7 +3044,9 @@ tests_testUfs_SOURCES = \
        tests/stub_HelperChildConfig.cc \
        tests/stub_icp.cc \
        tests/stub_ipc.cc \
+       tests/stub_ipcache.cc \
        tests/stub_libeui.cc \
+       tests/stub_libicmp.cc \
        tests/stub_MemStore.cc \
        tests/stub_pconn.cc \
        tests/stub_Port.cc \
@@ -3092,15 +3080,12 @@ tests_testUfs_SOURCES = \
        MasterXaction.cc \
        MasterXaction.h \
        MemObject.cc \
+       Notes.h \
+       Notes.cc \
        StoreSwapLogData.cc \
        StoreIOState.cc \
-       StoreMeta.cc \
-       StoreMetaMD5.cc \
-       StoreMetaSTD.cc \
-       StoreMetaSTDLFS.cc \
        StoreMetaUnpacker.cc \
-       StoreMetaURL.cc \
-       StoreMetaVary.cc \
+       $(STOREMETA_SOURCE) \
        StoreFileSystem.cc \
        store_io.cc \
        store_swapout.cc \
@@ -3110,7 +3095,7 @@ tests_testUfs_SOURCES = \
        event.cc \
        $(DELAY_POOL_SOURCE) \
        CacheDigest.h \
-       CacheDigest.cc \
+       tests/stub_CacheDigest.cc \
        ConfigParser.cc \
        EventLoop.cc \
        HttpMsg.cc \
@@ -3130,10 +3115,14 @@ tests_testUfs_SOURCES = \
        tests/stub_cache_cf.cc \
        tests/stub_helper.cc \
        cbdata.cc \
+       $(SBUF_SOURCE) \
+       SBufDetailedStats.h \
+       tests/stub_SBufDetailedStats.cc \
        String.cc \
        tests/stub_debug.cc \
        tests/stub_client_side_request.cc \
        tests/stub_http.cc \
+       tests/stub_libauth.cc \
        mem_node.cc \
        stmem.cc \
        mime.h \
@@ -3191,11 +3180,9 @@ tests_testUfs_LDADD = \
        http/libsquid-http.la \
        CommCalls.o \
        DnsLookupDetails.o \
-       $(AUTH_ACL_LIBS) \
        ident/libident.la \
        acl/libacls.la \
        acl/libstate.la \
-       $(AUTH_LIBS) \
        acl/libapi.la \
        libsquid.la \
        ip/libip.la \
@@ -3241,7 +3228,7 @@ testRefCount_LDADD = \
 tests_testRock_SOURCES = \
        cbdata.cc \
        CacheDigest.h \
-       CacheDigest.cc \
+       tests/stub_CacheDigest.cc \
        ConfigOption.cc \
        ConfigParser.cc \
        disk.h \
@@ -3284,6 +3271,8 @@ tests_testRock_SOURCES = \
        MemBuf.cc \
        MemObject.cc \
        mem_node.cc \
+       Notes.h \
+       Notes.cc \
        Packer.cc \
        Parsing.cc \
        RemovalPolicy.cc \
@@ -3298,13 +3287,8 @@ tests_testRock_SOURCES = \
        store.cc \
        StoreFileSystem.cc \
        StoreIOState.cc \
-       StoreMeta.cc \
-       StoreMetaMD5.cc \
-       StoreMetaSTD.cc \
-       StoreMetaSTDLFS.cc \
-       StoreMetaURL.cc \
        StoreMetaUnpacker.cc \
-       StoreMetaVary.cc \
+       $(STOREMETA_SOURCE) \
        StoreSwapLogData.cc \
        store_dir.cc \
        store_io.cc \
@@ -3312,6 +3296,9 @@ tests_testRock_SOURCES = \
        store_key_md5.cc \
        store_swapmeta.cc \
        store_swapout.cc \
+       $(SBUF_SOURCE) \
+       SBufDetailedStats.h \
+       tests/stub_SBufDetailedStats.cc \
        String.cc \
        StrList.h \
        StrList.cc \
@@ -3326,8 +3313,8 @@ tests_testRock_SOURCES = \
        cache_cf.h \
        YesNoNone.h \
        tests/stub_cache_cf.cc \
-       tests/stub_cache_manager.cc \
        client_db.h \
+       tests/stub_cache_manager.cc \
        tests/stub_client_db.cc \
        tests/stub_client_side_request.cc \
        tests/stub_debug.cc \
@@ -3335,12 +3322,14 @@ tests_testRock_SOURCES = \
        tests/stub_HelperChildConfig.cc \
        tests/stub_http.cc \
        tests/stub_HttpRequest.cc \
+       tests/stub_libauth.cc \
        tests/stub_icp.cc \
        tests/stub_ipc.cc \
        tests/stub_ipcache.cc \
        tests/stub_libeui.cc \
        tests/stub_libformat.cc \
        tests/stub_libicmp.cc \
+       tests/stub_libmgr.cc \
        tests/stub_MemStore.cc \
        mime.h \
        tests/stub_mime.cc \
@@ -3373,7 +3362,6 @@ tests_testRock_LDADD = \
        anyp/libanyp.la \
        ip/libip.la \
        fs/libfs.la \
-       $(AUTH_LIBS) \
        $(COMMON_LIBS) \
        $(REPL_OBJS) \
        $(DISK_LIBS) \
@@ -3382,7 +3370,6 @@ tests_testRock_LDADD = \
        acl/libapi.la \
        acl/libstate.la \
        ipc/libipc.la \
-       mgr/libmgr.la \
        base/libbase.la \
        $(SSL_LIBS) \
        $(top_builddir)/lib/libmisccontainers.la \
@@ -3401,7 +3388,6 @@ tests_testRock_DEPENDENCIES = \
 ## TODO: Trim this down once the insanity is over.
 tests_testURL_SOURCES = \
        AccessLogEntry.cc \
-       $(ACL_REGISTRATION_SOURCES) \
        BodyPipe.cc \
        cache_cf.h \
        AuthReg.h \
@@ -3409,11 +3395,11 @@ tests_testURL_SOURCES = \
        YesNoNone.cc \
        RefreshPattern.h \
        cache_cf.cc \
-       cache_manager.cc \
+       tests/stub_cache_manager.cc \
        CacheDigest.h \
-       CacheDigest.cc \
+       tests/stub_CacheDigest.cc \
        carp.h \
-       carp.cc \
+       tests/stub_carp.cc \
        cbdata.cc \
        ChunkedCodingParser.cc \
        client_db.h \
@@ -3504,9 +3490,8 @@ tests_testURL_SOURCES = \
        multicast.h \
        multicast.cc \
        Mem.h \
-       mem.cc \
+       tests/stub_mem.cc \
        mem_node.cc \
-       MemBlob.cc \
        MemBuf.cc \
        MemObject.cc \
        mime.h \
@@ -3515,8 +3500,8 @@ tests_testURL_SOURCES = \
        mime_header.cc \
        neighbors.h \
        neighbors.cc \
-       Notes.cc \
        Notes.h \
+       Notes.cc \
        Packer.cc \
        Parsing.cc \
        pconn.cc \
@@ -3529,11 +3514,14 @@ tests_testURL_SOURCES = \
        peer_userhash.h \
        peer_userhash.cc \
        redirect.h \
-       redirect.cc \
+       tests/stub_redirect.cc \
        refresh.h \
        refresh.cc \
        RemovalPolicy.cc \
        Server.cc \
+       $(SBUF_SOURCE) \
+       SBufDetailedStats.h \
+       tests/stub_SBufDetailedStats.cc \
        $(SNMP_SOURCE) \
        SquidMath.h \
        SquidMath.cc \
@@ -3549,7 +3537,7 @@ tests_testURL_SOURCES = \
        store.cc \
        store_client.cc \
        store_digest.h \
-       store_digest.cc \
+       tests/stub_store_digest.cc \
        store_dir.cc \
        store_io.cc \
        store_key_md5.h \
@@ -3564,21 +3552,18 @@ tests_testURL_SOURCES = \
        store_swapout.cc \
        StoreFileSystem.cc \
        StoreIOState.cc \
-       StoreMeta.cc \
-       StoreMetaMD5.cc \
-       StoreMetaSTD.cc \
-       StoreMetaSTDLFS.cc \
+       tests/stub_StoreMeta.cc \
        StoreMetaUnpacker.cc \
-       StoreMetaURL.cc \
-       StoreMetaVary.cc \
        StoreSwapLogData.cc \
        String.cc \
        StrList.h \
        StrList.cc \
-       SwapDir.cc \
+       tests/stub_SwapDir.cc \
        MemStore.cc \
        tests/stub_debug.cc \
        tests/stub_DiskIOModule.cc \
+       tests/stub_libauth_acls.cc \
+       tests/stub_libauth.cc \
        tests/stub_main_cc.cc \
        tests/stub_ipc_Forwarder.cc \
        tests/stub_store_stats.cc \
@@ -3587,18 +3572,19 @@ tests_testURL_SOURCES = \
        tests/testURLScheme.cc \
        tests/testURLScheme.h \
        tests/testMain.cc \
-       time.cc \
+       tests/stub_time.cc \
+       tests/stub_EventLoop.cc \
        tools.h \
        tools.cc \
-       tunnel.cc \
+       tests/stub_tunnel.cc \
        url.cc \
        URLScheme.cc \
        urn.h \
        urn.cc \
        wccp2.h \
-       wccp2.cc \
+       tests/stub_wccp2.cc \
        whois.h \
-       whois.cc \
+       tests/stub_whois.cc \
        FadingCounter.cc \
        $(WIN32_SOURCE) \
        wordlist.h \
@@ -3608,12 +3594,10 @@ nodist_tests_testURL_SOURCES = \
 tests_testURL_LDADD = \
        http/libsquid-http.la \
        anyp/libanyp.la \
-       $(AUTH_ACL_LIBS) \
        ident/libident.la \
        acl/libacls.la \
        eui/libeui.la \
        acl/libstate.la \
-       $(AUTH_LIBS) \
        acl/libapi.la \
        base/libbase.la \
        libsquid.la \
@@ -3654,8 +3638,10 @@ tests_testSBuf_SOURCES= \
        tests/SBufFindTest.h \
        tests/SBufFindTest.cc \
        $(SBUF_SOURCE) \
+       SBufDetailedStats.h \
+       tests/stub_SBufDetailedStats.cc \
        SBufStream.h \
-       time.cc \
+       tests/stub_time.cc \
        mem.cc \
        tests/stub_debug.cc \
        tests/stub_fatal.cc \
@@ -3667,8 +3653,8 @@ tests_testSBuf_SOURCES= \
        tests/stub_tools.cc \
        SquidString.h \
        String.cc \
-       wordlist.cc \
-       MemBuf.cc
+       tests/stub_wordlist.cc \
+       tests/stub_MemBuf.cc
 nodist_tests_testSBuf_SOURCES=$(TESTSOURCES)
 tests_testSBuf_LDFLAGS = $(LIBADD_DL)
 tests_testSBuf_LDADD=\
@@ -3686,8 +3672,9 @@ tests_testSBuf_DEPENDENCIES= $(SQUID_CPPUNIT_LA)
 tests_testConfigParser_SOURCES = \
        ClientInfo.h \
        Mem.h \
-       mem.cc \
-       MemBuf.cc \
+       tests/stub_mem.cc \
+       tests/stub_MemBuf.cc \
+       tests/stub_time.cc \
        String.cc \
        ConfigParser.cc \
        fatal.h \
@@ -3703,7 +3690,6 @@ tests_testConfigParser_SOURCES = \
        tests/stub_HelperChildConfig.cc \
        tools.h \
        tests/stub_tools.cc \
-       time.cc \
        wordlist.h \
        wordlist.cc
 nodist_tests_testConfigParser_SOURCES = \
@@ -3723,10 +3709,10 @@ tests_testConfigParser_DEPENDENCIES = \
        $(SQUID_CPPUNIT_LA)
        
 tests_testStatHist_SOURCES = \
-       cbdata.cc \
+       tests/stub_cbdata.cc \
        fatal.h \
        tests/stub_fatal.cc \
-       MemBuf.cc \
+       tests/stub_MemBuf.cc \
        StatHist.cc \
        StatHist.h \
        String.cc \
@@ -3749,8 +3735,7 @@ tests_testStatHist_SOURCES = \
        tests/stub_tools.cc \
        tests/testMain.cc \
        tests/testStatHist.cc \
-       tests/testStatHist.h \
-       time.cc
+       tests/testStatHist.h
 nodist_tests_testStatHist_SOURCES = \
        $(TESTSOURCES)
 tests_testStatHist_LDFLAGS = $(LIBADD_DL)
@@ -3766,8 +3751,7 @@ tests_testStatHist_DEPENDENCIES = $(SQUID_CPPUNIT_LA)
 tests_testVector_SOURCES = \
        tests/testVector.cc \
        tests/testMain.cc \
-       tests/testVector.h \
-       time.cc
+       tests/testVector.h
 nodist_tests_testVector_SOURCES = \
        $(TESTSOURCES)
 tests_testVector_LDADD= \
index c57d9c57501bac90c4f92e78b655109656da7ebf..3234215695a87d14be3fd5baf5194001f824e323 100644 (file)
@@ -31,6 +31,7 @@
 #include "Debug.h"
 #include "Mem.h"
 #include "MemBlob.h"
+#include "SBufDetailedStats.h"
 
 #if HAVE_IOSTREAM
 #include <iostream>
@@ -96,6 +97,7 @@ MemBlob::~MemBlob()
         memFreeString(capacity,mem);
     Stats.liveBytes -= capacity;
     --Stats.live;
+    recordMemBlobSizeAtDestruct(size);
 
     debugs(MEMBLOB_DEBUGSECTION,9, HERE << "destructed, this="
            << static_cast<void*>(this) << " id=" << id
diff --git a/src/MessageSizes.h b/src/MessageSizes.h
new file mode 100644 (file)
index 0000000..69220c4
--- /dev/null
@@ -0,0 +1,24 @@
+#ifndef SQUID_SRC_MESSAGESIZES_H
+#define SQUID_SRC_MESSAGESIZES_H
+
+/**
+ * Counters used to collate the traffic size measurements
+ * for a transaction message.
+ */
+class MessageSizes
+{
+public:
+    MessageSizes() : header(0), payloadData(0) {}
+
+    /// size of message header block (if any)
+    /// including message Request-Line or Start-Line.
+    uint64_t header;
+
+    /// total size of payload block(s) excluding transfer encoding overheads
+    uint64_t payloadData;
+
+    /// total message size
+    uint64_t messageTotal() const {return header + payloadData;}
+};
+
+#endif  /* SQUID_SRC_MESSAGESIZES_H */
index b852028f6293e10b421b97d3057506f0a0db6059..ad84e0ea6bff4af1ac28851f77e30cfabdd446dc 100644 (file)
  */
 
 #include "squid.h"
-#include "globals.h"
 #include "AccessLogEntry.h"
 #include "acl/FilledChecklist.h"
 #include "acl/Gadgets.h"
 #include "ConfigParser.h"
-#include "HttpRequest.h"
+#include "globals.h"
 #include "HttpReply.h"
+#include "HttpRequest.h"
 #include "SquidConfig.h"
 #include "Store.h"
 #include "StrList.h"
@@ -56,7 +56,7 @@ Note::addValue(const String &value)
 }
 
 const char *
-Note::match(HttpRequest *request, HttpReply *reply)
+Note::match(HttpRequest *request, HttpReply *reply, const AccessLogEntry::Pointer &al)
 {
 
     typedef Values::iterator VLI;
@@ -69,8 +69,15 @@ Note::match(HttpRequest *request, HttpReply *reply)
         const int ret= ch.fastCheck((*i)->aclList);
         debugs(93, 5, HERE << "Check for header name: " << key << ": " << (*i)->value
                <<", HttpRequest: " << request << " HttpReply: " << reply << " matched: " << ret);
-        if (ret == ACCESS_ALLOWED)
-            return (*i)->value.termedBuf();
+        if (ret == ACCESS_ALLOWED) {
+            if (al != NULL && (*i)->valueFormat != NULL) {
+                static MemBuf mb;
+                mb.reset();
+                (*i)->valueFormat->assemble(mb, al, 0);
+                return mb.content();
+            } else
+                return (*i)->value.termedBuf();
+        }
     }
     return NULL;
 }
@@ -93,7 +100,10 @@ Note::Pointer
 Notes::parse(ConfigParser &parser)
 {
     String key = ConfigParser::NextToken();
+    ConfigParser::EnableMacros();
     String value = ConfigParser::NextQuotedToken();
+    ConfigParser::DisableMacros();
+    bool valueWasQuoted = ConfigParser::LastTokenWasQuoted();
     Note::Pointer note = add(key);
     Note::Value::Pointer noteValue = note->addValue(value);
 
@@ -101,7 +111,10 @@ Notes::parse(ConfigParser &parser)
     label.append('=');
     label.append(value);
     aclParseAclList(parser, &noteValue->aclList, label.termedBuf());
-
+    if (formattedValues && valueWasQuoted) {
+        noteValue->valueFormat =  new Format::Format(descr ? descr : "Notes");
+        noteValue->valueFormat->parse(value.termedBuf());
+    }
     if (blacklisted) {
         for (int i = 0; blacklisted[i] != NULL; ++i) {
             if (note->key.caseCmp(blacklisted[i]) == 0) {
@@ -205,7 +218,7 @@ bool
 NotePairs::hasPair(const char *key, const char *value) const
 {
     for (Vector<NotePairs::Entry *>::const_iterator  i = entries.begin(); i != entries.end(); ++i) {
-        if ((*i)->name.cmp(key) == 0 || (*i)->value.cmp(value) == 0)
+        if ((*i)->name.cmp(key) == 0 && (*i)->value.cmp(value) == 0)
             return true;
     }
     return false;
@@ -219,12 +232,25 @@ NotePairs::append(const NotePairs *src)
     }
 }
 
+void
+NotePairs::appendNewOnly(const NotePairs *src)
+{
+    for (Vector<NotePairs::Entry *>::const_iterator  i = src->entries.begin(); i != src->entries.end(); ++i) {
+        if (!hasPair((*i)->name.termedBuf(), (*i)->value.termedBuf()))
+            entries.push_back(new NotePairs::Entry((*i)->name.termedBuf(), (*i)->value.termedBuf()));
+    }
+}
+
 NotePairs &
 SyncNotes(AccessLogEntry &ale, HttpRequest &request)
 {
+    // XXX: auth code only has access to HttpRequest being authenticated
+    // so we must handle the case where HttpRequest is set without ALE being set.
+
     if (!ale.notes) {
-        assert(!request.notes);
-        ale.notes = request.notes = new NotePairs;
+        if (!request.notes)
+            request.notes = new NotePairs;
+        ale.notes = request.notes;
     } else {
         assert(ale.notes == request.notes);
     }
index 0068bd233295ada980169fa359186f0fb99ffa5a..6edf828f16088008bfdbd69434b94f64793f9ba3 100644 (file)
@@ -2,9 +2,10 @@
 #define SQUID_NOTES_H
 
 #include "acl/forward.h"
-#include "base/Vector.h"
 #include "base/RefCount.h"
+#include "base/Vector.h"
 #include "CbDataList.h"
+#include "format/Format.h"
 #include "MemPool.h"
 #include "SquidString.h"
 #include "typedefs.h"
@@ -15,6 +16,7 @@
 
 class HttpRequest;
 class HttpReply;
+typedef RefCount<AccessLogEntry> AccessLogEntryPointer;
 
 /**
  * Used to store a note configuration. The notes are custom key:value
@@ -31,9 +33,11 @@ public:
     {
     public:
         typedef RefCount<Value> Pointer;
-        String value; ///< a note value
+        String value; ///< Configured annotation value, possibly with %macros
         ACLList *aclList; ///< The access list used to determine if this value is valid for a request
-        explicit Value(const String &aVal) : value(aVal), aclList(NULL) {}
+        /// Compiled annotation value format
+        Format::Format *valueFormat;
+        explicit Value(const String &aVal) : value(aVal), aclList(NULL), valueFormat(NULL) {}
         ~Value();
     };
     typedef Vector<Value::Pointer> Values;
@@ -50,8 +54,10 @@ public:
      * Walks through the  possible values list of the note and selects
      * the first value which matches the given HttpRequest and HttpReply
      * or NULL if none matches.
+     * If an AccessLogEntry given and Value::valueFormat is not null, the
+     * formatted value returned.
      */
-    const char *match(HttpRequest *request, HttpReply *reply);
+    const char *match(HttpRequest *request, HttpReply *reply, const AccessLogEntryPointer &al);
 
     String key; ///< The note key
     Values values; ///< The possible values list for the note
@@ -68,7 +74,7 @@ public:
     typedef NotesList::iterator iterator; ///< iterates over the notes list
     typedef NotesList::const_iterator const_iterator; ///< iterates over the notes list
 
-    Notes(const char *aDescr, const char **metasBlacklist): descr(aDescr), blacklisted(metasBlacklist) {}
+    Notes(const char *aDescr, const char **metasBlacklist, bool allowFormatted = false): descr(aDescr), blacklisted(metasBlacklist), formattedValues(allowFormatted) {}
     Notes(): descr(NULL), blacklisted(NULL) {}
     ~Notes() { notes.clean(); }
     /**
@@ -92,6 +98,7 @@ public:
     NotesList notes; ///< The Note::Pointer objects array list
     const char *descr; ///< A short description for notes list
     const char **blacklisted; ///< Null terminated list of blacklisted note keys
+    bool formattedValues; ///< Whether the formatted values are supported
 
 private:
     /**
@@ -130,6 +137,12 @@ public:
      */
     void append(const NotePairs *src);
 
+    /**
+     * Append any new entries of the src NotePairs list to our list.
+     * Entries which already exist in the destination set are ignored.
+     */
+    void appendNewOnly(const NotePairs *src);
+
     /**
      * Returns a comma separated list of notes with key 'noteKey'.
      * Use findFirst instead when a unique kv-pair is needed.
index 355e2ccdc133a082085449c838c672f7703e5305..541ef04b11b43f5aef387b0396f0bd612ef1e50f 100644 (file)
@@ -68,8 +68,8 @@
  */
 
 #include "squid.h"
-#include "Store.h"
 #include "MemBuf.h"
+#include "Store.h"
 
 /* local types */
 
index 22ea60152a8183096979e352945c6a9daecd26d4..6f2141a3e5c2322c4b105e8e182b73123625ac7e 100644 (file)
@@ -34,9 +34,9 @@
 #include "cache_cf.h"
 #include "compat/strtoll.h"
 #include "ConfigParser.h"
-#include "Parsing.h"
-#include "globals.h"
 #include "Debug.h"
+#include "globals.h"
+#include "Parsing.h"
 
 /*
  * These functions is the same as atoi/l/f, except that they check for errors
index 2328279930b6de9373eb131437c4da4f9b9429ce..f58885edec8a8386a89bbe9388de553e1489ca5a 100644 (file)
 #ifndef   SQUID_PEERSELECTSTATE_H
 #define   SQUID_PEERSELECTSTATE_H
 
+#include "AccessLogEntry.h"
 #include "acl/Checklist.h"
 #include "base/Vector.h"
 #include "cbdata.h"
 #include "comm/forward.h"
 #include "hier_code.h"
-#include "PingData.h"
 #include "ip/Address.h"
+#include "PingData.h"
 
 class HttpRequest;
 class StoreEntry;
@@ -47,7 +48,7 @@ class ErrorState;
 
 typedef void PSC(Comm::ConnectionList *, ErrorState *, void *);
 
-void peerSelect(Comm::ConnectionList *, HttpRequest *, StoreEntry *, PSC *, void *data);
+void peerSelect(Comm::ConnectionList *, HttpRequest *, AccessLogEntry::Pointer const&, StoreEntry *, PSC *, void *data);
 void peerSelectInit(void);
 
 /**
@@ -79,6 +80,7 @@ public:
     const char * url() const;
 
     HttpRequest *request;
+    AccessLogEntry::Pointer al; ///< info for the future access.log entry
     StoreEntry *entry;
     allow_t always_direct;
     allow_t never_direct;
index d14e1f1e8656c5b1337cfe65a39c5aab9aa02c27..49d4e9f0af9b8296d22d9f72230e498518458dbb 100644 (file)
@@ -29,6 +29,8 @@
  *
  */
 
+#include "compat/GnuRegex.h"
+
 /// a representation of a refresh pattern. Currently a POD.
 class RefreshPattern
 {
index db745a1672f64238a6a9af1fb3a52aa3f13cb4c4..26480b8dcdcedb001e6912422c7ae66d37683fd6 100644 (file)
@@ -31,6 +31,7 @@
 #include "Debug.h"
 #include "OutOfBoundsException.h"
 #include "SBuf.h"
+#include "SBufDetailedStats.h"
 #include "SBufExceptions.h"
 #include "util.h"
 
@@ -148,6 +149,7 @@ SBuf::~SBuf()
 {
     debugs(24, 8, id << " destructed");
     --stats.live;
+    recordSBufSizeAtDestruct(len_);
 }
 
 MemBlob::Pointer
diff --git a/src/SBufDetailedStats.cc b/src/SBufDetailedStats.cc
new file mode 100644 (file)
index 0000000..52dec38
--- /dev/null
@@ -0,0 +1,47 @@
+#include "squid.h"
+#include "SBufDetailedStats.h"
+#include "StatHist.h"
+
+/*
+ * Implementation note: the purpose of this construct is to avoid adding
+ * external dependencies to the SBuf code
+ */
+
+static StatHist sbufDestructTimeStats;
+static StatHist memblobDestructTimeStats;
+
+namespace SBufDetailedStatsHistInitializer {
+    // run the post-instantiation initialization methods for StatHist objects
+    struct Initializer
+    {
+        Initializer() {
+            sbufDestructTimeStats.logInit(300,30.0,128000.0);
+            memblobDestructTimeStats.logInit(300,30.0,128000.0);
+        }
+    };
+    Initializer initializer;
+}
+
+void
+recordSBufSizeAtDestruct(SBuf::size_type sz)
+{
+    sbufDestructTimeStats.count(static_cast<double>(sz));
+}
+
+const StatHist *
+collectSBufDestructTimeStats()
+{
+    return &sbufDestructTimeStats;
+}
+
+void
+recordMemBlobSizeAtDestruct(SBuf::size_type sz)
+{
+    memblobDestructTimeStats.count(static_cast<double>(sz));
+}
+
+const StatHist *
+collectMemBlobDestructTimeStats()
+{
+    return &memblobDestructTimeStats;
+}
diff --git a/src/SBufDetailedStats.h b/src/SBufDetailedStats.h
new file mode 100644 (file)
index 0000000..8f8c6a1
--- /dev/null
@@ -0,0 +1,27 @@
+
+#ifndef SQUID_SBUFDETAILEDSTATS_H
+#define SQUID_SBUFDETAILEDSTATS_H
+
+#include "SBuf.h"
+
+class StatHist;
+
+/// Record the size a SBuf had when it was destructed
+void recordSBufSizeAtDestruct(SBuf::size_type sz);
+
+/** Collect the SBuf size-at-destruct-time histogram
+ *
+ * \note the returned StatHist object must not be freed
+ */
+const StatHist * collectSBufDestructTimeStats();
+
+/// Record the size a MemBlob had when it was destructed
+void recordMemBlobSizeAtDestruct(MemBlob::size_type sz);
+
+/** Collect the MemBlob size-at-destruct-time histogram
+ *
+ * \note the returned StatHist object must not be freed
+ */
+const StatHist * collectMemBlobDestructTimeStats();
+
+#endif /* SQUID_SBUFDETAILEDSTATS_H */
index 7fb34d47e53e6cbd927c2f29158261a04ab9ca3f..2484dd67a28af619d0e4c224f1a421cd988f7b0e 100644 (file)
@@ -30,6 +30,7 @@
 #include "ipc/Messages.h"
 #include "ipc/TypedMsgHdr.h"
 #include "mgr/Registration.h"
+#include "SBufDetailedStats.h"
 #include "SBufStatsAction.h"
 #include "StoreEntryStream.h"
 
@@ -48,6 +49,8 @@ SBufStatsAction::add(const Mgr::Action& action)
 {
     sbdata += dynamic_cast<const SBufStatsAction&>(action).sbdata;
     mbdata += dynamic_cast<const SBufStatsAction&>(action).mbdata;
+    sbsizesatdestruct += dynamic_cast<const SBufStatsAction&>(action).sbsizesatdestruct;
+    mbsizesatdestruct += dynamic_cast<const SBufStatsAction&>(action).mbsizesatdestruct;
 }
 
 void
@@ -55,17 +58,24 @@ SBufStatsAction::collect()
 {
     sbdata = SBuf::GetStats();
     mbdata = MemBlob::GetStats();
+    sbsizesatdestruct = *collectSBufDestructTimeStats();
+    mbsizesatdestruct = *collectMemBlobDestructTimeStats();
 }
 
 void
 SBufStatsAction::dump(StoreEntry* entry)
 {
     StoreEntryStream ses(entry);
+    ses << "\n\n\nThese statistics are experimental; their format and contents "
+        "should not be relied upon, they are bound to change as "
+        "the SBuf feature is evolved\n";
     sbdata.dump(ses);
     mbdata.dump(ses);
-    ses << "\n\n\nThese statistics are experimental; their format and contents "
-    "should not be relied upon, they are bound to change as "
-    "the SBuf feature is evolved";
+    ses << "\n";
+    ses << "SBuf size distribution at destruct time:\n";
+    sbsizesatdestruct.dump(entry,NULL);
+    ses << "MemBlob size distribution at destruct time:\n";
+    mbsizesatdestruct.dump(entry,NULL);
 }
 
 void
index 629277305d8e8bdb493ef6397686337d9fec2036..f7feae6bbe08b01e7786f00de9c20d07ca28e7b3 100644 (file)
@@ -31,6 +31,7 @@
 
 #include "mgr/Action.h"
 #include "SBuf.h"
+#include "StatHist.h"
 
 class StoreEntry;
 
@@ -55,6 +56,8 @@ private:
 
     SBufStats sbdata;
     MemBlobStats mbdata;
+    StatHist sbsizesatdestruct;
+    StatHist mbsizesatdestruct;
 };
 
 #endif /* SQUID_SBUFSTATSACTION_H */
index 39ed4fe0f69b6e48f379735fdad362fb99b8d85b..9c7fe1e6a01cecee41f599fc7e6c9213719c4e35 100644 (file)
 #include "comm/Connection.h"
 #include "comm/forward.h"
 #include "comm/Write.h"
-#include "fd.h"
 #include "err_detail_type.h"
 #include "errorpage.h"
+#include "fd.h"
+#include "HttpHdrContRange.h"
 #include "HttpReply.h"
 #include "HttpRequest.h"
 #include "Server.h"
@@ -525,6 +526,11 @@ ServerStateData::haveParsedReplyHeaders()
 {
     Must(theFinalReply);
     maybePurgeOthers();
+
+    // adaptation may overwrite old offset computed using the virgin response
+    const bool partial = theFinalReply->content_range &&
+                         theFinalReply->sline.status() == Http::scPartialContent;
+    currentOffset = partial ? theFinalReply->content_range->spec.offset : 0;
 }
 
 HttpRequest *
@@ -555,7 +561,7 @@ ServerStateData::startAdaptation(const Adaptation::ServiceGroupPointer &group, H
     }
 
     adaptedHeadSource = initiateAdaptation(
-                            new Adaptation::Iterator(vrep, cause, group));
+                            new Adaptation::Iterator(vrep, cause, fwd->al, group));
     startedAdaptation = initiated(adaptedHeadSource);
     Must(startedAdaptation);
 }
@@ -918,7 +924,7 @@ ServerStateData::adaptOrFinalizeReply()
     // The callback can be called with a NULL service if adaptation is off.
     adaptationAccessCheckPending = Adaptation::AccessCheck::Start(
                                        Adaptation::methodRespmod, Adaptation::pointPreCache,
-                                       originalRequest(), virginReply(), this);
+                                       originalRequest(), virginReply(), fwd->al, this);
     debugs(11,5, HERE << "adaptationAccessCheckPending=" << adaptationAccessCheckPending);
     if (adaptationAccessCheckPending)
         return;
index c02c54c924b18d667e7e2b82ec19f96f8556c34b..2633e8f8f317f9cecbab6e93e88f3e3b08376d95 100644 (file)
@@ -32,8 +32,8 @@
 #ifndef SQUID_SERVER_H
 #define SQUID_SERVER_H
 
-#include "BodyPipe.h"
 #include "base/AsyncJob.h"
+#include "BodyPipe.h"
 #include "CommCalls.h"
 #include "FwdState.h"
 #include "StoreIOBuffer.h"
index a2bafb24dc93e909cd37b622e30f36b3ac971acf..35855a908f09893bf7c403721f053cc8c35d060c 100644 (file)
@@ -326,6 +326,7 @@ public:
         int check_hostnames;
         int allow_underscore;
         int via;
+        int cache_miss_revalidate;
         int emailErrData;
         int httpd_suppress_version_string;
         int global_internal_static;
index 7be3f7170d66ae9c1f7bdf0752a6ca997c01b534..e8f69f3c3b32030a59f2057eb387b722736755a1 100644 (file)
@@ -53,7 +53,7 @@ public:
     ~String();
 
     typedef size_t size_type; //storage size intentionally unspecified
-    const static size_type npos = std::string::npos;
+    const static size_type npos = -1;
 
     String &operator =(char const *);
     String &operator =(String const &);
@@ -71,14 +71,6 @@ public:
     /// throws when size() > MAXINT
     int psize() const;
 
-    /**
-     * \retval true the String has some contents
-     */
-    _SQUID_INLINE_ bool defined() const;
-    /**
-     * \retval true the String does not hold any contents
-     */
-    _SQUID_INLINE_ bool undefined() const;
     /**
      * Returns a raw pointer to the underlying backing store. The caller has been
      * verified not to make any assumptions about null-termination
@@ -121,6 +113,9 @@ private:
     void allocBuffer(size_type sz);
     void setBuffer(char *buf, size_type sz);
 
+    bool defined() const {return buf_!=NULL;}
+    bool undefined() const {return !defined();}
+
     _SQUID_INLINE_ bool nilCmp(bool, bool, int &) const;
 
     /* never reference these directly! */
index 6523d393d06a958946630396efc6f167d53b7006..f22573b623600cb2f91f2914164b60c969226aa6 100644 (file)
@@ -205,6 +205,26 @@ StatHist::dump(StoreEntry * sentry, StatHistBinDumper * bd) const
     }
 }
 
+StatHist &
+StatHist::operator += (const StatHist &B)
+{
+    Must(capacity_ == B.capacity_);
+    Must(min_ == B.min_);
+    Must(max_ == B.max_);
+
+    if (B.bins == NULL) { // B was not yet initializted
+        return *this;
+    }
+    if (bins == NULL) { // this histogram was not yet initialized
+        *this = B;
+        return *this;
+    }
+    for (unsigned int i = 0; i < capacity_; ++i) {
+        bins[i] += B.bins[i];
+    }
+    return *this;
+}
+
 /* log based histogram */
 double
 Math::Log(double x)
index 8f28ae4496cb574f7ae334c54af164ea44744bba..014d745b5ede434d0748cb4c32277e8acb55c0c6 100644 (file)
@@ -73,23 +73,36 @@ public:
      *  this and the supplied histogram.
      */
     double deltaPctile(const StatHist &B, double pctile) const;
+
     /** obtain the output-transformed value from the specified bin
      *
      */
     double val(unsigned int bin) const;
+
     /** increment the counter for the histogram entry
      * associated to the supplied value
      */
     void count(double val);
+
     /** iterate the supplied bd function over the histogram values
      */
     void dump(StoreEntry *sentry, StatHistBinDumper * bd) const;
+
     /** Initialize the Histogram using a logarithmic values distribution
      */
     void logInit(unsigned int capacity, double min, double max);
+
     /** initialize the histogram to count occurrences in an enum-represented set
      */
     void enumInit(unsigned int last_enum);
+
+    /** Import values from another histogram
+     *
+     * \note: the two histograms MUST have the same capicity, min and max or
+     *      an exception will be raised
+     */
+    StatHist &operator += (const StatHist &B);
+
 protected:
     /** low-level initialize function. called by *Init high-level functions
      * \note Important restrictions on val_in and val_out functions:
@@ -103,16 +116,21 @@ protected:
      *  See log and linear based histograms for examples
      */
     void init(unsigned int capacity, hbase_f * val_in, hbase_f * val_out, double min, double max);
+
     /// find what entry in the histogram corresponds to v, by applying
     /// the preset input transformation function
     unsigned int findBin(double v);
+
     /// the histogram counters
     bins_type *bins;
     unsigned int capacity_;
+
     /// minimum value to be stored, corresponding to the first bin
     double min_;
+
     /// value of the maximum counter in the histogram
     double max_;
+
     /// scaling factor when looking for a bin
     double scale_;
     hbase_f *val_in;        /* e.g., log() for log-based histogram */
index f84e97d99362422a57b29571a54743d01090ae0d..01add65b160b7934b84b93a6ce6e7b8d7d540edb 100644 (file)
@@ -30,8 +30,8 @@
  *
  */
 
-#include "MemObject.h"
 #include "HttpReply.h"
+#include "MemObject.h"
 
 /**
  \retval true  Store contains 0 bytes of data.
index 7aa5a6f9166d63de3456b7e449fed9be21da7cf6..d26bb881fe3de7d764eb42bf1f0e790c7a6974bd 100644 (file)
@@ -34,8 +34,8 @@
 #define SQUID_STOREIOBUFFER_H
 
 /* TODO: move this and the range() method into a .cci */
-#include "Range.h"
 #include "MemBuf.h"
+#include "Range.h"
 
 class StoreIOBuffer
 {
index a31caf95ea684c699c10c04c6029b6c5fc07b626..801092f2cf54f897486c438ae217327a5ed1469e 100644 (file)
  */
 
 #include "squid.h"
-#include "StoreMeta.h"
-#include "Store.h"
 #include "MemObject.h"
+#include "Store.h"
+#include "StoreMeta.h"
 #include "StoreMetaMD5.h"
-#include "StoreMetaURL.h"
+#include "StoreMetaObjSize.h"
 #include "StoreMetaSTD.h"
 #include "StoreMetaSTDLFS.h"
+#include "StoreMetaURL.h"
 #include "StoreMetaVary.h"
-#include "StoreMetaObjSize.h"
 
 bool
 StoreMeta::validType(char type)
index dab727f8f51fb5f179e06c9d5670d8da8acd9549..ad0e7cb446159ba7ae5e220e529fdb29d78ee022 100644 (file)
@@ -30,8 +30,8 @@
 #ifndef SQUID_STOREMETAOBJSIZE_H
 #define SQUID_STOREMETAOBJSIZE_H
 
-#include "StoreMeta.h"
 #include "MemPool.h"
+#include "StoreMeta.h"
 
 class StoreMetaObjSize : public StoreMeta
 {
index c586cf67bcbae5997e44a66b4fc4c669c133283b..b85cd1d489930090343dd7524b94e24b20e964a4 100644 (file)
@@ -32,9 +32,9 @@
  */
 
 #include "squid.h"
-#include "StoreMetaSTD.h"
-#include "Store.h"
 #include "MemObject.h"
+#include "Store.h"
+#include "StoreMetaSTD.h"
 
 bool
 StoreMetaSTD::validLength(int len) const
index a8bec28aa93c022b3323fc09861d86665fac1c5a..7fc6e3c5dc8229c603c15dcdf08dccbf6496e929 100644 (file)
@@ -31,9 +31,9 @@
  */
 
 #include "squid.h"
-#include "StoreMetaSTDLFS.h"
-#include "Store.h"
 #include "MemObject.h"
+#include "Store.h"
+#include "StoreMetaSTDLFS.h"
 
 bool
 StoreMetaSTDLFS::validLength(int len) const
index 9ad9d292c5c435797471f31025879e8ec826d229..e4302d1c0d79c05bb51cb93b0b0f02b248db4614 100644 (file)
@@ -32,9 +32,9 @@
  */
 
 #include "squid.h"
-#include "StoreMetaURL.h"
-#include "Store.h"
 #include "MemObject.h"
+#include "Store.h"
+#include "StoreMetaURL.h"
 
 bool
 StoreMetaURL::checkConsistency(StoreEntry *e) const
index 2fb97f53cd67e301aa55f58e9a06b2cae904cc6d..62a163c495de5fdff808c378640ea617c256e4d9 100644 (file)
  */
 
 #include "squid.h"
-#include "defines.h"
 #include "Debug.h"
-#include "StoreMetaUnpacker.h"
+#include "defines.h"
 #include "StoreMeta.h"
+#include "StoreMetaUnpacker.h"
 
 int const StoreMetaUnpacker::MinimumBufferLength = sizeof(char) + sizeof(int);
 
index 995a1a9679868c577fd8e8d652dcf6fc68edbbc5..84380db916701d2b606954ab21ed58d1d988ae5c 100644 (file)
@@ -32,9 +32,9 @@
  */
 
 #include "squid.h"
-#include "StoreMetaVary.h"
-#include "Store.h"
 #include "MemObject.h"
+#include "Store.h"
+#include "StoreMetaVary.h"
 
 bool
 StoreMetaVary::checkConsistency(StoreEntry *e) const
index 5c1d062c5f3491ddb8065ae87493a2674f7df795..3998db33edf796cc4d597c46e66029d85605a94a 100644 (file)
@@ -4,8 +4,8 @@
  */
 
 #include "squid.h"
-#include "tools.h"
 #include "StoreStats.h"
+#include "tools.h"
 
 /* StoreInfoStats */
 
index 131f1b3391f47f2072a3c345d3b615a82c6e1162..31107015dd4e3d8dee1b86a76b008725e1ab5828 100644 (file)
@@ -53,16 +53,6 @@ String::size() const
     return len_;
 }
 
-bool String::defined() const
-{
-    return buf_!=NULL;
-}
-
-bool String::undefined() const
-{
-    return buf_==NULL;
-}
-
 char const *
 String::rawBuf() const
 {
index 8f023fa71bce7f06fe54e4ac3e1994eba417f5cd..815812a0045e950ef4cffb4014b9082b7e44c751 100644 (file)
  */
 
 #include "squid.h"
+#include "Debug.h"
+#include "globals.h"
 #include "protos.h"
+#include "SquidConfig.h"
 
 #if _SQUID_WINDOWS_
 #ifndef _MSWSOCK_
 
 /* forward declarations */
 static void WIN32_Exit(void);
-static void WIN32_Abort(int);
-
 static unsigned int GetOSVersion();
 void WIN32_svcstatusupdate(DWORD, DWORD);
 void WINAPI WIN32_svcHandler(DWORD);
+extern "C" void WINAPI SquidWinSvcMain(DWORD, char **);
+
 #if USE_WIN32_SERVICE
+static void WIN32_Abort(int);
 static int WIN32_StoreKey(const char *, DWORD, unsigned char *, int);
 static int WIN32_create_key(void);
 static void WIN32_build_argv (char *);
 #endif
-extern "C" void WINAPI SquidWinSvcMain(DWORD, char **);
 
 #if defined(_MSC_VER) /* Microsoft C Compiler ONLY */
 void Squid_Win32InvalidParameterHandler(const wchar_t*, const wchar_t*, const wchar_t*, unsigned int, uintptr_t);
@@ -68,8 +71,6 @@ void WIN32_ExceptionHandlerCleanup(void);
 static int s_iInitCount = 0;
 static HANDLE NotifyAddrChange_thread = INVALID_HANDLE_VALUE;
 
-static int Squid_Aborting = 0;
-
 #undef NotifyAddrChange
 typedef DWORD(WINAPI * PFNotifyAddrChange) (OUT PHANDLE, IN LPOVERLAPPED);
 #define NOTIFYADDRCHANGE "NotifyAddrChange"
@@ -108,6 +109,8 @@ static char *keys[] = {
     NULL,          /* key[3] */
     NULL           /* key[4] */
 };
+
+static int Squid_Aborting = 0;
 #endif
 
 /* ====================================================================== */
@@ -388,17 +391,16 @@ GetVerError:
 /* PUBLIC FUNCTIONS */
 /* ====================================================================== */
 
+#if USE_WIN32_SERVICE
 void
 WIN32_Abort(int sig)
 {
-#if USE_WIN32_SERVICE
     svcStatus.dwWin32ExitCode = ERROR_SERVICE_SPECIFIC_ERROR;
     svcStatus.dwServiceSpecificExitCode = 1;
-#endif
-
     Squid_Aborting = 1;
     WIN32_Exit();
 }
+#endif
 
 void
 WIN32_IpAddrChangeMonitorExit()
@@ -924,6 +926,7 @@ int main(int argc, char **argv)
     char *c;
     char stderr_path[256];
 
+    SetErrorMode(SEM_NOGPFAULTERRORBOX);
     if ((argc == 2) && strstr(argv[1], _WIN_SQUID_SERVICE_OPTION)) {
         strcpy(stderr_path, argv[0]);
         strcat(stderr_path,".log");
index c690b8b330a382f5695f24e016914e6cda718a6a..ebe87390f3599f12cb1e01ee5713bdc91da20595 100644 (file)
@@ -295,13 +295,11 @@ ACL::ParseAclLine(ConfigParser &parser, ACL ** head)
                A->cfgline);
     }
 
-    /* append */
+    // prepend so that ACLs declared later (and possibly using earlier ACLs)
+    // are destroyed earlier (before the ACLs they use are destroyed)
     assert(head && *head == Config.aclList);
     A->registered = true;
-
-    while (*head)
-        head = &(*head)->next;
-
+    A->next = *head;
     *head = A;
 }
 
index 6b82937f44afe2631f5190e952eb94896174f1fc..dc61d568f4207226edbd25842c6b2a7572c10d6b 100644 (file)
@@ -135,7 +135,7 @@ public:
 
     char name[ACL_NAME_SZ];
     char *cfgline;
-    ACL *next;
+    ACL *next; // XXX: remove or at least use refcounting
     ACLFlags flags; ///< The list of given ACL flags
     bool registered; ///< added to Config.aclList and can be reused via by FindByName()
 
@@ -244,6 +244,7 @@ public:
 MEMPROXY_CLASS_INLINE(acl_proxy_auth_match_cache);
 
 /// \ingroup ACLAPI
+/// XXX: find a way to remove or at least use a refcounted ACL pointer
 extern const char *AclMatchedName;     /* NULL */
 
 #endif /* SQUID_ACL_H */
index ead7b36e4c8e2e3f6f0e8977b9a5c2dfccd8720b..7e69f644c1d76b0308bbe8cc008723dcec3f23c4 100644 (file)
@@ -29,8 +29,8 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
  */
 
-#include "ip/Address.h"
 #include "acl/Acl.h"
+#include "ip/Address.h"
 
 /// list of address-based ACLs. Currently a POD.
 class AclAddress
diff --git a/src/acl/AdaptationService.cc b/src/acl/AdaptationService.cc
new file mode 100644 (file)
index 0000000..8ee04bc
--- /dev/null
@@ -0,0 +1,34 @@
+#include "squid.h"
+#include "acl/AdaptationService.h"
+#include "acl/Checklist.h"
+#include "acl/IntRange.h"
+#include "adaptation/Config.h"
+#include "adaptation/History.h"
+#include "HttpRequest.h"
+
+int
+ACLAdaptationServiceStrategy::match (ACLData<MatchType> * &data, ACLFilledChecklist *checklist, ACLFlags &)
+{
+    HttpRequest::Pointer request = checklist->request;
+    if (request == NULL)
+        return 0;
+    Adaptation::History::Pointer ah = request->adaptHistory();
+    if (ah == NULL)
+        return 0;
+
+    Adaptation::History::AdaptationServices::iterator it;
+    for (it = ah->theAdaptationServices.begin(); it != ah->theAdaptationServices.end(); ++it) {
+        if (data->match(it->c_str()))
+            return 1;
+    }
+
+    return 0;
+}
+
+ACLAdaptationServiceStrategy *
+ACLAdaptationServiceStrategy::Instance()
+{
+    return &Instance_;
+}
+
+ACLAdaptationServiceStrategy ACLAdaptationServiceStrategy::Instance_;
diff --git a/src/acl/AdaptationService.h b/src/acl/AdaptationService.h
new file mode 100644 (file)
index 0000000..630c605
--- /dev/null
@@ -0,0 +1,35 @@
+#ifndef SQUID_ACLADAPTATIONSERVICE_H
+#define SQUID_ACLADAPTATIONSERVICE_H
+
+#include "acl/Strategised.h"
+#include "acl/Strategy.h"
+
+/// \ingroup ACLAPI
+class ACLAdaptationServiceStrategy : public ACLStrategy<const char *>
+{
+
+public:
+    virtual int match (ACLData<MatchType> * &, ACLFilledChecklist *, ACLFlags &);
+    static ACLAdaptationServiceStrategy *Instance();
+    /**
+     * Not implemented to prevent copies of the instance.
+     */
+    ACLAdaptationServiceStrategy(ACLAdaptationServiceStrategy const &);
+
+private:
+    static ACLAdaptationServiceStrategy Instance_;
+    ACLAdaptationServiceStrategy() {}
+
+    ACLAdaptationServiceStrategy &operator = (ACLAdaptationServiceStrategy const &);
+};
+
+/// \ingroup ACLAPI
+class ACLAdaptationService
+{
+
+private:
+    static ACL::Prototype RegistryProtoype;
+    static ACLStrategised<const char *> RegistryEntry_;
+};
+
+#endif /* SQUID_ACLADAPTATIONSERVICE_H */
diff --git a/src/acl/AdaptationServiceData.cc b/src/acl/AdaptationServiceData.cc
new file mode 100644 (file)
index 0000000..90b32ed
--- /dev/null
@@ -0,0 +1,39 @@
+#include "squid.h"
+#include "acl/AdaptationServiceData.h"
+#include "acl/Checklist.h"
+#include "adaptation/Config.h"
+#include "adaptation/ecap/Config.h"
+#include "adaptation/icap/Config.h"
+#include "adaptation/Service.h"
+#include "adaptation/ServiceGroups.h"
+#include "cache_cf.h"
+#include "ConfigParser.h"
+#include "Debug.h"
+#include "wordlist.h"
+
+void
+ACLAdaptationServiceData::parse()
+{
+    Adaptation::Config::needHistory = true;
+    while (char *t = ConfigParser::strtokFile()) {
+        if (
+#if USE_ECAP
+            Adaptation::Ecap::TheConfig.findServiceConfig(t) == NULL &&
+#endif
+#if ICAP_CLIENT
+            Adaptation::Icap::TheConfig.findServiceConfig(t) == NULL &&
+#endif
+            Adaptation::FindGroup(t) == NULL) {
+            debugs(28, DBG_CRITICAL, "FATAL: Adaptation service/group " << t << " in adaptation_service acl is not defined");
+            self_destruct();
+        }
+        insert(t);
+    }
+}
+
+ACLData<char const *> *
+ACLAdaptationServiceData::clone() const
+{
+    return new ACLAdaptationServiceData(*this);
+}
+
diff --git a/src/acl/AdaptationServiceData.h b/src/acl/AdaptationServiceData.h
new file mode 100644 (file)
index 0000000..266e59d
--- /dev/null
@@ -0,0 +1,21 @@
+
+#ifndef SQUID_ADAPTATIONSERVICEDATA_H
+#define SQUID_ADAPTATIONSERVICEDATA_H
+
+#include "acl/Acl.h"
+#include "acl/Data.h"
+#include "acl/StringData.h"
+
+/// \ingroup ACLAPI
+class ACLAdaptationServiceData : public ACLStringData
+{
+public:
+    ACLAdaptationServiceData() : ACLStringData() {}
+    ACLAdaptationServiceData(ACLAdaptationServiceData const &old) : ACLStringData(old) {};
+    // Not implemented
+    ACLAdaptationServiceData &operator= (ACLAdaptationServiceData const &);
+    virtual void parse();
+    virtual ACLData<char const *> *clone() const;
+};
+
+#endif /* SQUID_ADAPTATIONSERVICEDATA_H */
index 3e4cc326002de7310e5982ce4b02dafb9aa3ef6e..876535602de2a876bbed26f586b645ec916cf2fc 100644 (file)
@@ -1,7 +1,7 @@
 #include "squid.h"
 #include "acl/AllOf.h"
-#include "acl/Checklist.h"
 #include "acl/BoolOps.h"
+#include "acl/Checklist.h"
 #include "globals.h"
 #include "MemBuf.h"
 
index 00c313ad6d667ec0b40b6e9be862deeaefa903ba..5ef8091232eec75a98c684fac8484c55000b06a0 100644 (file)
@@ -89,17 +89,45 @@ struct as_info {
     time_t expires;            /* NOTUSED */
 };
 
-struct ASState {
+class ASState
+{
+public:
+    ASState();
+    ~ASState();
+
     StoreEntry *entry;
     store_client *sc;
-    HttpRequest *request;
+    HttpRequest::Pointer request;
     int as_number;
     int64_t offset;
     int reqofs;
     char reqbuf[AS_REQBUF_SZ];
     bool dataRead;
+private:
+    CBDATA_CLASS2(ASState);
 };
 
+CBDATA_CLASS_INIT(ASState);
+
+ASState::ASState() :
+        entry(NULL),
+        sc(NULL),
+        request(NULL),
+        as_number(0),
+        offset(0),
+        reqofs(0),
+        dataRead(false)
+{
+    memset(reqbuf, 0, AS_REQBUF_SZ);
+}
+
+ASState::~ASState()
+{
+    debugs(53, 3, entry->url());
+    storeUnregister(sc, entry, this);
+    entry->unlock();
+}
+
 /** entry into the radix tree */
 struct rtentry_t {
     struct squid_radix_node e_nodes[2];
@@ -127,8 +155,6 @@ extern "C" {
 
 void asnAclInitialize(ACL * acls);
 
-static void asStateFree(void *data);
-
 static void destroyRadixNodeInfo(as_info *);
 
 static OBJH asnStats;
@@ -197,13 +223,11 @@ asnRegisterWithCacheManager(void)
 
 SQUIDCEXTERN int squid_max_keylen;     /* yuck.. this is in lib/radix.c */
 
-CBDATA_TYPE(ASState);
 void
 asnInit(void)
 {
     static bool inited = false;
     squid_max_keylen = 40;
-    CBDATA_INIT_TYPE(ASState);
 
     if (!inited) {
         inited = true;
@@ -237,35 +261,25 @@ asnCacheStart(int as)
 {
     LOCAL_ARRAY(char, asres, 4096);
     StoreEntry *e;
-    ASState *asState;
-    asState = cbdataAlloc(ASState);
-    asState->dataRead = 0;
-    debugs(53, 3, "asnCacheStart: AS " << as);
+    ASState *asState = new ASState;
+    debugs(53, 3, "AS " << as);
     snprintf(asres, 4096, "whois://%s/!gAS%d", Config.as_whois_server, as);
     asState->as_number = as;
     asState->request = HttpRequest::CreateFromUrl(asres);
-    assert(NULL != asState->request);
-    HTTPMSGLOCK(asState->request);
+    assert(asState->request != NULL);
 
     if ((e = storeGetPublic(asres, Http::METHOD_GET)) == NULL) {
         e = storeCreateEntry(asres, asres, RequestFlags(), Http::METHOD_GET);
         asState->sc = storeClientListAdd(e, asState);
-        FwdState::fwdStart(Comm::ConnectionPointer(), e, asState->request);
+        FwdState::fwdStart(Comm::ConnectionPointer(), e, asState->request.getRaw());
     } else {
-
         e->lock();
         asState->sc = storeClientListAdd(e, asState);
     }
 
     asState->entry = e;
-    asState->offset = 0;
-    asState->reqofs = 0;
     StoreIOBuffer readBuffer (AS_REQBUF_SZ, asState->offset, asState->reqbuf);
-    storeClientCopy(asState->sc,
-                    e,
-                    readBuffer,
-                    asHandleReply,
-                    asState);
+    storeClientCopy(asState->sc, e, readBuffer, asHandleReply, asState);
 }
 
 static void
@@ -284,21 +298,21 @@ asHandleReply(void *data, StoreIOBuffer result)
     /* First figure out whether we should abort the request */
 
     if (EBIT_TEST(e->flags, ENTRY_ABORTED)) {
-        asStateFree(asState);
+        delete asState;
         return;
     }
 
     if (result.length == 0 && asState->dataRead) {
-        debugs(53, 3, "asHandleReply: Done: " << e->url()  );
-        asStateFree(asState);
+        debugs(53, 3, "asHandleReply: Done: " << e->url());
+        delete asState;
         return;
     } else if (result.flags.error) {
         debugs(53, DBG_IMPORTANT, "asHandleReply: Called with Error set and size=" << (unsigned int) result.length);
-        asStateFree(asState);
+        delete asState;
         return;
     } else if (e->getReply()->sline.status() != Http::scOkay) {
         debugs(53, DBG_IMPORTANT, "WARNING: AS " << asState->as_number << " whois request failed");
-        asStateFree(asState);
+        delete asState;
         return;
     }
 
@@ -326,7 +340,7 @@ asHandleReply(void *data, StoreIOBuffer result)
         debugs(53, 3, "asHandleReply: AS# " << s << " (" << asState->as_number << ")");
         asnAddNet(s, asState->as_number);
         s = t + 1;
-        asState->dataRead = 1;
+        asState->dataRead = true;
     }
 
     /*
@@ -377,17 +391,6 @@ asHandleReply(void *data, StoreIOBuffer result)
     }
 }
 
-static void
-asStateFree(void *data)
-{
-    ASState *asState = (ASState *)data;
-    debugs(53, 3, "asnStateFree: " << asState->entry->url()  );
-    storeUnregister(asState->sc, asState->entry, asState);
-    asState->entry->unlock();
-    HTTPMSGUNLOCK(asState->request);
-    cbdataFree(asState);
-}
-
 /**
  * add a network (addr, mask) to the radix tree, with matching AS number
  */
index c49e8622296d281b61db7fef92d296f7d3c24ff4..d6932d78470ec5a47552591f7f7b437d9e12a609 100644 (file)
 #ifndef SQUID_ACLASN_H
 #define SQUID_ACLASN_H
 
+#include "acl/Checklist.h"
 #include "acl/Data.h"
-#include "CbDataList.h"
 #include "acl/Strategised.h"
-#include "acl/Checklist.h"
+#include "CbDataList.h"
 #include "ip/Address.h"
 
 int asnMatchIp(CbDataList<int> *, Ip::Address &);
index a09b143d0f31821c3b09f8c73173e00ee6d50d4a..36e746d254fe4e14c04fefb5674ff2805244d371 100644 (file)
@@ -33,8 +33,8 @@
  */
 
 #include "squid.h"
-#include "acl/Checklist.h"
 #include "acl/Browser.h"
+#include "acl/Checklist.h"
 #include "acl/RegexData.h"
 
 /* explicit template instantiation required for some systems */
index 16b0ca997d16515b14e958ffcdef148a34ff5fbf..74a27b061609d9d0bd17726f400b63a4de6cfcca 100644 (file)
 #if USE_SSL
 
 #include "acl/Certificate.h"
-#include "acl/Checklist.h"
 #include "acl/CertificateData.h"
-#include "HttpRequest.h"
+#include "acl/Checklist.h"
 #include "client_side.h"
 #include "fde.h"
 #include "globals.h"
+#include "HttpRequest.h"
 
 int
 ACLCertificateStrategy::match (ACLData<MatchType> * &data, ACLFilledChecklist *checklist, ACLFlags &)
index b9d0d0da16f7afd66825b09b5fd1e8625ca9b239..308eb92ff3eabf30d8d600d42abae637e6473eeb 100644 (file)
 #define SQUID_ACLCERTIFICATE_H
 
 #include "acl/Acl.h"
-#include "acl/Data.h"
 #include "acl/Checklist.h"
-#include "ssl/support.h"
+#include "acl/Data.h"
 #include "acl/Strategised.h"
+#include "ssl/support.h"
 
 /// \ingroup ACLAPI
 class ACLCertificateStrategy : public ACLStrategy<X509 *>
index 83b6ac3b1a63609a5440600d2f1478d36129aae2..d3ed5edf726981acb400ae716a6d8ef38bc409bb 100644 (file)
@@ -35,8 +35,8 @@
 #include "squid.h"
 #include "acl/CertificateData.h"
 #include "acl/Checklist.h"
-#include "Debug.h"
 #include "cache_cf.h"
+#include "Debug.h"
 #include "wordlist.h"
 
 ACLCertificateData::ACLCertificateData(Ssl::GETX509ATTRIBUTE *sslStrategy, const char *attrs, bool optionalAttr) : validAttributesStr(attrs), attributeIsOptional(optionalAttr), attribute (NULL), values (), sslAttributeCall (sslStrategy)
index 911f549bd67e486dff3ea7f8495067c65fe5ac8c..9ca261eb7d49177c3797ab389b02e5fbebe80110 100644 (file)
 #ifndef SQUID_ACLCERTIFICATEDATA_H
 #define SQUID_ACLCERTIFICATEDATA_H
 
-#include "splay.h"
 #include "acl/Acl.h"
 #include "acl/Data.h"
-#include "ssl/support.h"
 #include "acl/StringData.h"
+#include "splay.h"
+#include "ssl/support.h"
 #include <string>
 #include <list>
 
index 88244faec7ec7fdd1af0303834e76e3c883b8153..a5e1abd80b43cb16cf18e2a1e7680c9505322bf0 100644 (file)
  */
 
 #include "squid.h"
-#include "acl/DestinationDomain.h"
 #include "acl/Checklist.h"
-#include "acl/RegexData.h"
+#include "acl/DestinationDomain.h"
 #include "acl/DomainData.h"
+#include "acl/RegexData.h"
 #include "fqdncache.h"
 #include "HttpRequest.h"
 #include "ipcache.h"
index d772521fd6e58adffe04c400730eebf476127b91..7d2e4968aa0656680a239b097823242694b8ec96 100644 (file)
@@ -34,8 +34,8 @@
 #define SQUID_ACLDESTINATIONDOMAIN_H
 
 #include "acl/Acl.h"
-#include "acl/Data.h"
 #include "acl/Checklist.h"
+#include "acl/Data.h"
 #include "acl/Strategised.h"
 
 /// \ingroup ACLAPI
index 98716b89fd7b72124b5f591d4897cc5dc3004fda..b2f6e8be5a870a0dd8e117ec0174306b450f5290 100644 (file)
  */
 
 #include "squid.h"
-#include "acl/DomainData.h"
 #include "acl/Checklist.h"
+#include "acl/DomainData.h"
 #include "cache_cf.h"
 #include "Debug.h"
-#include "wordlist.h"
 #include "src/URL.h"
+#include "wordlist.h"
 
 template<class T>
 inline void
index 7e7e3b41be843dfa5ed33e0ee7138d8e2690f881..7839a8f75d9a6350685d54da8afa93bdfe896f1f 100644 (file)
@@ -33,9 +33,9 @@
 #ifndef SQUID_ACLDOMAINDATA_H
 #define SQUID_ACLDOMAINDATA_H
 
-#include "splay.h"
 #include "acl/Acl.h"
 #include "acl/Data.h"
+#include "splay.h"
 
 /// \ingroup ACLAPI
 class ACLDomainData : public ACLData<char const *>
index 9e8fa17ea41c7fe303e4990a589a2ba8abf27d1f..c02f799a4a1dde7f0d4fffb40d23fe256f49d2a5 100644 (file)
@@ -7,8 +7,8 @@
 #include "HttpRequest.h"
 #include "SquidConfig.h"
 #if USE_AUTH
-#include "auth/UserRequest.h"
 #include "auth/AclProxyAuth.h"
+#include "auth/UserRequest.h"
 #endif
 
 CBDATA_CLASS_INIT(ACLFilledChecklist);
index 05131181acdac9a1ad484a283dab65b4711a54cd..23b69b4f9ade516f00bfe4a3bfbee10511d38f94 100644 (file)
@@ -1,6 +1,7 @@
 #ifndef SQUID_ACLFILLED_CHECKLIST_H
 #define SQUID_ACLFILLED_CHECKLIST_H
 
+#include "AccessLogEntry.h"
 #include "acl/Checklist.h"
 #include "acl/forward.h"
 #include "ip/Address.h"
@@ -75,6 +76,8 @@ public:
     Ssl::X509_Pointer serverCert;
 #endif
 
+    AccessLogEntry::Pointer al; ///< info for the future access.log entry
+
     ExternalACLEntry *extacl_entry;
 
 private:
index 8d3c0a5681fea68cb9f3737a7487c85ae085ca04..e4e3e6b3bbacd51224b1eb7f07206466cfadcf4f 100644 (file)
 
 #include "squid.h"
 #include "acl/Acl.h"
-#include "acl/AclNameList.h"
 #include "acl/AclDenyInfoList.h"
+#include "acl/AclNameList.h"
 #include "acl/Checklist.h"
-#include "acl/Tree.h"
-#include "acl/Strategised.h"
 #include "acl/Gadgets.h"
+#include "acl/Strategised.h"
+#include "acl/Tree.h"
 #include "ConfigParser.h"
 #include "errorpage.h"
 #include "globals.h"
 err_type
 aclGetDenyInfoPage(AclDenyInfoList ** head, const char *name, int redirect_allowed)
 {
+    if (!name) {
+        debugs(28, 3, "ERR_NONE due to a NULL name");
+        return ERR_NONE;
+    }
+
     AclDenyInfoList *A = NULL;
 
     debugs(28, 8, HERE << "got called for " << name);
@@ -83,10 +88,12 @@ aclGetDenyInfoPage(AclDenyInfoList ** head, const char *name, int redirect_allow
 int
 aclIsProxyAuth(const char *name)
 {
-    debugs(28, 5, "aclIsProxyAuth: called for " << name);
-
-    if (NULL == name)
+    if (!name) {
+        debugs(28, 3, "false due to a NULL name");
         return false;
+    }
+
+    debugs(28, 5, "aclIsProxyAuth: called for " << name);
 
     ACL *a;
 
index a5a36f000050daee5e592061d1265bfc383ae616..be68d3335f7acf69a6d7feb82eb69f5defaa29d9 100644 (file)
@@ -1,8 +1,8 @@
 #ifndef SQUID_ACL_GADGETS_H
 #define SQUID_ACL_GADGETS_H
 
-#include "err_type.h"
 #include "acl/forward.h"
+#include "err_type.h"
 
 #if HAVE_SSTREAM
 #include <sstream>
index c691e78e51d3ac54df44fe26c2ab359623a504ac..0ed141f9c089d15654867841a4d76bbef2bc8c8a 100644 (file)
@@ -1,7 +1,7 @@
 #include "squid.h"
+#include "acl/Checklist.h"
 #include "acl/HierCode.h"
 #include "acl/HierCodeData.h"
-#include "acl/Checklist.h"
 #include "HttpRequest.h"
 
 /* explicit template instantiation required for some systems */
index ac9aac8d2a222a6e216fd88a882f8afe2951afdc..7b35eedddbb9201cff63f0aea8dbdc3cdfb7787b 100644 (file)
@@ -1,8 +1,8 @@
 #ifndef SQUID_ACLHIERCODE_H
 #define SQUID_ACLHIERCODE_H
 
-#include "acl/Strategy.h"
 #include "acl/Strategised.h"
+#include "acl/Strategy.h"
 #include "hier_code.h"
 
 /// \ingroup ACLAPI
index 8f6ec2c0dc87ff8c08cedc6af4498feed52fa69b..a5c224fc6996d91c79d0bad3c8d215eda1461443 100644 (file)
@@ -1,6 +1,6 @@
 #include "squid.h"
-#include "acl/HierCodeData.h"
 #include "acl/Checklist.h"
+#include "acl/HierCodeData.h"
 #include "cache_cf.h"
 #include "hier_code.h"
 #include "wordlist.h"
index d84633df05a7b21e2a5133e081128a359ef4f89a..904c80bed7df990a5cf0d63d6804f10dcc6116ae 100644 (file)
  */
 
 #include "squid.h"
-#include "acl/HttpHeaderData.h"
-#include "acl/Checklist.h"
 #include "acl/Acl.h"
+#include "acl/Checklist.h"
+#include "acl/HttpHeaderData.h"
 #include "acl/RegexData.h"
 #include "cache_cf.h"
-#include "Debug.h"
-#include "wordlist.h"
 #include "ConfigParser.h"
+#include "Debug.h"
 #include "HttpHeaderTools.h"
+#include "SBuf.h"
+#include "wordlist.h"
 
 /* Construct an ACLHTTPHeaderData that uses an ACLRegex rule with the value of the
  * selected header from a given request.
@@ -75,13 +76,8 @@ ACLHTTPHeaderData::match(HttpHeader* hdr)
             return false;
     }
 
-    // By now, we know the header is present, but:
-    // HttpHeader::get*() return an undefined String for empty header values;
-    // String::termedBuf() returns NULL for undefined Strings; and
-    // ACLRegexData::match() always fails on NULL strings.
-    // This makes it possible to detect an empty header value using regex:
-    const char *cvalue = value.defined() ? value.termedBuf() : "";
-    return regex_rule->match(cvalue);
+    SBuf cvalue(value);
+    return regex_rule->match(cvalue.c_str());
 }
 
 wordlist *
@@ -108,7 +104,7 @@ ACLHTTPHeaderData::parse()
 bool
 ACLHTTPHeaderData::empty() const
 {
-    return (hdrId == HDR_BAD_HDR && hdrName.undefined()) || regex_rule->empty();
+    return (hdrId == HDR_BAD_HDR && hdrName.size()==0) || regex_rule->empty();
 }
 
 ACLData<HttpHeader*> *
index d14daa29085c409c76b2c599b0c4404a532a0a30..a040e2407d9fe1da562e5aa25ab5cdedf72dd208 100644 (file)
@@ -32,9 +32,9 @@
  */
 
 #include "squid.h"
-#include "acl/HttpRepHeader.h"
-#include "acl/HttpHeaderData.h"
 #include "acl/Checklist.h"
+#include "acl/HttpHeaderData.h"
+#include "acl/HttpRepHeader.h"
 #include "HttpReply.h"
 
 int
index 1f019058a5f0677b4877855994729a91574a0de2..9f605631c6923d43b4ce9dcc5da0a630038c449e 100644 (file)
@@ -33,8 +33,8 @@
 #ifndef SQUID_ACLHTTPREPHEADER_H
 #define SQUID_ACLHTTPREPHEADER_H
 
-#include "acl/Strategy.h"
 #include "acl/Strategised.h"
+#include "acl/Strategy.h"
 #include "HttpHeader.h"
 
 /// \ingroup ACLAPI
index 49c701b04da6844b720b2ed0aa91a46320b59bdf..5c6acd2ab5cf1b32cc015b4db494b84fccbf82ac 100644 (file)
@@ -32,9 +32,9 @@
  */
 
 #include "squid.h"
-#include "acl/HttpReqHeader.h"
-#include "acl/HttpHeaderData.h"
 #include "acl/Checklist.h"
+#include "acl/HttpHeaderData.h"
+#include "acl/HttpReqHeader.h"
 #include "HttpRequest.h"
 
 int
index e805207ebe149f79c550cd9f664ce86eadc7a870..1f342eabca930995f0eb72cfd3ab62eb6ca07c6e 100644 (file)
@@ -33,8 +33,8 @@
 #ifndef SQUID_ACLHTTPREQHEADER_H
 #define SQUID_ACLHTTPREQHEADER_H
 
-#include "acl/Strategy.h"
 #include "acl/Strategised.h"
+#include "acl/Strategy.h"
 #include "HttpHeader.h"
 
 /// \ingroup ACLAPI
index a20120cfa926168f37ad35b81973ea5c50316381..f4e423ac43b20f2d2d2eb323666946764473c36b 100644 (file)
@@ -33,8 +33,8 @@
  */
 
 #include "squid.h"
-#include "acl/HttpStatus.h"
 #include "acl/FilledChecklist.h"
+#include "acl/HttpStatus.h"
 #include "cache_cf.h"
 #include "Debug.h"
 #include "HttpReply.h"
index 6f3b14446b85fe6c4fb90ad1266336e4b378b250..bd20dd5d258d6525e3bccafd06bbe587be73c801 100644 (file)
@@ -40,6 +40,7 @@ protected:
     /* ACL API */
     virtual int match(ACLChecklist *checklist);
 
+    // XXX: use refcounting instead of raw pointers
     std::vector<ACL*> nodes; ///< children nodes of this intermediate node
 };
 
index f0dc78fc783c30f1476ba88fe5e700397522eba0..40eeb67f14d58f6444f05e5b91f4cbe7d3103ae3 100644 (file)
@@ -36,8 +36,8 @@
 #include "acl/IntRange.h"
 #include "cache_cf.h"
 #include "Debug.h"
-#include "wordlist.h"
 #include "Parsing.h"
+#include "wordlist.h"
 
 /* explicit instantiation required for some systems */
 /** \cond AUTODOCS-IGNORE */
index 47dc027d46c153d33b6de8fcf32761436630ab94..81ff1becdb2c2efefdace765f2b1b908310267d1 100644 (file)
@@ -32,8 +32,8 @@
  */
 
 #include "squid.h"
-#include "acl/Ip.h"
 #include "acl/Checklist.h"
+#include "acl/Ip.h"
 #include "cache_cf.h"
 #include "Debug.h"
 #include "ip/tools.h"
index 49f8f0031815868b48f0988d472f728611838063..662d41424b048a038b3d1dc76c482562d4a8c9b3 100644 (file)
@@ -34,8 +34,8 @@
 
 #include "acl/Acl.h"
 #include "acl/Data.h"
-#include "splay.h"
 #include "ip/Address.h"
+#include "splay.h"
 
 /// \ingroup ACLAPI
 class acl_ip_data
index a32f09f8fb815829ea712df0854a400bfc5a3524..e4c08198fc21308f90b1acdf269c6e34154aa06b 100644 (file)
@@ -32,8 +32,8 @@
  */
 
 #include "squid.h"
-#include "acl/LocalIp.h"
 #include "acl/FilledChecklist.h"
+#include "acl/LocalIp.h"
 
 char const *
 ACLLocalIP::typeString() const
index 34b9703f271ce9e8a76ed9e77e9f818924e593b4..77e267894c405d8cce4749957660f4f4677111d3 100644 (file)
@@ -32,9 +32,9 @@
  */
 
 #include "squid.h"
-#include "acl/LocalPort.h"
-#include "acl/IntRange.h"
 #include "acl/Checklist.h"
+#include "acl/IntRange.h"
+#include "acl/LocalPort.h"
 
 int
 ACLLocalPortStrategy::match (ACLData<MatchType> * &data, ACLFilledChecklist *checklist, ACLFlags &)
index dd57aa03eaec554a1ca197266ae5e60395cf70ce..2dec7f675530cfed5946603dffeba0a875863b5a 100644 (file)
@@ -33,8 +33,8 @@
 #ifndef SQUID_ACLLOCALPORT_H
 #define SQUID_ACLLOCALPORT_H
 
-#include "acl/Strategy.h"
 #include "acl/Strategised.h"
+#include "acl/Strategy.h"
 
 /// \ingroup ACLAPI
 class ACLLocalPortStrategy : public ACLStrategy<int>
index d67059758777a87e18fb7fbd64874cd7db2be936..03bb6cb7b5631438310d8795567953a3cac8183b 100644 (file)
@@ -148,6 +148,14 @@ if ENABLE_SSL
 libacls_la_SOURCES += $(SSL_ACLS)
 endif
 
+if USE_ADAPTATION
+libacls_la_SOURCES += AdaptationService.h \
+       AdaptationService.cc \
+       AdaptationServiceData.h \
+       AdaptationServiceData.cc
+endif
+
+
 EXTRA_libacls_la_SOURCES += $(SSL_ACLS)
 
 
index 08fd2eeb58dcf994e2a4b35cfbc8df7a1bdae813..fd43d97e0c531e6e27e0b07895f3f61a6fa94331 100644 (file)
@@ -32,9 +32,9 @@
  */
 
 #include "squid.h"
+#include "acl/Checklist.h"
 #include "acl/Method.h"
 #include "acl/MethodData.h"
-#include "acl/Checklist.h"
 #include "HttpRequest.h"
 
 /* explicit template instantiation required for some systems */
index 96ade28de3f782390a5f0957593c074a30e1cb3e..636793d4ad5a17ce94d48bf7ee08b29904e3acff 100644 (file)
@@ -33,8 +33,8 @@
 #ifndef SQUID_ACLMETHOD_H
 #define SQUID_ACLMETHOD_H
 
-#include "acl/Strategy.h"
 #include "acl/Strategised.h"
+#include "acl/Strategy.h"
 #include "HttpRequestMethod.h"
 
 /// \ingroup ACLAPI
index 0cc5241555f6038370095c6133cfdb19af126547..b9a8fefd8a7f24ee2acfc5f07969cf4fa40935db 100644 (file)
@@ -33,8 +33,8 @@
  */
 
 #include "squid.h"
-#include "acl/MethodData.h"
 #include "acl/Checklist.h"
+#include "acl/MethodData.h"
 #include "cache_cf.h"
 #include "HttpRequestMethod.h"
 #include "wordlist.h"
index 9890d5a38120618729728edcf4f5c9670f92dedc..b5aa37ca5c200b5623b5ae8441d691d6beafb37d 100644 (file)
@@ -33,8 +33,8 @@
 
 #ifndef SQUID_ACLMYPORTNAME_H
 #define SQUID_ACLMYPORTNAME_H
-#include "acl/Strategy.h"
 #include "acl/Strategised.h"
+#include "acl/Strategy.h"
 
 class ACLMyPortNameStrategy : public ACLStrategy<const char *>
 {
index a5d8a85a2569d44ebdeb8699efda58b8ee1b0c37..24e4e116f2a4268d8627a285760d3b76335f5d03 100644 (file)
@@ -1,7 +1,7 @@
 #include "squid.h"
-#include "acl/Note.h"
-#include "acl/HttpHeaderData.h"
 #include "acl/Checklist.h"
+#include "acl/HttpHeaderData.h"
+#include "acl/Note.h"
 #include "HttpRequest.h"
 #include "Notes.h"
 
index 972cd654292f9475a8c8676a11ed63102387a62d..798bb2375611b8cc2328aaf34e34fedade0cb101 100644 (file)
@@ -1,8 +1,8 @@
 #ifndef SQUID_ACLNOTE_H
 #define SQUID_ACLNOTE_H
 
-#include "acl/Strategy.h"
 #include "acl/Strategised.h"
+#include "acl/Strategy.h"
 
 class HttpRequest;
 
index 3195971ee31f4afce8f045e00759609466852a39..ab4e4cfb67197083e0e1ca32dff4b7ba51762377 100644 (file)
@@ -74,7 +74,7 @@ ACLNoteData::parse()
 bool
 ACLNoteData::empty() const
 {
-    return name.undefined();
+    return name.size() == 0;
 }
 
 ACLData<HttpRequest *> *
index b62031072e63c24ba5d96f4561b50af74be08d1c..c6ef8f37fd7ac8760b77f8a6eceb28af4dcad4ef 100644 (file)
@@ -2,8 +2,8 @@
 #define SQUID_ACLNOTEDATA_H
 
 #include "acl/Data.h"
-#include "SquidString.h"
 #include "MemPool.h"
+#include "SquidString.h"
 
 class HttpRequest;
 class NotePairs;
index a3c36eb2d03f147cc88b6fefceb440a8bdbb3210..3b69a04300997699f94a227b10bb0b19de173eab 100644 (file)
@@ -1,8 +1,8 @@
 #include "squid.h"
+#include "acl/Checklist.h"
 #include "acl/PeerName.h"
 #include "acl/RegexData.h"
 #include "acl/StringData.h"
-#include "acl/Checklist.h"
 #include "CachePeer.h"
 
 int
index 84c23ee6fa836e095b7e1ff42a692ac0bdd7db9c..20c80c9755c5df75b3ff67c13ca77b97a156ddf6 100644 (file)
@@ -1,8 +1,8 @@
 #ifndef SQUID_ACLPEERNAME_H
 #define SQUID_ACLPEERNAME_H
 
-#include "acl/Strategy.h"
 #include "acl/Strategised.h"
+#include "acl/Strategy.h"
 
 class ACLPeerNameStrategy : public ACLStrategy<const char *>
 {
index 067977b9f8132727638c46e971994e880efa4b06..1fb1bc38fb9b5300a1e575e3b294fa087cb5fc4a 100644 (file)
@@ -32,9 +32,9 @@
  */
 
 #include "squid.h"
+#include "acl/Checklist.h"
 #include "acl/Protocol.h"
 #include "acl/ProtocolData.h"
-#include "acl/Checklist.h"
 #include "HttpRequest.h"
 
 /* explicit template instantiation required for some systems */
index d2aea168b4bad2c2b0996feaa254e16897d90595..7693558222d9713a132320b2bd76db46d9c73fca 100644 (file)
@@ -34,8 +34,8 @@
 #ifndef SQUID_ACLPROTOCOL_H
 #define SQUID_ACLPROTOCOL_H
 
-#include "acl/Strategy.h"
 #include "acl/Strategised.h"
+#include "acl/Strategy.h"
 #include "anyp/ProtocolType.h"
 
 class ACLProtocolStrategy : public ACLStrategy<AnyP::ProtocolType>
index 9b61dc50d199c4d9140dcebb648da13a415ff9bf..dc2a453a2b16b36836b038acb40977f3fe12d2e8 100644 (file)
@@ -33,8 +33,8 @@
  */
 
 #include "squid.h"
-#include "acl/ProtocolData.h"
 #include "acl/Checklist.h"
+#include "acl/ProtocolData.h"
 #include "cache_cf.h"
 #include "Debug.h"
 #include "URLScheme.h"
index c8eb4b638f0c1aa57860ce327e782393186376aa..406455edd7c25400a9e934c1ba97e3271e82627c 100644 (file)
@@ -33,8 +33,8 @@
  */
 
 #include "squid.h"
-#include "acl/Referer.h"
 #include "acl/Checklist.h"
+#include "acl/Referer.h"
 #include "acl/RegexData.h"
 
 /* explicit template instantiation required for some systems */
index 469ff0dbda281e70079790124db1a75ec955708a..63ebe2db14dc258e928b29273c89fe94ed49a215 100644 (file)
@@ -35,9 +35,9 @@
  */
 
 #include "squid.h"
-#include "acl/RegexData.h"
-#include "acl/Checklist.h"
 #include "acl/Acl.h"
+#include "acl/Checklist.h"
+#include "acl/RegexData.h"
 #include "ConfigParser.h"
 #include "Debug.h"
 #include "Mem.h"
index 857b7d9d3fe1d88dd144061cc0a4aea44fefddd2..a8ef8c83d847939998b897be6c0d9d12dc7ad776 100644 (file)
@@ -36,8 +36,8 @@ class ACLChecklist;
 
 #include "acl/Acl.h"
 #include "acl/Data.h"
-#include "acl/Strategy.h"
 #include "acl/FilledChecklist.h"
+#include "acl/Strategy.h"
 #include "HttpReply.h"
 
 template <http_hdr_type header>
index 9be4a9788932371fc0478820030e269ebae6434b..5ca6f6512b7f330869c52a6acdb636f607811860 100644 (file)
@@ -33,9 +33,9 @@
  */
 
 #include "squid.h"
-#include "acl/ReplyMimeType.h"
 #include "acl/Checklist.h"
 #include "acl/RegexData.h"
+#include "acl/ReplyMimeType.h"
 
 /* explicit template instantiation required for some systems */
 
index cec43f710693a13a3e5defe4469e1e3398334f8b..9e619b71587481b6ea942304324a64a51b3a55e7 100644 (file)
@@ -45,9 +45,9 @@ private:
 
 /* partial specialisation */
 
+#include "acl/Checklist.h"
 #include "acl/Data.h"
 #include "acl/ReplyHeaderStrategy.h"
-#include "acl/Checklist.h"
 
 template <>
 inline int
index 7d2c71890972deb205ec0ed4349f7330dd5ac0db..c2be587ebfaf1824c04ce541d6412a4a31616edf 100644 (file)
@@ -35,9 +35,9 @@
 #define SQUID_ACLREQUESTHEADERSTRATEGY_H
 #include "acl/Acl.h"
 #include "acl/Data.h"
+#include "acl/FilledChecklist.h"
 #include "acl/Strategy.h"
 #include "HttpRequest.h"
-#include "acl/FilledChecklist.h"
 
 template <http_hdr_type header>
 
index b96da428c1300d64a46105f5c8295001f158f32d..429744623141d8f4e1a758a3a6ece47a74d631b9 100644 (file)
@@ -33,9 +33,9 @@
  */
 
 #include "squid.h"
-#include "acl/RequestMimeType.h"
 #include "acl/Checklist.h"
 #include "acl/RegexData.h"
+#include "acl/RequestMimeType.h"
 
 /* explicit template instantiation required for some systems */
 
index 2859370839498e5b412e567077c87600671be1c2..292ef4d7695ff8e1990c7036d40dc5aa04d232f0 100644 (file)
@@ -45,9 +45,9 @@ private:
 
 /* partial specialisation */
 
+#include "acl/Checklist.h"
 #include "acl/Data.h"
 #include "acl/RequestHeaderStrategy.h"
-#include "acl/Checklist.h"
 
 template <>
 inline int
index f87189a6389249c3678f2fcc2911b0a5f2e517cc..5d5e73ec2919cd67986fc69ae340aa19206e08f2 100644 (file)
@@ -5,9 +5,9 @@
 
 #if USE_SSL
 
-#include "acl/ServerCertificate.h"
-#include "acl/Checklist.h"
 #include "acl/CertificateData.h"
+#include "acl/Checklist.h"
+#include "acl/ServerCertificate.h"
 #include "client_side.h"
 #include "fde.h"
 #include "ssl/ServerBump.h"
index e32cda36691a54e14138051f5c001607d3ff3ced..26e66091ee67f4cae40ce7ec29e855d3f6ab0d63 100644 (file)
@@ -5,10 +5,10 @@
 #define SQUID_ACLSERVERCERTIFICATE_H
 
 #include "acl/Acl.h"
-#include "acl/Data.h"
 #include "acl/Checklist.h"
-#include "ssl/support.h"
+#include "acl/Data.h"
 #include "acl/Strategised.h"
+#include "ssl/support.h"
 
 /// \ingroup ACLAPI
 class ACLServerCertificateStrategy : public ACLStrategy<X509 *>
index a68ed988d82114abb2dbbd18c05f23edebd2a1e6..be97c3551a3c5775b5524dc6e994fb0630ea0ac4 100644 (file)
  */
 
 #include "squid.h"
-#include "acl/SourceDomain.h"
 #include "acl/Checklist.h"
-#include "acl/RegexData.h"
 #include "acl/DomainData.h"
+#include "acl/RegexData.h"
+#include "acl/SourceDomain.h"
 #include "fqdncache.h"
 #include "HttpRequest.h"
 
index 8e82857419787f4165e4c0bcd596aa1fbb3bee1a..2be3caba21efacac12bac7b8adac6d4d0bffb291 100644 (file)
@@ -34,8 +34,8 @@
 #ifndef SQUID_ACLSOURCEDOMAIN_H
 #define SQUID_ACLSOURCEDOMAIN_H
 #include "acl/Acl.h"
-#include "acl/Data.h"
 #include "acl/Checklist.h"
+#include "acl/Data.h"
 #include "acl/Strategised.h"
 
 class ACLSourceDomainStrategy : public ACLStrategy<char const *>
index c2726fff7641422eee293b85916f2382fb5e5a7d..d0a54530239f1712f0c7d4481b7cfa409536f9c2 100644 (file)
@@ -32,8 +32,8 @@
  */
 
 #include "squid.h"
-#include "acl/SourceIp.h"
 #include "acl/FilledChecklist.h"
+#include "acl/SourceIp.h"
 
 char const *
 ACLSourceIP::typeString() const
index 6eae03e67b599d0ac22049c9bc8b014d71912c35..8a2336b0b207eb9063c375b29771a61ebba31669 100644 (file)
@@ -1,7 +1,7 @@
 #include "squid.h"
+#include "acl/Checklist.h"
 #include "acl/SslError.h"
 #include "acl/SslErrorData.h"
-#include "acl/Checklist.h"
 
 int
 ACLSslErrorStrategy::match (ACLData<MatchType> * &data, ACLFilledChecklist *checklist, ACLFlags &)
index ea71844062e251b11579e037b963ef1f337e6b9e..a14ba05f334743e77509f58796fcb9be6086d499 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef SQUID_ACLSSL_ERROR_H
 #define SQUID_ACLSSL_ERROR_H
-#include "acl/Strategy.h"
 #include "acl/Strategised.h"
+#include "acl/Strategy.h"
 #include "ssl/support.h"
 
 class ACLSslErrorStrategy : public ACLStrategy<const Ssl::CertErrors *>
index 2de5e2394f179062d9c632d6ecb7a8ca24192bf4..4ac522228deab0c32c0db2ddd100814e95ad9d4a 100644 (file)
@@ -32,8 +32,8 @@
  */
 
 #include "squid.h"
-#include "acl/SslErrorData.h"
 #include "acl/Checklist.h"
+#include "acl/SslErrorData.h"
 #include "cache_cf.h"
 #include "wordlist.h"
 
index 70f1c14223d9260c17309ac18e4cc79c1fd769a4..5104b308edbbaf100ddb8104a9f3f6b5cf15a6af 100644 (file)
@@ -3,8 +3,8 @@
 #include "acl/Acl.h"
 #include "acl/Data.h"
 #include "CbDataList.h"
-#include "ssl/support.h"
 #include "ssl/ErrorDetail.h"
+#include "ssl/support.h"
 #include <vector>
 
 class ACLSslErrorData : public ACLData<const Ssl::CertErrors *>
index 971cc62a5c9df3c33a18c770b4669b40a568ce39..6a2e276c0929697d4c367d813b9da097168a2648 100644 (file)
@@ -35,8 +35,8 @@
 #define SQUID_ACLSTRATEGISED_H
 #include "acl/Acl.h"
 #include "acl/Data.h"
-#include "acl/Strategy.h"
 #include "acl/FilledChecklist.h"
+#include "acl/Strategy.h"
 
 template <class M>
 
index 2067b910433e2c1f3567012e64601612ccf55ba4..c67fd456d29ae5e47a2fe8b27d815002092b361a 100644 (file)
@@ -33,8 +33,8 @@
  */
 
 #include "squid.h"
-#include "acl/StringData.h"
 #include "acl/Checklist.h"
+#include "acl/StringData.h"
 #include "cache_cf.h"
 #include "Debug.h"
 #include "wordlist.h"
index b036ffa385327a5287e301a0ecd48902ba51d8da..6da50f37ab5979fb6a4079555002c8b872d38773 100644 (file)
@@ -33,9 +33,9 @@
 
 #ifndef SQUID_ACLSTRINGDATA_H
 #define SQUID_ACLSTRINGDATA_H
-#include "splay.h"
 #include "acl/Acl.h"
 #include "acl/Data.h"
+#include "splay.h"
 
 class ACLStringData : public ACLData<char const *>
 {
@@ -49,7 +49,7 @@ public:
     virtual ~ACLStringData();
     bool match(char const *);
     wordlist *dump();
-    void parse();
+    virtual void parse();
     bool empty() const;
     virtual ACLData<char const *> *clone() const;
     /// Insert a string data value
index 17ffdcdd2832328517bf47979f7a6b838ce6a697..64e4de45a2b48f7239f4fb84e251545d9f68b2fa 100644 (file)
@@ -35,9 +35,9 @@
  */
 
 #include "squid.h"
-#include "acl/Tag.h"
-#include "acl/StringData.h"
 #include "acl/Checklist.h"
+#include "acl/StringData.h"
+#include "acl/Tag.h"
 #include "HttpRequest.h"
 
 int
index bdd243183083b61492160b28c3e0a2a179cfc363..33fec55328356df43a76eb6d8027a7800b7bd6d9 100644 (file)
@@ -34,8 +34,8 @@
 #ifndef SQUID_ACLTAG_H
 #define SQUID_ACLTAG_H
 
-#include "acl/Strategy.h"
 #include "acl/Strategised.h"
+#include "acl/Strategy.h"
 
 class ACLTagStrategy : public ACLStrategy<const char *>
 {
index efa5ea0bcc544afbfa18b86f533a81d56a661050..6f8a3da20a7e1d8bb1eee6cf48919344ac9b5008 100644 (file)
@@ -33,8 +33,8 @@
  */
 
 #include "squid.h"
-#include "acl/TimeData.h"
 #include "acl/Checklist.h"
+#include "acl/TimeData.h"
 #include "cache_cf.h"
 #include "Debug.h"
 #include "wordlist.h"
index f929c0a077ff928245b8bb48195890f1bd456d48..dca42ac47e015ca0a92aa13e16b8d8ed97feeda6 100644 (file)
@@ -33,9 +33,9 @@
 
 #ifndef SQUID_ACLTIMEDATA_H
 #define SQUID_ACLTIMEDATA_H
-#include "splay.h"
 #include "acl/Acl.h"
 #include "acl/Data.h"
+#include "splay.h"
 
 class ACLTimeData : public ACLData<time_t>
 {
index ca47794c103162d58de4d1271261e38cda39b8ba..bdb693aee3a5b193f13b191e5e08e7e70c0e6a82 100644 (file)
@@ -33,9 +33,9 @@
  */
 
 #include "squid.h"
-#include "acl/Url.h"
 #include "acl/Checklist.h"
 #include "acl/RegexData.h"
+#include "acl/Url.h"
 #include "rfc1738.h"
 #include "src/URL.h"
 
index bdefaf0f9e7c6f5a6f36771658e3747fb3c02d86..5691edadbd5e4503a78fe8f6c22378107abfe3b9 100644 (file)
@@ -31,9 +31,9 @@
  */
 
 #include "squid.h"
-#include "acl/UrlLogin.h"
 #include "acl/Checklist.h"
 #include "acl/RegexData.h"
+#include "acl/UrlLogin.h"
 #include "HttpRequest.h"
 #include "rfc1738.h"
 
index 572b3ad3541ebc746b94f63054215d26e284997e..7e64c6aa37472d2a79a8eba4ab1e80e536b989cf 100644 (file)
@@ -38,8 +38,8 @@
 
 #include "acl/Acl.h"
 #include "acl/Data.h"
-#include "acl/Strategy.h"
 #include "acl/Strategised.h"
+#include "acl/Strategy.h"
 
 class ACLUrlLoginStrategy : public ACLStrategy<char const *>
 {
index 018e20bbc5a6eeef1430f68c1702c568fb26af7b..fdcfdb73819b48ba0d619a34827ec44cae898f18 100644 (file)
@@ -33,9 +33,9 @@
  */
 
 #include "squid.h"
-#include "acl/UrlPath.h"
 #include "acl/Checklist.h"
 #include "acl/RegexData.h"
+#include "acl/UrlPath.h"
 #include "HttpRequest.h"
 #include "rfc1738.h"
 
index 0ae533d25bce8831a516e3112816b0fdb90a5fcf..d1f9a210e1b8d49b40c22dd2fcca4f90b222c946 100644 (file)
@@ -35,8 +35,8 @@
 #define SQUID_ACLURLPATH_H
 #include "acl/Acl.h"
 #include "acl/Data.h"
-#include "acl/Strategy.h"
 #include "acl/Strategised.h"
+#include "acl/Strategy.h"
 
 class ACLUrlPathStrategy : public ACLStrategy<char const *>
 {
index 81cbf474149733b6da20e6f96df88f91d78828e6..1d7b5364421dab5e0b9570a218a8e152d2e08129 100644 (file)
@@ -32,9 +32,9 @@
  */
 
 #include "squid.h"
-#include "acl/UrlPort.h"
-#include "acl/IntRange.h"
 #include "acl/Checklist.h"
+#include "acl/IntRange.h"
+#include "acl/UrlPort.h"
 #include "HttpRequest.h"
 
 int
index bdc07708ca59643a41078c8a1a5efc764686e20e..2cc894d17ae60a183a5c9f08da929983fc0d1bc8 100644 (file)
@@ -33,8 +33,8 @@
 
 #ifndef SQUID_ACLURLPORT_H
 #define SQUID_ACLURLPORT_H
-#include "acl/Strategy.h"
 #include "acl/Strategised.h"
+#include "acl/Strategy.h"
 
 class ACLUrlPortStrategy : public ACLStrategy<int>
 {
index e023f3b11311a0b3b1a3ccd78c9767c138dd3186..499400d0e3d21a5d0967e315aac65040d47122e3 100644 (file)
  */
 
 #include "squid.h"
-#include "acl/UserData.h"
 #include "acl/Checklist.h"
+#include "acl/UserData.h"
+#include "ConfigParser.h"
 #include "Debug.h"
 #include "wordlist.h"
-#include "ConfigParser.h"
 
 template<class T>
 inline void
index 39e6374907fa0646f38618e7b524e4c5a021e238..0abec7663365e8fad78f09b59d98475b71cd7442 100644 (file)
@@ -33,9 +33,9 @@
 
 #ifndef SQUID_ACLUSERDATA_H
 #define SQUID_ACLUSERDATA_H
-#include "splay.h"
 #include "acl/Acl.h"
 #include "acl/Data.h"
+#include "splay.h"
 
 class ACLUserData : public ACLData<char const *>
 {
index aaa8b97278f8df4b89df2c525deadcdc9ecd5e5a..10cd0fb917022fb70ce77349638e7313fb284f65 100644 (file)
@@ -1,4 +1,5 @@
 #include "squid.h"
+#include "AccessLogEntry.h"
 #include "acl/FilledChecklist.h"
 #include "adaptation/AccessCheck.h"
 #include "adaptation/AccessRule.h"
@@ -19,13 +20,14 @@ cbdata_type Adaptation::AccessCheck::CBDATA_AccessCheck = CBDATA_UNKNOWN;
 
 bool
 Adaptation::AccessCheck::Start(Method method, VectPoint vp,
-                               HttpRequest *req, HttpReply *rep, Adaptation::Initiator *initiator)
+                               HttpRequest *req, HttpReply *rep,
+                               AccessLogEntry::Pointer &al, Adaptation::Initiator *initiator)
 {
 
     if (Config::Enabled) {
         // the new check will call the callback and delete self, eventually
         AsyncJob::Start(new AccessCheck( // we do not store so not a CbcPointer
-                            ServiceFilter(method, vp, req, rep), initiator));
+                            ServiceFilter(method, vp, req, rep, al), initiator));
         return true;
     }
 
@@ -124,6 +126,7 @@ Adaptation::AccessCheck::checkCandidates()
             acl_checklist = new ACLFilledChecklist(r->acl, filter.request, dash_str);
             if ((acl_checklist->reply = filter.reply))
                 HTTPMSGLOCK(acl_checklist->reply);
+            acl_checklist->al = filter.al;
             acl_checklist->nonBlockingCheck(AccessCheckCallbackWrapper, this);
             return;
         }
index fe56065e5826239c3750f40dc4cc6e90f14e8993..13728e57d9b5578f501ff3d6e91369eb5e83d48b 100644 (file)
@@ -2,11 +2,12 @@
 #define SQUID_ADAPTATION__ACCESS_CHECK_H
 
 #include "acl/Acl.h"
-#include "base/AsyncJob.h"
+#include "AccessLogEntry.h"
 #include "adaptation/Elements.h"
 #include "adaptation/forward.h"
 #include "adaptation/Initiator.h"
 #include "adaptation/ServiceFilter.h"
+#include "base/AsyncJob.h"
 
 class HttpRequest;
 class HttpReply;
@@ -25,7 +26,7 @@ public:
 
     // use this to start async ACL checks; returns true if started
     static bool Start(Method method, VectPoint vp, HttpRequest *req,
-                      HttpReply *rep, Adaptation::Initiator *initiator);
+                      HttpReply *rep, AccessLogEntry::Pointer &al, Adaptation::Initiator *initiator);
 
 protected:
     // use Start to start adaptation checks
index d84eabddee3ded55b8e7ffae8be53a41fbd645db..2794a4cdd22504196209cc7123ab1845c1327826 100644 (file)
@@ -66,7 +66,8 @@ const char *metasBlacklist[] = {
     "Transfer-Complete",
     NULL
 };
-Notes Adaptation::Config::metaHeaders("ICAP header", metasBlacklist);
+Notes Adaptation::Config::metaHeaders("ICAP header", metasBlacklist, true);
+bool Adaptation::Config::needHistory = false;
 
 Adaptation::ServiceConfig*
 Adaptation::Config::newServiceConfig() const
@@ -101,6 +102,18 @@ Adaptation::Config::removeService(const String& service)
     }
 }
 
+Adaptation::ServiceConfigPointer
+Adaptation::Config::findServiceConfig(const String &service)
+{
+    typedef ServiceConfigs::const_iterator SCI;
+    const ServiceConfigs& configs = serviceConfigs;
+    for (SCI cfg = configs.begin(); cfg != configs.end(); ++cfg) {
+        if ((*cfg)->key == service)
+            return *cfg;
+    }
+    return NULL;
+}
+
 void
 Adaptation::Config::removeRule(const String& id)
 {
index 13e84aeb199fe1428c6807026f002f61619a80c6..5da85bebb79b050be52152b763ed8f724cbc38d9 100644 (file)
@@ -1,11 +1,11 @@
 #ifndef SQUID_ADAPTATION__CONFIG_H
 #define SQUID_ADAPTATION__CONFIG_H
 
-#include "event.h"
 #include "acl/forward.h"
-#include "base/AsyncCall.h"
-#include "adaptation/forward.h"
 #include "adaptation/Elements.h"
+#include "adaptation/forward.h"
+#include "base/AsyncCall.h"
+#include "event.h"
 #include "Notes.h"
 #include "SquidString.h"
 
@@ -49,6 +49,8 @@ public:
 
     static Notes metaHeaders; ///< The list of configured meta headers
 
+    static bool needHistory; ///< HttpRequest adaptation history should recorded
+
     typedef Vector<ServiceConfigPointer> ServiceConfigs;
     ServiceConfigs serviceConfigs;
 
@@ -58,7 +60,7 @@ public:
     void parseService(void);
     void freeService(void);
     void dumpService(StoreEntry *, const char *) const;
-    ServicePointer findService(const String&);
+    ServiceConfigPointer findServiceConfig(const String&);
 
     /**
      * Creates and starts the adaptation services. In the case the adaptation
index 00877aefab547fa6be574095cd04b23d0ed8f708..26fb220ee2b75ab9e776013b6e8bd218e4f2d77c 100644 (file)
@@ -148,6 +148,12 @@ void Adaptation::History::recordMeta(const HttpHeader *lm)
     allMeta.compact();
 }
 
+void
+Adaptation::History::recordAdaptationService(SBuf &srvId)
+{
+    theAdaptationServices.push_back(srvId);
+}
+
 void
 Adaptation::History::setFutureServices(const DynamicGroupCfg &services)
 {
index 07b3cf312fb9e86cf49bb26c869b91ae2c1b3ea9..b502838b89d62024f2ac73eaee3fdeb9afca1740 100644 (file)
@@ -2,10 +2,11 @@
 #define SQUID_ADAPT_HISTORY_H
 
 #include "adaptation/DynamicGroupCfg.h"
-#include "base/Vector.h"
 #include "base/RefCount.h"
+#include "base/Vector.h"
 #include "HttpHeader.h"
 #include "Notes.h"
+#include "SBuf.h"
 #include "SquidString.h"
 
 namespace Adaptation
@@ -46,6 +47,7 @@ public:
     /// store the last meta header fields received from the adaptation service
     void recordMeta(const HttpHeader *lm);
 
+    void recordAdaptationService(SBuf &srvId);
 public:
     /// Last received meta header (REQMOD or RESPMOD, whichever comes last).
     HttpHeader lastMeta;
@@ -55,6 +57,9 @@ public:
     /// AccessLogEntry::notes when ALE becomes available
     NotePairs::Pointer metaHeaders;
 
+    typedef Vector<SBuf> AdaptationServices;
+    AdaptationServices theAdaptationServices; ///< The service groups used
+
     /// sets future services for the Adaptation::AccessCheck to notice
     void setFutureServices(const DynamicGroupCfg &services);
 
index 68c2bca3508b5fdcea0168ca0e299b45b9d0fcb2..ebb1c348f87c251889572261d9242c0ee10607b6 100644 (file)
@@ -3,11 +3,11 @@
  */
 
 #include "squid.h"
-#include "HttpMsg.h"
 #include "adaptation/Answer.h"
-#include "adaptation/Initiator.h"
 #include "adaptation/Initiate.h"
+#include "adaptation/Initiator.h"
 #include "base/AsyncJobCalls.h"
+#include "HttpMsg.h"
 
 namespace Adaptation
 {
index 39f6a28b9240b01f5a1aa2026e3679e25d871f38..9c1650235e9cc0328d40c4b2e43bfa3ed08199cb 100644 (file)
@@ -1,9 +1,9 @@
 #ifndef SQUID_ADAPTATION__INITIATE_H
 #define SQUID_ADAPTATION__INITIATE_H
 
+#include "adaptation/forward.h"
 #include "base/AsyncJob.h"
 #include "base/CbcPointer.h"
-#include "adaptation/forward.h"
 
 namespace Adaptation
 {
index 11505edf2b41d38aa0cc8a9bed870abc81cd031f..61f1413e66f0c5889a3e414cec34e77bd72711f1 100644 (file)
 #include "adaptation/ServiceFilter.h"
 #include "adaptation/ServiceGroups.h"
 #include "base/TextException.h"
-#include "HttpRequest.h"
-#include "HttpReply.h"
 #include "HttpMsg.h"
+#include "HttpReply.h"
+#include "HttpRequest.h"
 
 Adaptation::Iterator::Iterator(
     HttpMsg *aMsg, HttpRequest *aCause,
+    AccessLogEntry::Pointer &alp,
     const ServiceGroupPointer &aGroup):
         AsyncJob("Iterator"),
         Adaptation::Initiate("Iterator"),
         theGroup(aGroup),
         theMsg(aMsg),
         theCause(aCause),
+        al(alp),
         theLauncher(0),
         iterations(0),
         adapted(false)
@@ -45,6 +47,19 @@ void Adaptation::Iterator::start()
     Adaptation::Initiate::start();
 
     thePlan = ServicePlan(theGroup, filter());
+
+    // Add adaptation group name once and now, before
+    // dynamic groups change it at step() time.
+    if (Adaptation::Config::needHistory && !thePlan.exhausted() && (dynamic_cast<ServiceSet *>(theGroup.getRaw()) || dynamic_cast<ServiceChain *>(theGroup.getRaw()))) {
+        HttpRequest *request = dynamic_cast<HttpRequest*>(theMsg);
+        if (!request)
+            request = theCause;
+        Must(request);
+        Adaptation::History::Pointer ah = request->adaptHistory(true);
+        SBuf gid(theGroup->id);
+        ah->recordAdaptationService(gid);
+    }
+
     step();
 }
 
@@ -79,8 +94,14 @@ void Adaptation::Iterator::step()
     Must(service != NULL);
     debugs(93,5, HERE << "using adaptation service: " << service->cfg().key);
 
+    if (Adaptation::Config::needHistory) {
+        Adaptation::History::Pointer ah = request->adaptHistory(true);
+        SBuf uid(thePlan.current()->cfg().key);
+        ah->recordAdaptationService(uid);
+    }
+
     theLauncher = initiateAdaptation(
-                      service->makeXactLauncher(theMsg, theCause));
+                      service->makeXactLauncher(theMsg, theCause, al));
     Must(initiated(theLauncher));
     Must(!done());
 }
@@ -257,7 +278,7 @@ Adaptation::ServiceFilter Adaptation::Iterator::filter() const
         Must(false); // should not happen
     }
 
-    return ServiceFilter(method, theGroup->point, req, rep);
+    return ServiceFilter(method, theGroup->point, req, rep, al);
 }
 
 CBDATA_NAMESPACED_CLASS_INIT(Adaptation, Iterator);
index c0d2958bbc5884aeddbfd9b0054771016e27c35c..191f1194d1b93b592b5a9d78edfcc7fac6c577d4 100644 (file)
@@ -1,8 +1,9 @@
 #ifndef SQUID_ADAPTATION__ITERATOR_H
 #define SQUID_ADAPTATION__ITERATOR_H
 
-#include "adaptation/Initiator.h"
+#include "AccessLogEntry.h"
 #include "adaptation/Initiate.h"
+#include "adaptation/Initiator.h"
 #include "adaptation/ServiceGroups.h"
 
 class HttpMsg;
@@ -25,6 +26,7 @@ class Iterator: public Initiate, public Initiator
 {
 public:
     Iterator(HttpMsg *virginHeader, HttpRequest *virginCause,
+             AccessLogEntry::Pointer &alp,
              const Adaptation::ServiceGroupPointer &aGroup);
     virtual ~Iterator();
 
@@ -57,6 +59,7 @@ protected:
     ServicePlan thePlan; ///< which services to use and in what order
     HttpMsg *theMsg; ///< the message being adapted (virgin for each step)
     HttpRequest *theCause; ///< the cause of the original virgin message
+    AccessLogEntry::Pointer al; ///< info for the future access.log entry
     CbcPointer<Adaptation::Initiate> theLauncher; ///< current transaction launcher
     int iterations; ///< number of steps initiated
     bool adapted; ///< whether the virgin message has been replaced
index 730035db8da53017cbfb10d00e3ddf4c855d52ba..33b60a8b9f70c176d3bddb65a61006391e1d888d 100644 (file)
@@ -3,9 +3,9 @@
  */
 
 #include "squid.h"
-#include "HttpRequest.h"
-#include "adaptation/ServiceFilter.h"
 #include "adaptation/Service.h"
+#include "adaptation/ServiceFilter.h"
+#include "HttpRequest.h"
 
 Adaptation::Service::Service(const ServiceConfigPointer &aConfig): theConfig(aConfig)
 {
index 3b60b4bf51fcd5a0e92e5075340520460d9bd546..f149ce1f2fff0887f173b9171e29960b9d05e2be 100644 (file)
@@ -1,11 +1,12 @@
 #ifndef SQUID_ADAPTATION__SERVICE_H
 #define SQUID_ADAPTATION__SERVICE_H
 
-#include "SquidString.h"
-#include "adaptation/forward.h"
+#include "AccessLogEntry.h"
 #include "adaptation/Elements.h"
+#include "adaptation/forward.h"
 #include "adaptation/ServiceConfig.h"
 #include "base/RefCount.h"
+#include "SquidString.h"
 
 // TODO: Move src/ICAP/ICAPServiceRep.h API comments here and update them
 
@@ -31,7 +32,7 @@ public:
     virtual bool broken() const;
     virtual bool up() const = 0; // see comments above
 
-    virtual Initiate *makeXactLauncher(HttpMsg *virginHeader, HttpRequest *virginCause) = 0;
+    virtual Initiate *makeXactLauncher(HttpMsg *virginHeader, HttpRequest *virginCause, AccessLogEntry::Pointer &alp) = 0;
 
     bool wants(const ServiceFilter &filter) const;
 
index 940c45a9655d6b12ced34e94667e076385af8543..1d8cb93a6d362de64bd3fb424679415424b8a678 100644 (file)
@@ -1,9 +1,9 @@
 #ifndef SQUID_ADAPTATION__SERVICE_CONFIG_H
 #define SQUID_ADAPTATION__SERVICE_CONFIG_H
 
-#include "SquidString.h"
-#include "base/RefCount.h"
 #include "adaptation/Elements.h"
+#include "base/RefCount.h"
+#include "SquidString.h"
 
 namespace Adaptation
 {
index f488eba8d75c00738b6430f5c432c383f09d219d..90449d0fcb14faac93518cdfb5736e4171da9ef1 100644 (file)
@@ -1,13 +1,15 @@
 #include "squid.h"
-#include "HttpRequest.h"
-#include "HttpReply.h"
+#include "AccessLogEntry.h"
 #include "adaptation/ServiceFilter.h"
+#include "HttpReply.h"
+#include "HttpRequest.h"
 
-Adaptation::ServiceFilter::ServiceFilter(Method aMethod, VectPoint aPoint, HttpRequest *aReq, HttpReply *aRep):
+Adaptation::ServiceFilter::ServiceFilter(Method aMethod, VectPoint aPoint, HttpRequest *aReq, HttpReply *aRep, AccessLogEntry::Pointer const &alp):
         method(aMethod),
         point(aPoint),
         request(aReq),
-        reply(aRep)
+        reply(aRep),
+        al(alp)
 {
     if (reply)
         HTTPMSGLOCK(reply);
@@ -21,7 +23,8 @@ Adaptation::ServiceFilter::ServiceFilter(const ServiceFilter &f):
         method(f.method),
         point(f.point),
         request(f.request),
-        reply(f.reply)
+        reply(f.reply),
+        al(f.al)
 {
     if (request)
         HTTPMSGLOCK(request);
index 0c9c8920c85a491fb6e336775756754481f5c12e..b88e96bc4cbf5a6f763193bf9df3dfa82109f95d 100644 (file)
@@ -1,6 +1,7 @@
 #ifndef SQUID_ADAPTATION__SERVICE_FILTER_H
 #define SQUID_ADAPTATION__SERVICE_FILTER_H
 
+#include "AccessLogEntry.h"
 #include "adaptation/Elements.h"
 
 class HttpRequest;
@@ -13,7 +14,7 @@ namespace Adaptation
 class ServiceFilter
 {
 public:
-    ServiceFilter(Method, VectPoint, HttpRequest *, HttpReply *); // locks
+    ServiceFilter(Method, VectPoint, HttpRequest *, HttpReply *, AccessLogEntry::Pointer const &al); // locks
     ServiceFilter(const ServiceFilter &f);
     ~ServiceFilter(); // unlocks
 
@@ -24,6 +25,7 @@ public:
     VectPoint point; ///< adaptation location
     HttpRequest *request; ///< HTTP request being adapted or cause; may be nil
     HttpReply *reply; ///< HTTP response being adapted; may be nil
+    AccessLogEntry::Pointer al; ///< info for the future access.log entry
 };
 
 } // namespace Adaptation
index 0fdaf803418d5b3d98c22f74f0badfc17f8921f4..ab7bc6f711f160fc3a1456c0d0f83c04feeb3f78 100644 (file)
@@ -1,11 +1,11 @@
 #ifndef SQUID_ADAPTATION__SERVICE_GROUPS_H
 #define SQUID_ADAPTATION__SERVICE_GROUPS_H
 
-#include "SquidString.h"
-#include "base/Vector.h"
 #include "adaptation/Elements.h"
 #include "adaptation/forward.h"
 #include "base/RefCount.h"
+#include "base/Vector.h"
+#include "SquidString.h"
 
 namespace Adaptation
 {
index 2ed9d5051d0f8415b4145bbd9f69fc608ab8fee9..314b743ddaf2782af8d17e4ba7104a24beab651e 100644 (file)
@@ -2,9 +2,9 @@
  * DEBUG: section 93    eCAP Interface
  */
 #include "squid.h"
+#include "adaptation/ecap/Config.h"
 #include "adaptation/ecap/Host.h"
 #include "adaptation/ecap/ServiceRep.h"
-#include "adaptation/ecap/Config.h"
 
 Adaptation::Ecap::Config Adaptation::Ecap::TheConfig;
 
index df38fed72c6f11a95a123639b63c29b89d7fb157..add249c06537d5aed9f9033bae49f64c8eee3c0e 100644 (file)
@@ -5,12 +5,12 @@
 #include <libecap/adapter/service.h>
 #include <libecap/common/names.h>
 #include <libecap/common/registry.h>
-#include "base/TextException.h"
-#include "adaptation/ecap/ServiceRep.h"
 #include "adaptation/ecap/Host.h"
 #include "adaptation/ecap/MessageRep.h"
-#include "HttpRequest.h"
+#include "adaptation/ecap/ServiceRep.h"
+#include "base/TextException.h"
 #include "HttpReply.h"
+#include "HttpRequest.h"
 
 const libecap::Name Adaptation::Ecap::protocolInternal("internal", libecap::Name::NextId());
 const libecap::Name Adaptation::Ecap::protocolCacheObj("cache_object", libecap::Name::NextId());
@@ -70,11 +70,55 @@ Adaptation::Ecap::Host::describe(std::ostream &os) const
     os << PACKAGE_NAME << " v" << PACKAGE_VERSION;
 }
 
+/// Strips libecap version components not affecting compatibility decisions.
+static SBuf
+EssentialVersion(const SBuf &raw)
+{
+    // all libecap x.y.* releases are supposed to be compatible so we strip
+    // everything after the second period
+    const SBuf::size_type minorPos = raw.find('.');
+    const SBuf::size_type microPos = minorPos == SBuf::npos ?
+        SBuf::npos : raw.find('.', minorPos+1);
+    return raw.substr(0, microPos); // becomes raw if microPos is npos
+}
+
+/// If "their" libecap version is not compatible with what Squid has been built
+/// with, then complain and return false.
+static bool
+SupportedVersion(const char *vTheir, const char *them)
+{
+    if (!vTheir || !*vTheir) {
+        debugs(93, DBG_CRITICAL, "ERROR: Cannot use " << them <<
+               " with libecap prior to v1.0.");
+        return false;
+    }
+
+    // we support what we are built with
+    const SBuf vSupported(LIBECAP_VERSION);
+    debugs(93, 2, them << " with libecap v" << vTheir << "; us: v" << vSupported);
+
+    if (EssentialVersion(SBuf(vTheir)) == EssentialVersion(vSupported))
+        return true; // their version is supported
+
+    debugs(93, DBG_CRITICAL, "ERROR: Cannot use " << them <<
+           " with libecap v" << vTheir <<
+           ": incompatible with supported libecap v" << vSupported);
+    return false;
+}
+
 void
-Adaptation::Ecap::Host::noteService(const libecap::weak_ptr<libecap::adapter::Service> &weak)
+Adaptation::Ecap::Host::noteVersionedService(const char *vGiven, const libecap::weak_ptr<libecap::adapter::Service> &weak)
 {
-    Must(!weak.expired());
-    RegisterAdapterService(weak.lock());
+    /*
+     * Check that libecap used to build the service is compatible with ours.
+     * This has to be done using vGiven string and not Service object itself
+     * because dereferencing a Service pointer coming from an unsupported
+     * version is unsafe.
+     */
+    if (SupportedVersion(vGiven, "eCAP service built")) {
+        Must(!weak.expired());
+        RegisterAdapterService(weak.lock());
+    }
 }
 
 static int
@@ -126,7 +170,8 @@ Adaptation::Ecap::Host::newResponse() const
 void
 Adaptation::Ecap::Host::Register()
 {
-    if (!TheHost) {
+    if (!TheHost && SupportedVersion(libecap::VersionString(),
+                                     "Squid executable dynamically linked")) {
         TheHost.reset(new Adaptation::Ecap::Host);
         libecap::RegisterHost(TheHost);
     }
index 31c0c179a94c438c19adf8f4ebd1869d9ccbc28d..9789fc1c2b77ce1d857409fe0a6c44597d93a519 100644 (file)
@@ -19,7 +19,7 @@ public:
     /* libecap::host::Host API */
     virtual std::string uri() const; // unique across all vendors
     virtual void describe(std::ostream &os) const; // free-format info
-    virtual void noteService(const libecap::weak_ptr<libecap::adapter::Service> &s);
+    virtual void noteVersionedService(const char *libEcapVersion, const libecap::weak_ptr<libecap::adapter::Service> &s);
     virtual std::ostream *openDebug(libecap::LogVerbosity lv);
     virtual void closeDebug(std::ostream *debug);
     typedef libecap::shared_ptr<libecap::Message> MessagePtr;
index cf32e6209cb79488d47077ee6f15077776dcfaa2..ed6cddd6dc16f916e1e4f72905c9ae42ba106754 100644 (file)
@@ -2,16 +2,16 @@
  * DEBUG: section 93    eCAP Interface
  */
 #include "squid.h"
-#include "HttpRequest.h"
-#include "HttpReply.h"
 #include "BodyPipe.h"
+#include "HttpReply.h"
+#include "HttpRequest.h"
 #include <libecap/common/names.h>
 #include <libecap/common/area.h>
 #include <libecap/common/version.h>
 #include <libecap/common/named_values.h>
+#include "adaptation/ecap/Host.h" /* for protocol constants */
 #include "adaptation/ecap/MessageRep.h"
 #include "adaptation/ecap/XactionRep.h"
-#include "adaptation/ecap/Host.h" /* for protocol constants */
 #include "base/TextException.h"
 #include "URL.h"
 
@@ -39,7 +39,7 @@ Adaptation::Ecap::HeaderRep::value(const Name &name) const
     const String value = squidId == HDR_OTHER ?
                          theHeader.getByName(name.image().c_str()) :
                          theHeader.getStrOrList(squidId);
-    return value.defined() ?
+    return value.size() > 0 ?
            Value::FromTempString(value.termedBuf()) : Value();
 }
 
index 9f8d001ad2402d6411e7090d477ead7241df7d21..cfcf739236858de6b0d259a99ac3ed19910b715c 100644 (file)
@@ -5,11 +5,11 @@
 #ifndef SQUID__ECAP__MESSAGE_REP_H
 #define SQUID__ECAP__MESSAGE_REP_H
 
-#include "HttpHeader.h"
-#include "BodyPipe.h"
 #include "adaptation/forward.h"
 #include "adaptation/Message.h"
 #include "anyp/ProtocolType.h"
+#include "BodyPipe.h"
+#include "HttpHeader.h"
 #include <libecap/common/message.h>
 #include <libecap/common/header.h>
 #include <libecap/common/body.h>
index 260850591bd68334f363aff07e66fb8ea1eb296e..9c78a45012435ff81916a32d9c526e8ea8b50a69 100644 (file)
@@ -3,19 +3,29 @@
  */
 #include "squid.h"
 #include "Debug.h"
-#include <list>
-#include <libecap/adapter/service.h>
-#include <libecap/common/options.h>
-#include <libecap/common/name.h>
-#include <libecap/common/named_values.h>
+#include "EventLoop.h"
 #include "adaptation/ecap/Config.h"
 #include "adaptation/ecap/Host.h"
 #include "adaptation/ecap/ServiceRep.h"
 #include "adaptation/ecap/XactionRep.h"
+#include "AsyncEngine.h"
 #include "base/TextException.h"
 
-// configured eCAP service wrappers
-static std::list<Adaptation::Ecap::ServiceRep::AdapterService> TheServices;
+#include <libecap/adapter/service.h>
+#include <libecap/common/options.h>
+#include <libecap/common/name.h>
+#include <libecap/common/named_values.h>
+#if HAVE_LIMITS
+#include <limits>
+#endif
+#include <map>
+
+/// libecap::adapter::services indexed by their URI
+typedef std::map<std::string, Adaptation::Ecap::ServiceRep::AdapterService> AdapterServices;
+/// all loaded services
+static AdapterServices TheServices;
+/// configured services producing async transactions
+static AdapterServices AsyncServices;
 
 namespace Adaptation
 {
@@ -39,6 +49,17 @@ public:
     const Master &master; ///< the configuration being wrapped
 };
 
+/// manages async eCAP transactions
+class Engine: public AsyncEngine
+{
+public:
+    /* AsyncEngine API */
+    virtual int checkEvents(int timeout);
+
+private:
+    void kickAsyncServices(timeval &timeout);
+};
+
 } // namespace Ecap
 } // namespace Adaptation
 
@@ -76,6 +97,55 @@ Adaptation::Ecap::ConfigRep::visitEachOption(libecap::NamedValueVisitor &visitor
         visitor.visit(Name(i->first), Area::FromTempString(i->second));
 }
 
+/* Adaptation::Ecap::Engine */
+
+int
+Adaptation::Ecap::Engine::checkEvents(int)
+{
+    // Start with the default I/O loop timeout, convert from milliseconds.
+    static const struct timeval maxTimeout {
+        EVENT_LOOP_TIMEOUT/1000, // seconds
+        (EVENT_LOOP_TIMEOUT % 1000)*1000 
+    }; // microseconds
+    struct timeval timeout = maxTimeout;
+
+    kickAsyncServices(timeout);
+    if (timeout.tv_sec == maxTimeout.tv_sec && timeout.tv_usec == maxTimeout.tv_usec)
+        return EVENT_IDLE;
+
+    debugs(93, 7, "timeout: " << timeout.tv_sec << "s+" << timeout.tv_usec << "us");
+
+    // convert back to milliseconds, avoiding int overflows
+    if (timeout.tv_sec >= std::numeric_limits<int>::max()/1000 - 1000)
+        return std::numeric_limits<int>::max();
+    else
+        return timeout.tv_sec*1000 + timeout.tv_usec/1000;
+}
+
+/// resumes async transactions (if any) and returns true if they set a timeout
+void
+Adaptation::Ecap::Engine::kickAsyncServices(timeval &timeout)
+{
+    if (AsyncServices.empty())
+        return;
+
+    debugs(93, 3, "async services: " << AsyncServices.size());
+
+    // Activate waiting async transactions, if any.
+    typedef AdapterServices::iterator ASI;
+    for (ASI s = AsyncServices.begin(); s != AsyncServices.end(); ++s) {
+        assert(s->second);
+        s->second->resume(); // may call Ecap::Xaction::resume()
+    }
+
+    // Give services a chance to decrease the default timeout.
+    for (ASI s = AsyncServices.begin(); s != AsyncServices.end(); ++s) {
+        s->second->suspend(timeout);
+    }
+}
+
+/* Adaptation::Ecap::ServiceRep */
+
 Adaptation::Ecap::ServiceRep::ServiceRep(const ServiceConfigPointer &cfg):
         /*AsyncJob("Adaptation::Ecap::ServiceRep"),*/ Adaptation::Service(cfg),
         isDetached(false)
@@ -123,6 +193,11 @@ Adaptation::Ecap::ServiceRep::tryConfigureAndStart()
 
     debugs(93,DBG_IMPORTANT, "Starting eCAP service: " << theService->uri());
     theService->start();
+
+    if (theService->makesAsyncXactions()) {
+        AsyncServices[theService->uri()] = theService;
+        debugs(93, 5, "asyncs: " << AsyncServices.size());
+    }
 }
 
 /// handles failures while configuring or starting an eCAP service;
@@ -165,10 +240,20 @@ bool Adaptation::Ecap::ServiceRep::wantsUrl(const String &urlPath) const
 
 Adaptation::Initiate *
 Adaptation::Ecap::ServiceRep::makeXactLauncher(HttpMsg *virgin,
-        HttpRequest *cause)
+        HttpRequest *cause, AccessLogEntry::Pointer &alp)
 {
     Must(up());
-    XactionRep *rep = new XactionRep(virgin, cause, Pointer(this));
+
+    // register now because (a) we need EventLoop::Running and (b) we do not
+    // want to add more main loop overheads unless an async service is used.
+    static AsyncEngine *TheEngine = NULL;
+    if (AsyncServices.size() && !TheEngine && EventLoop::Running) {
+        TheEngine = new Engine;
+        EventLoop::Running->registerEngine(TheEngine);
+        debugs(93, 3, "asyncs: " << AsyncServices.size() << ' ' << TheEngine);
+    }
+
+    XactionRep *rep = new XactionRep(virgin, cause, alp, Pointer(this));
     XactionRep::AdapterXaction x(theService->makeXaction(rep));
     rep->master(x);
     return rep;
@@ -210,11 +295,10 @@ bool Adaptation::Ecap::ServiceRep::detached() const
 Adaptation::Ecap::ServiceRep::AdapterService
 Adaptation::Ecap::FindAdapterService(const String& serviceUri)
 {
-    typedef std::list<ServiceRep::AdapterService>::const_iterator ASCI;
-    for (ASCI s = TheServices.begin(); s != TheServices.end(); ++s) {
-        Must(*s);
-        if (serviceUri == (*s)->uri().c_str())
-            return *s;
+    AdapterServices::const_iterator pos = TheServices.find(serviceUri.termedBuf());
+    if (pos != TheServices.end()) {
+        Must(pos->second);
+        return pos->second;
     }
     return ServiceRep::AdapterService();
 }
@@ -222,30 +306,18 @@ Adaptation::Ecap::FindAdapterService(const String& serviceUri)
 void
 Adaptation::Ecap::RegisterAdapterService(const Adaptation::Ecap::ServiceRep::AdapterService& adapterService)
 {
-    typedef std::list<ServiceRep::AdapterService>::iterator ASI;
-    for (ASI s = TheServices.begin(); s != TheServices.end(); ++s) {
-        Must(*s);
-        if (adapterService->uri() == (*s)->uri()) {
-            *s = adapterService;
-            debugs(93, 3, "updated eCAP module service: " <<
-                   adapterService->uri());
-            return;
-        }
-    }
-    TheServices.push_back(adapterService);
-    debugs(93, 3, "registered eCAP module service: " << adapterService->uri());
+    TheServices[adapterService->uri()] = adapterService; // may update old one
+    debugs(93, 3, "stored eCAP module service: " << adapterService->uri());
+    // We do not update AsyncServices here in case they are not configured.
 }
 
 void
 Adaptation::Ecap::UnregisterAdapterService(const String& serviceUri)
 {
-    typedef std::list<ServiceRep::AdapterService>::iterator ASI;
-    for (ASI s = TheServices.begin(); s != TheServices.end(); ++s) {
-        if (serviceUri == (*s)->uri().c_str()) {
-            TheServices.erase(s);
-            debugs(93, 3, "unregistered eCAP module service: " << serviceUri);
-            return;
-        }
+    if (TheServices.erase(serviceUri.termedBuf())) {
+        debugs(93, 3, "unregistered eCAP module service: " << serviceUri);
+        AsyncServices.erase(serviceUri.termedBuf()); // no-op for non-async
+        return;
     }
     debugs(93, 3, "failed to unregister eCAP module service: " << serviceUri);
 }
@@ -253,16 +325,16 @@ Adaptation::Ecap::UnregisterAdapterService(const String& serviceUri)
 void
 Adaptation::Ecap::CheckUnusedAdapterServices(const Adaptation::Services& cfgs)
 {
-    typedef std::list<ServiceRep::AdapterService>::const_iterator ASCI;
+    typedef AdapterServices::const_iterator ASCI;
     for (ASCI loaded = TheServices.begin(); loaded != TheServices.end();
             ++loaded) {
         bool found = false;
         for (Services::const_iterator cfged = cfgs.begin();
                 cfged != cfgs.end() && !found; ++cfged) {
-            found = (*cfged)->cfg().uri == (*loaded)->uri().c_str();
+            found = (*cfged)->cfg().uri == loaded->second->uri().c_str();
         }
         if (!found)
             debugs(93, DBG_IMPORTANT, "Warning: loaded eCAP service has no matching " <<
-                   "ecap_service config option: " << (*loaded)->uri());
+                   "ecap_service config option: " << loaded->second->uri());
     }
 }
index 1bcc2495dd1b36c16cf86b3467be30c3b209c69d..19b166abcd4ba02872864ac6d06dc3fe0c1383e5 100644 (file)
@@ -5,8 +5,8 @@
 #ifndef SQUID_ECAP_SERVICE_REP_H
 #define SQUID_ECAP_SERVICE_REP_H
 
-#include "adaptation/Service.h"
 #include "adaptation/forward.h"
+#include "adaptation/Service.h"
 #include <libecap/common/forward.h>
 #include <libecap/common/memory.h>
 
@@ -31,7 +31,7 @@ public:
     virtual void finalize();
     virtual bool probed() const;
     virtual bool up() const;
-    virtual Adaptation::Initiate *makeXactLauncher(HttpMsg *virginHeader, HttpRequest *virginCause);
+    virtual Adaptation::Initiate *makeXactLauncher(HttpMsg *virginHeader, HttpRequest *virginCause, AccessLogEntry::Pointer &alp);
     virtual bool wantsUrl(const String &urlPath) const;
     virtual void noteFailure();
     virtual const char *status() const;
index 6090c5e9174fa1298c739b66d3fc49c3b247c161..30fb86cbd951c129c80d8d9e721443d7476c8b5c 100644 (file)
@@ -7,14 +7,16 @@
 #include <libecap/common/named_values.h>
 #include <libecap/common/names.h>
 #include <libecap/adapter/xaction.h>
-#include "HttpRequest.h"
-#include "HttpReply.h"
-#include "SquidTime.h"
 #include "adaptation/Answer.h"
-#include "adaptation/ecap/XactionRep.h"
 #include "adaptation/ecap/Config.h"
+#include "adaptation/ecap/XactionRep.h"
 #include "adaptation/Initiator.h"
+#include "base/AsyncJobCalls.h"
 #include "base/TextException.h"
+#include "format/Format.h"
+#include "HttpReply.h"
+#include "HttpRequest.h"
+#include "SquidTime.h"
 
 CBDATA_NAMESPACED_CLASS_INIT(Adaptation::Ecap::XactionRep, XactionRep);
 
@@ -36,7 +38,7 @@ public:
 };
 
 Adaptation::Ecap::XactionRep::XactionRep(
-    HttpMsg *virginHeader, HttpRequest *virginCause,
+    HttpMsg *virginHeader, HttpRequest *virginCause, AccessLogEntry::Pointer &alp,
     const Adaptation::ServicePointer &aService):
         AsyncJob("Adaptation::Ecap::XactionRep"),
         Adaptation::Initiate("Adaptation::Ecap::XactionRep"),
@@ -45,7 +47,8 @@ Adaptation::Ecap::XactionRep::XactionRep(
         makingVb(opUndecided), proxyingAb(opUndecided),
         adaptHistoryId(-1),
         vbProductionFinished(false),
-        abProductionFinished(false), abProductionAtEnd(false)
+        abProductionFinished(false), abProductionAtEnd(false),
+        al(alp)
 {
     if (virginCause)
         theCauseRep = new MessageRep(virginCause);
@@ -143,7 +146,7 @@ Adaptation::Ecap::XactionRep::usernameValue() const
     if (request->auth_user_request != NULL) {
         if (char const *name = request->auth_user_request->username())
             return libecap::Area::FromTempBuffer(name, strlen(name));
-        else if (request->extacl_user.defined() && request->extacl_user.size())
+        else if (request->extacl_user.size() > 0)
             return libecap::Area::FromTempBuffer(request->extacl_user.rawBuf(),
                                                  request->extacl_user.size());
     }
@@ -180,7 +183,7 @@ Adaptation::Ecap::XactionRep::metaValue(const libecap::Name &name) const
         typedef Notes::iterator ACAMLI;
         for (ACAMLI i = Adaptation::Config::metaHeaders.begin(); i != Adaptation::Config::metaHeaders.end(); ++i) {
             if (name == (*i)->key.termedBuf()) {
-                if (const char *value = (*i)->match(request, reply))
+                if (const char *value = (*i)->match(request, reply, al))
                     return libecap::Area::FromTempString(value);
                 else
                     return libecap::Area();
@@ -201,7 +204,7 @@ Adaptation::Ecap::XactionRep::visitEachMetaHeader(libecap::NamedValueVisitor &vi
 
     typedef Notes::iterator ACAMLI;
     for (ACAMLI i = Adaptation::Config::metaHeaders.begin(); i != Adaptation::Config::metaHeaders.end(); ++i) {
-        const char *v = (*i)->match(request, reply);
+        const char *v = (*i)->match(request, reply, al);
         if (v) {
             const libecap::Name name((*i)->key.termedBuf());
             const libecap::Area value = libecap::Area::FromTempString(v);
@@ -230,7 +233,7 @@ Adaptation::Ecap::XactionRep::start()
         adaptHistoryId = ah->recordXactStart(service().cfg().key, current_time, false);
         typedef Notes::iterator ACAMLI;
         for (ACAMLI i = Adaptation::Config::metaHeaders.begin(); i != Adaptation::Config::metaHeaders.end(); ++i) {
-            const char *v = (*i)->match(request, reply);
+            const char *v = (*i)->match(request, reply, al);
             if (v) {
                 if (ah->metaHeaders == NULL)
                     ah->metaHeaders = new NotePairs();
@@ -273,6 +276,25 @@ Adaptation::Ecap::XactionRep::swanSong()
     Adaptation::Initiate::swanSong();
 }
 
+void
+Adaptation::Ecap::XactionRep::resume()
+{
+    // go async to gain exception protection and done()-based job destruction
+    typedef NullaryMemFunT<Adaptation::Ecap::XactionRep> Dialer;
+    AsyncCall::Pointer call = asyncCall(93, 5, "Adaptation::Ecap::XactionRep::doResume",
+                                        Dialer(this, &Adaptation::Ecap::XactionRep::doResume));
+    ScheduleCallHere(call);
+}
+
+/// the guts of libecap::host::Xaction::resume() API implementation
+/// which just goes async in Adaptation::Ecap::XactionRep::resume().
+void
+Adaptation::Ecap::XactionRep::doResume()
+{
+    Must(theMaster);
+    theMaster->resume();
+}
+
 libecap::Message &
 Adaptation::Ecap::XactionRep::virgin()
 {
@@ -595,12 +617,6 @@ Adaptation::Ecap::XactionRep::adaptationAborted()
     mustStop("adaptationAborted");
 }
 
-bool
-Adaptation::Ecap::XactionRep::callable() const
-{
-    return !done();
-}
-
 void
 Adaptation::Ecap::XactionRep::noteMoreBodySpaceAvailable(RefCount<BodyPipe> bp)
 {
index 80f4c6f8eedbcbb2596a90ec46b1a91b887630c3..a0a1548fd91cc11052c085b5989c1d90f8dc4254 100644 (file)
@@ -5,11 +5,11 @@
 #ifndef SQUID_ECAP_XACTION_REP_H
 #define SQUID_ECAP_XACTION_REP_H
 
-#include "BodyPipe.h"
-#include "adaptation/Initiate.h"
-#include "adaptation/Message.h"
 #include "adaptation/ecap/MessageRep.h"
 #include "adaptation/ecap/ServiceRep.h"
+#include "adaptation/Initiate.h"
+#include "adaptation/Message.h"
+#include "BodyPipe.h"
 #include <libecap/common/forward.h>
 #include <libecap/common/memory.h>
 #include <libecap/host/xaction.h>
@@ -27,7 +27,7 @@ class XactionRep : public Adaptation::Initiate, public libecap::host::Xaction,
         public BodyConsumer, public BodyProducer
 {
 public:
-    XactionRep(HttpMsg *virginHeader, HttpRequest *virginCause, const Adaptation::ServicePointer &service);
+    XactionRep(HttpMsg *virginHeader, HttpRequest *virginCause, AccessLogEntry::Pointer &alp, const Adaptation::ServicePointer &service);
     virtual ~XactionRep();
 
     typedef libecap::shared_ptr<libecap::adapter::Xaction> AdapterXaction;
@@ -44,6 +44,7 @@ public:
     virtual void blockVirgin();
     virtual void adaptationDelayed(const libecap::Delay &);
     virtual void adaptationAborted();
+    virtual void resume();
     virtual void vbDiscard();
     virtual void vbMake();
     virtual void vbStopMaking();
@@ -53,9 +54,6 @@ public:
     virtual void noteAbContentDone(bool atEnd);
     virtual void noteAbContentAvailable();
 
-    // libecap::Callable API, via libecap::host::Xaction
-    virtual bool callable() const;
-
     // BodyProducer API
     virtual void noteMoreBodySpaceAvailable(RefCount<BodyPipe> bp);
     virtual void noteBodyConsumerAborted(RefCount<BodyPipe> bp);
@@ -97,6 +95,8 @@ protected:
     /// Return the adaptation meta headers and their values
     void visitEachMetaHeader(libecap::NamedValueVisitor &visitor) const;
 
+    void doResume();
+
 private:
     AdapterXaction theMaster; // the actual adaptation xaction we represent
     Adaptation::ServicePointer theService; ///< xaction's adaptation service
@@ -114,6 +114,7 @@ private:
     bool vbProductionFinished; // whether there can be no more vb bytes
     bool abProductionFinished; // whether adapter has finished producing ab
     bool abProductionAtEnd;    // whether adapter produced a complete ab
+    AccessLogEntry::Pointer al; ///< Master transaction AccessLogEntry
 
     CBDATA_CLASS2(XactionRep);
 };
index a335b83ea707289229ded8e6838d21c73cb41814..878578e48f3d846a87e97305dfc355a6fae9d165 100644 (file)
@@ -1,6 +1,6 @@
 #include "squid.h"
-#include "Debug.h"
 #include "adaptation/icap/Client.h"
+#include "Debug.h"
 
 void Adaptation::Icap::InitModule()
 {
index 3e2288e0c799f8377e121364b246cd2ab80219c1..d66c3f67c940a951960577d173d3a08936af3202 100644 (file)
  */
 
 #include "squid.h"
-#include "ConfigParser.h"
-#include "Store.h"
-#include "base/Vector.h"
 #include "adaptation/icap/Config.h"
 #include "adaptation/icap/ServiceRep.h"
-#include "HttpRequest.h"
+#include "base/Vector.h"
+#include "ConfigParser.h"
 #include "HttpReply.h"
+#include "HttpRequest.h"
 #include "SquidConfig.h"
+#include "Store.h"
 #include "wordlist.h"
 
 Adaptation::Icap::Config Adaptation::Icap::TheConfig;
index 012efb7e43bf9d7084744cb2e26ef302e9c2a169..5da8ec7adb4e5a6be9b34429f396c369286a48b9 100644 (file)
 #ifndef SQUID_ICAPCONFIG_H
 #define SQUID_ICAPCONFIG_H
 
-#include "event.h"
-#include "base/AsyncCall.h"
 #include "acl/forward.h"
 #include "adaptation/Config.h"
 #include "adaptation/icap/ServiceRep.h"
+#include "base/AsyncCall.h"
+#include "event.h"
 
 namespace Adaptation
 {
index 4251c93c07067d3e733b997bc3e2967c50a0e6fa..83a6270f118428fe2f5aee4b73cb8747957def2f 100644 (file)
@@ -33,8 +33,8 @@
 #define SQUID_ICAPINOUT_H
 
 #include "HttpMsg.h"
-#include "HttpRequest.h"
 #include "HttpReply.h"
+#include "HttpRequest.h"
 
 // IcapInOut manages a pointer to the HTTP message being worked on.
 // For HTTP responses, request header information is also available
index 1355a9cca08e7f6f67750ac0aa0d006fb1e321ea..7d77f57ee0468c6887231d7a84e330a28115c115 100644 (file)
@@ -5,15 +5,15 @@
 #include "squid.h"
 #include "acl/FilledChecklist.h"
 #include "adaptation/Answer.h"
+#include "adaptation/icap/Config.h"
 #include "adaptation/icap/Launcher.h"
-#include "adaptation/icap/Xaction.h"
 #include "adaptation/icap/ServiceRep.h"
-#include "adaptation/icap/Config.h"
+#include "adaptation/icap/Xaction.h"
 #include "base/TextException.h"
 #include "globals.h"
 #include "HttpMsg.h"
-#include "HttpRequest.h"
 #include "HttpReply.h"
+#include "HttpRequest.h"
 
 Adaptation::Icap::Launcher::Launcher(const char *aTypeName,
                                      Adaptation::ServicePointer &aService):
index c70d59767daaec5c80c31f113307724e4a575644..37beb79d312e2ff0dc5804a5ced2b8b4150ac7b1 100644 (file)
@@ -32,9 +32,9 @@
 #ifndef SQUID_ICAPLAUNCHER_H
 #define SQUID_ICAPLAUNCHER_H
 
-#include "adaptation/Initiator.h"
-#include "adaptation/Initiate.h"
 #include "adaptation/icap/ServiceRep.h"
+#include "adaptation/Initiate.h"
+#include "adaptation/Initiator.h"
 
 /*
  * The ICAP Launcher starts an ICAP transaction. If the transaction fails
index 71203b4dbd726917fc7333cb5076b27b6beee56b..ec793785629f514c0d19c0b8f88f82729c1d81c7 100644 (file)
@@ -44,7 +44,7 @@ Adaptation::Icap::ModXact::State::State()
 }
 
 Adaptation::Icap::ModXact::ModXact(HttpMsg *virginHeader,
-                                   HttpRequest *virginCause, Adaptation::Icap::ServiceRep::Pointer &aService):
+                                   HttpRequest *virginCause, AccessLogEntry::Pointer &alp, Adaptation::Icap::ServiceRep::Pointer &aService):
         AsyncJob("Adaptation::Icap::ModXact"),
         Adaptation::Icap::Xaction("Adaptation::Icap::ModXact", aService),
         virginConsumed(0),
@@ -53,7 +53,8 @@ Adaptation::Icap::ModXact::ModXact(HttpMsg *virginHeader,
         protectGroupBypass(true),
         replyHttpHeaderSize(-1),
         replyHttpBodySize(-1),
-        adaptHistoryId(-1)
+        adaptHistoryId(-1),
+        alMaster(alp)
 {
     assert(virginHeader);
 
@@ -1289,7 +1290,8 @@ void Adaptation::Icap::ModXact::finalizeLogInfo()
         al.cache.ssluser = h->ssluser.termedBuf();
 #endif
     al.cache.code = h->logType;
-    al.cache.requestSize = h->req_sz;
+    // XXX: should use icap-specific counters instead ?
+    al.http.clientRequestSz.payloadData = h->req_sz;
 
     // leave al.icap.bodyBytesRead negative if no body
     if (replyHttpHeaderSize >= 0 || replyHttpBodySize >= 0) {
@@ -1302,7 +1304,9 @@ void Adaptation::Icap::ModXact::finalizeLogInfo()
         al.http.code = reply_->sline.status();
         al.http.content_type = reply_->content_type.termedBuf();
         if (replyHttpBodySize >= 0) {
-            al.cache.replySize = replyHttpBodySize + reply_->hdr_sz;
+            // XXX: should use icap-specific counters instead ?
+            al.http.clientReplySz.payloadData = replyHttpBodySize;
+            al.http.clientReplySz.header =  reply_->hdr_sz;
             al.cache.highOffset = replyHttpBodySize;
         }
         //don't set al.cache.objectSize because it hasn't exist yet
@@ -1349,7 +1353,7 @@ void Adaptation::Icap::ModXact::makeRequestHeaders(MemBuf &buf)
     if (virgin.header->header.has(HDR_PROXY_AUTHORIZATION)) {
         String vh=virgin.header->header.getByName("Proxy-Authorization");
         buf.Printf("Proxy-Authorization: " SQUIDSTRINGPH "\r\n", SQUIDSTRINGPRINT(vh));
-    } else if (request->extacl_user.defined() && request->extacl_user.size() && request->extacl_passwd.defined() && request->extacl_passwd.size()) {
+    } else if (request->extacl_user.size() > 0 && request->extacl_passwd.size() > 0) {
         char loginbuf[256];
         snprintf(loginbuf, sizeof(loginbuf), SQUIDSTRINGPH ":" SQUIDSTRINGPH,
                  SQUIDSTRINGPRINT(request->extacl_user),
@@ -1434,7 +1438,7 @@ void Adaptation::Icap::ModXact::makeRequestHeaders(MemBuf &buf)
 
         HttpReply *reply = dynamic_cast<HttpReply*>(virgin.header);
 
-        if (const char *value = (*i)->match(r, reply)) {
+        if (const char *value = (*i)->match(r, reply, alMaster)) {
             buf.Printf("%s: %s\r\n", (*i)->key.termedBuf(), value);
             Adaptation::History::Pointer ah = request->adaptHistory(false);
             if (ah != NULL) {
@@ -1506,7 +1510,7 @@ void Adaptation::Icap::ModXact::makeUsernameHeader(const HttpRequest *request, M
             const char *value = TheConfig.client_username_encode ? old_base64_encode(name) : name;
             buf.Printf("%s: %s\r\n", TheConfig.client_username_header, value);
         }
-    } else if (request->extacl_user.defined() && request->extacl_user.size()) {
+    } else if (request->extacl_user.size() > 0) {
         const char *value = TheConfig.client_username_encode ? old_base64_encode(request->extacl_user.termedBuf()) : request->extacl_user.termedBuf();
         buf.Printf("%s: %s\r\n", TheConfig.client_username_header, value);
     }
@@ -1944,9 +1948,10 @@ void Adaptation::Icap::ModXact::clearError()
 
 /* Adaptation::Icap::ModXactLauncher */
 
-Adaptation::Icap::ModXactLauncher::ModXactLauncher(HttpMsg *virginHeader, HttpRequest *virginCause, Adaptation::ServicePointer aService):
+Adaptation::Icap::ModXactLauncher::ModXactLauncher(HttpMsg *virginHeader, HttpRequest *virginCause, AccessLogEntry::Pointer &alp, Adaptation::ServicePointer aService):
         AsyncJob("Adaptation::Icap::ModXactLauncher"),
-        Adaptation::Icap::Launcher("Adaptation::Icap::ModXactLauncher", aService)
+        Adaptation::Icap::Launcher("Adaptation::Icap::ModXactLauncher", aService),
+        al(alp)
 {
     virgin.setHeader(virginHeader);
     virgin.setCause(virginCause);
@@ -1958,7 +1963,7 @@ Adaptation::Icap::Xaction *Adaptation::Icap::ModXactLauncher::createXaction()
     Adaptation::Icap::ServiceRep::Pointer s =
         dynamic_cast<Adaptation::Icap::ServiceRep*>(theService.getRaw());
     Must(s != NULL);
-    return new Adaptation::Icap::ModXact(virgin.header, virgin.cause, s);
+    return new Adaptation::Icap::ModXact(virgin.header, virgin.cause, al, s);
 }
 
 void Adaptation::Icap::ModXactLauncher::swanSong()
index e062697e603146a9165123fcc8f9342e99fcf81a..8828d28de2bf687532e6ba08af3d5212a13b938f 100644 (file)
 #ifndef SQUID_ICAPMODXACT_H
 #define SQUID_ICAPMODXACT_H
 
-#include "BodyPipe.h"
-#include "adaptation/icap/Xaction.h"
+#include "AccessLogEntry.h"
 #include "adaptation/icap/InOut.h"
 #include "adaptation/icap/Launcher.h"
+#include "adaptation/icap/Xaction.h"
+#include "BodyPipe.h"
 
 /*
  * ICAPModXact implements ICAP REQMOD and RESPMOD transaction using
@@ -132,7 +133,7 @@ class ModXact: public Xaction, public BodyProducer, public BodyConsumer
 {
 
 public:
-    ModXact(HttpMsg *virginHeader, HttpRequest *virginCause, ServiceRep::Pointer &s);
+    ModXact(HttpMsg *virginHeader, HttpRequest *virginCause, AccessLogEntry::Pointer &alp, ServiceRep::Pointer &s);
     virtual ~ModXact();
 
     // BodyProducer methods
@@ -337,6 +338,7 @@ private:
                      } sending;
     } state;
 
+    AccessLogEntry::Pointer alMaster; ///< Master transaction AccessLogEntry
     CBDATA_CLASS2(ModXact);
 };
 
@@ -345,7 +347,7 @@ private:
 class ModXactLauncher: public Launcher
 {
 public:
-    ModXactLauncher(HttpMsg *virginHeader, HttpRequest *virginCause, Adaptation::ServicePointer s);
+    ModXactLauncher(HttpMsg *virginHeader, HttpRequest *virginCause, AccessLogEntry::Pointer &alp, Adaptation::ServicePointer s);
 
 protected:
     virtual Xaction *createXaction();
@@ -357,6 +359,8 @@ protected:
 
     InOut virgin;
 
+    AccessLogEntry::Pointer al;
+
 private:
     CBDATA_CLASS2(ModXactLauncher);
 };
index e092d728434f89a95cac4cc2349c04eaed0d3a43..7fe04dd254cc147e7b88e4cd4093501fc27e8321 100644 (file)
@@ -51,6 +51,10 @@ void Adaptation::Icap::OptXact::makeRequest(MemBuf &buf)
     buf.Printf("OPTIONS " SQUIDSTRINGPH " ICAP/1.0\r\n", SQUIDSTRINGPRINT(uri));
     const String host = s.cfg().host;
     buf.Printf("Host: " SQUIDSTRINGPH ":%d\r\n", SQUIDSTRINGPRINT(host), s.cfg().port);
+
+    if (!TheConfig.reuse_connections)
+        buf.Printf("Connection: close\r\n");
+
     if (TheConfig.allow206_enable)
         buf.Printf("Allow: 206\r\n");
     buf.append(ICAP::crlf, 2);
index fd366c9077174b3cf6c2e966560a3528c17756be..70dc4952a7bfde7882fa2628fec5d7cd6e02a7ea 100644 (file)
@@ -31,8 +31,8 @@
 #ifndef SQUID_ICAPOPTXACT_H
 #define SQUID_ICAPOPTXACT_H
 
-#include "adaptation/icap/Xaction.h"
 #include "adaptation/icap/Launcher.h"
+#include "adaptation/icap/Xaction.h"
 
 namespace Adaptation
 {
index 6bc1e3032b1bc0f88e88bfb0b7738ad56fea6a5e..59502373a4e92770a05dfba8567d6f0b675506bc 100644 (file)
@@ -653,9 +653,9 @@ Adaptation::Icap::ServiceRep::optionsFetchTime() const
 
 Adaptation::Initiate *
 Adaptation::Icap::ServiceRep::makeXactLauncher(HttpMsg *virgin,
-        HttpRequest *cause)
+        HttpRequest *cause, AccessLogEntry::Pointer &alp)
 {
-    return new Adaptation::Icap::ModXactLauncher(virgin, cause, this);
+    return new Adaptation::Icap::ModXactLauncher(virgin, cause, alp, this);
 }
 
 // returns a temporary string depicting service status, for debugging
index 473e3809d1c6f31da0d1d0196ca3b49b738d6ee7..7097198fc67d4b9d36e0f6411f5b1a2f78abeff0 100644 (file)
 #ifndef SQUID_ICAPSERVICEREP_H
 #define SQUID_ICAPSERVICEREP_H
 
-#include "cbdata.h"
-#include "FadingCounter.h"
-#include "adaptation/Service.h"
 #include "adaptation/forward.h"
-#include "adaptation/Initiator.h"
 #include "adaptation/icap/Elements.h"
+#include "adaptation/Initiator.h"
+#include "adaptation/Service.h"
 #include "base/AsyncJobCalls.h"
+#include "cbdata.h"
 #include "comm.h"
+#include "FadingCounter.h"
 #include "pconn.h"
 #include <deque>
 
@@ -97,7 +97,7 @@ public:
     bool availableForNew() const; ///< a new transaction may start communicating with the service
     bool availableForOld() const; ///< a transaction notified about connection slot availability may start communicating with the service
 
-    virtual Initiate *makeXactLauncher(HttpMsg *virginHeader, HttpRequest *virginCause);
+    virtual Initiate *makeXactLauncher(HttpMsg *virginHeader, HttpRequest *virginCause, AccessLogEntry::Pointer &alp);
 
     void callWhenAvailable(AsyncCall::Pointer &cb, bool priority = false);
     void callWhenReady(AsyncCall::Pointer &cb);
index 0dd6938445d86c4e1a07ce6b7d82efaa00ea8a9e..5074bb8ae0b827c99bed0e86726a1986f18cb30c 100644 (file)
 #ifndef SQUID_ICAPXACTION_H
 #define SQUID_ICAPXACTION_H
 
-#include "comm/forward.h"
-#include "CommCalls.h"
-#include "MemBuf.h"
+#include "AccessLogEntry.h"
 #include "adaptation/icap/ServiceRep.h"
 #include "adaptation/Initiate.h"
-#include "AccessLogEntry.h"
+#include "comm/forward.h"
+#include "CommCalls.h"
 #include "HttpReply.h"
 #include "ipcache.h"
+#include "MemBuf.h"
 
 class CommConnectCbParams;
 namespace Comm
index a3dfe922eddebf09ca80e0e126783c5257060472..7a1f4d93a40d2080ad37d57025053c8b21d7ec6b 100644 (file)
@@ -1,9 +1,9 @@
 #include "squid.h"
-#include "icap_log.h"
 #include "AccessLogEntry.h"
 #include "acl/FilledChecklist.h"
-#include "HttpReply.h"
 #include "globals.h"
+#include "HttpReply.h"
+#include "icap_log.h"
 #include "log/CustomLog.h"
 #include "log/File.h"
 #include "log/Formats.h"
index 0ca048eba63b58b88ad9474594e37e3a8de4f154..cde58e641e98d8a91cd7f4236b502cdc617f74bf 100644 (file)
@@ -1,9 +1,9 @@
 #include "squid.h"
 #include "acl/Acl.h"
 #include "acl/FilledChecklist.h"
-#include "auth/UserRequest.h"
 #include "auth/Acl.h"
 #include "auth/AclProxyAuth.h"
+#include "auth/UserRequest.h"
 #include "client_side.h"
 #include "HttpRequest.h"
 
@@ -46,7 +46,7 @@ AuthenticateAcl(ACLChecklist *ch)
     /* Note: this fills in auth_user_request when applicable */
     const AuthAclState result = Auth::UserRequest::tryToAuthenticateAndSetAuthUser(
                                     &checklist->auth_user_request, headertype, request,
-                                    checklist->conn(), checklist->src_addr);
+                                    checklist->conn(), checklist->src_addr, checklist->al);
     switch (result) {
 
     case AUTH_ACL_CANNOT_AUTHENTICATE:
index 1b197c0e1c214670793ed777710d4af8fa091ed2..0a7072dd0427aa3aeaa6453078706fc6b1703efe 100644 (file)
@@ -8,10 +8,10 @@
 #include "auth/Acl.h"
 #include "auth/AclMaxUserIp.h"
 #include "auth/UserRequest.h"
-#include "Debug.h"
-#include "wordlist.h"
 #include "ConfigParser.h"
+#include "Debug.h"
 #include "Parsing.h"
+#include "wordlist.h"
 
 ACL *
 ACLMaxUserIP::clone() const
index f714fec009725f58d7195c9debd0813377db13f2..91e2bc164764f04d6fe4265eb1da7a3f75d7eaf1 100644 (file)
  */
 
 #include "squid.h"
-#include "auth/AclProxyAuth.h"
-#include "auth/Gadgets.h"
 #include "acl/FilledChecklist.h"
-#include "acl/UserData.h"
 #include "acl/RegexData.h"
-#include "client_side.h"
-#include "HttpRequest.h"
+#include "acl/UserData.h"
 #include "auth/Acl.h"
+#include "auth/AclProxyAuth.h"
+#include "auth/Gadgets.h"
 #include "auth/User.h"
 #include "auth/UserRequest.h"
+#include "client_side.h"
+#include "HttpRequest.h"
 
 ACLProxyAuth::~ACLProxyAuth()
 {
@@ -145,7 +145,7 @@ ProxyAuthLookup::checkForAsync(ACLChecklist *cl) const
     /* make sure someone created auth_user_request for us */
     assert(checklist->auth_user_request != NULL);
     assert(checklist->auth_user_request->valid());
-    checklist->auth_user_request->start(LookupDone, checklist);
+    checklist->auth_user_request->start(checklist->request, checklist->al, LookupDone, checklist);
 }
 
 void
index fb0854d02cf5b3322e8caf6d148612ecdafc6664..cdcb5aefc63886bb1a7630955bfe72d1053d51f2 100644 (file)
@@ -35,8 +35,8 @@
 #if USE_AUTH
 
 #include "acl/Acl.h"
-#include "acl/Data.h"
 #include "acl/Checklist.h"
+#include "acl/Data.h"
 
 class ProxyAuthLookup : public ACLChecklist::AsyncState
 {
index d396b42704a7687e7ea3944e8954a9b690d98ba8..dba69a7db633d151eafadb641d0c77c38b37915e 100644 (file)
 #include "squid.h"
 #include "auth/Config.h"
 #include "auth/UserRequest.h"
+#include "cache_cf.h"
+#include "ConfigParser.h"
 #include "Debug.h"
+#include "format/Format.h"
 #include "globals.h"
+#include "Store.h"
 
 Auth::ConfigVector Auth::TheConfig;
 
@@ -46,7 +50,7 @@ Auth::ConfigVector Auth::TheConfig;
  * It may also be NULL reflecting that no user could be created.
  */
 Auth::UserRequest::Pointer
-Auth::Config::CreateAuthUser(const char *proxy_auth)
+Auth::Config::CreateAuthUser(const char *proxy_auth, AccessLogEntry::Pointer &al)
 {
     assert(proxy_auth != NULL);
     debugs(29, 9, HERE << "header = '" << proxy_auth << "'");
@@ -58,8 +62,17 @@ Auth::Config::CreateAuthUser(const char *proxy_auth)
                "Unsupported or unconfigured/inactive proxy-auth scheme, '" << proxy_auth << "'");
         return NULL;
     }
+    static MemBuf rmb;
+    rmb.reset();
+    if (config->keyExtras) {
+        // %credentials and %username, which normally included in
+        // request_format, are - at this time, but that is OK
+        // because user name is added to key explicitly, and we do
+        // not want to store authenticated credentials at all.
+        config->keyExtras->assemble(rmb, al, 0);
+    }
 
-    return config->decode(proxy_auth);
+    return config->decode(proxy_auth, rmb.hasContent() ? rmb.content() : NULL);
 }
 
 Auth::Config *
@@ -76,3 +89,43 @@ Auth::Config::Find(const char *proxy_auth)
 void
 Auth::Config::registerWithCacheManager(void)
 {}
+
+void
+Auth::Config::parse(Auth::Config * scheme, int n_configured, char *param_str)
+{
+    if (strcmp(param_str, "key_extras") == 0) {
+        keyExtrasLine = ConfigParser::NextQuotedToken();
+        Format::Format *nlf =  new ::Format::Format(scheme->type());
+        if (!nlf->parse(keyExtrasLine.termedBuf())) {
+            debugs(29, DBG_CRITICAL, "FATAL: Failed parsing key_extras formatting value");
+            self_destruct();
+            return;
+        }
+        if (keyExtras)
+            delete keyExtras;
+
+        keyExtras = nlf;
+        
+        if (char *t = strtok(NULL, w_space)) {
+               debugs(29, DBG_CRITICAL, "FATAL: Unexpected argument '" << t << "' after request_format specification");
+               self_destruct();
+        }
+    } else {
+        debugs(29, DBG_CRITICAL, "Unrecognised " << scheme->type() << " auth scheme parameter '" << param_str << "'");
+    }
+}
+
+void
+Auth::Config::dump(StoreEntry *entry, const char *name, Auth::Config *scheme)
+{
+    if (keyExtrasLine.size() > 0)
+        storeAppendPrintf(entry, "%s %s key_extras \"%s\"\n", name, scheme->type(), keyExtrasLine.termedBuf());
+}
+
+void
+Auth::Config::done()
+{
+    delete keyExtras;
+    keyExtras = NULL; 
+    keyExtrasLine.clean();
+}
index ec29ed06dc25919de3706eb38924622139628ef9..6f1c981a415b5139b7037905e7ee758fbd00e495 100644 (file)
@@ -32,6 +32,7 @@
 
 #if USE_AUTH
 
+#include "AccessLogEntry.h"
 #include "auth/UserRequest.h"
 #include "HelperChildConfig.h"
 
@@ -43,6 +44,11 @@ class wordlist;
 /* for http_hdr_type parameters-by-value */
 #include "HttpHeader.h"
 
+namespace Format
+{
+    class Format;
+}
+
 namespace Auth
 {
 
@@ -61,10 +67,10 @@ class Config
 {
 
 public:
-    static UserRequest::Pointer CreateAuthUser(const char *proxy_auth);
+    static UserRequest::Pointer CreateAuthUser(const char *proxy_auth, AccessLogEntry::Pointer &al);
 
     static Config *Find(const char *proxy_auth);
-    Config() : authenticateChildren(20), authenticateProgram(NULL) {}
+    Config() : authenticateChildren(20), authenticateProgram(NULL), keyExtras(NULL) {}
 
     virtual ~Config() {}
 
@@ -86,7 +92,7 @@ public:
      \param proxy_auth Login Pattern to parse.
      \retval *         Details needed to authenticate.
      */
-    virtual UserRequest::Pointer decode(char const *proxy_auth) = 0;
+    virtual UserRequest::Pointer decode(char const *proxy_auth, const char *requestRealm) = 0;
 
     /**
      * squid is finished with this config, release any unneeded resources.
@@ -95,7 +101,7 @@ public:
      *
      \todo we need a 'done for reconfigure' and a 'done permanently' concept.
      */
-    virtual void done() = 0;
+    virtual void done();
 
     /**
      * The configured function is used to see if the auth module has been given valid
@@ -117,7 +123,7 @@ public:
      * Responsible for writing to the StoreEntry the configuration parameters that a user
      * would put in a config file to recreate the running configuration.
      */
-    virtual void dump(StoreEntry *, const char *, Config *) = 0;
+    virtual void dump(StoreEntry *, const char *, Config *);
 
     /** add headers as needed when challenging for auth */
     virtual void fixHeader(UserRequest::Pointer, HttpReply *, http_hdr_type, HttpRequest *) = 0;
@@ -129,7 +135,7 @@ public:
     virtual void registerWithCacheManager(void);
 
     /** parse config options */
-    virtual void parse(Config *, int, char *) = 0;
+    virtual void parse(Config *, int, char *);
 
     /** the http string id */
     virtual const char * type() const = 0;
@@ -137,6 +143,8 @@ public:
 public:
     HelperChildConfig authenticateChildren;
     wordlist *authenticateProgram; ///< Helper program to run, includes all parameters
+    String keyExtrasLine;  ///< The format of the request to the auth helper
+    Format::Format *keyExtras; ///< The compiled request format
 };
 
 typedef Vector<Config *> ConfigVector;
index a723a6b5628840809e64a7c720237f36ee9dd132..f31c9049cd54d9daa514edc64b545e547d41cb51 100644 (file)
 #include "squid.h"
 #include "acl/Acl.h"
 #include "acl/FilledChecklist.h"
-#include "client_side.h"
+#include "auth/AclProxyAuth.h"
 #include "auth/Config.h"
-#include "auth/Scheme.h"
 #include "auth/Gadgets.h"
+#include "auth/Scheme.h"
 #include "auth/User.h"
 #include "auth/UserRequest.h"
-#include "auth/AclProxyAuth.h"
+#include "client_side.h"
 #include "globals.h"
 #include "HttpReply.h"
 #include "HttpRequest.h"
@@ -139,7 +139,7 @@ authenticateReset(void)
 AuthUserHashPointer::AuthUserHashPointer(Auth::User::Pointer anAuth_user):
         auth_user(anAuth_user)
 {
-    key = (void *)anAuth_user->username();
+    key = (void *)anAuth_user->userKey();
     next = NULL;
     hash_join(proxy_auth_username_cache, (hash_link *) this);
 }
index 92a9e6ebe1d41edfa44c6660bf6331c6ebfc2079..c01c1a42fbbc53336aef1b6e812b9405996ed119 100644 (file)
 
 #if USE_AUTH
 
-#include "hash.h"
-#include "MemPool.h"
 #include "auth/Config.h"
 #include "auth/User.h"
+#include "hash.h"
+#include "MemPool.h"
 
 /**
  \ingroup AuthAPI
index 2423048bf260359fb473029559cd27acadb401ef..58a0e50aa56aee874439665860052b2a14c5c01b 100644 (file)
@@ -24,7 +24,6 @@ libauth_la_SOURCES = \
        State.h \
        State.cc \
        User.h \
-       User.cci \
        User.cc \
        UserRequest.h \
        UserRequest.cc
index 4a09bcfcc4c859375f40c770cd1e960bebe559ce..bce72370c424505ddd90bf83f4bfc2220bd57920 100644 (file)
@@ -32,9 +32,9 @@
  */
 
 #include "squid.h"
-#include "auth/Scheme.h"
-#include "auth/Gadgets.h"
 #include "auth/Config.h"
+#include "auth/Gadgets.h"
+#include "auth/Scheme.h"
 #include "globals.h"
 
 Vector<Auth::Scheme::Pointer> *Auth::Scheme::_Schemes = NULL;
index 1f2ed38aba100242b958a3980d462ff9f2da074c..f5d22fa01f87c81a61e7b35f24c19be39d5382cf 100644 (file)
@@ -33,8 +33,8 @@
 
 #if USE_AUTH
 
-#include "base/Vector.h"
 #include "base/RefCount.h"
+#include "base/Vector.h"
 
 /**
  \defgroup AuthSchemeAPI       Authentication Scheme API
index 95fd1d49e206283c299901a51ac7f2ac5eb48a32..739cbc2e24aa616cf092772e703df0de9c15713a 100644 (file)
  */
 
 #include "squid.h"
-#include "auth/User.h"
-#include "auth/UserRequest.h"
-#include "auth/Config.h"
-#include "auth/Gadgets.h"
 #include "acl/Acl.h"
 #include "acl/Gadgets.h"
+#include "auth/Config.h"
+#include "auth/Gadgets.h"
+#include "auth/User.h"
+#include "auth/UserRequest.h"
 #include "event.h"
 #include "globals.h"
 #include "SquidConfig.h"
 #include "SquidTime.h"
 #include "Store.h"
 
-#if !_USE_INLINE_
-#include "auth/User.cci"
-#endif
-
 // This should be converted into a pooled type. Does not need to be cbdata
 CBDATA_TYPE(AuthUserIP);
 
 time_t Auth::User::last_discard = 0;
 
-Auth::User::User(Auth::Config *aConfig) :
+Auth::User::User(Auth::Config *aConfig, const char *aRequestRealm) :
         auth_type(Auth::AUTH_UNKNOWN),
         config(aConfig),
         ipcount(0),
         expiretime(0),
+        notes(),
         credentials_state(Auth::Unchecked),
-        username_(NULL)
+        username_(NULL),
+        requestRealm_(aRequestRealm)
 {
     proxy_auth_list.head = proxy_auth_list.tail = NULL;
     proxy_match_cache.head = proxy_match_cache.tail = NULL;
@@ -99,6 +97,9 @@ Auth::User::absorb(Auth::User::Pointer from)
 
     debugs(29, 5, HERE << "auth_user '" << from << "' into auth_user '" << this << "'.");
 
+    // combine the helper response annotations. Ensuring no duplicates are copied.
+    notes.appendNewOnly(&from->notes);
+
     /* absorb the list of IP address sources (for max_user_ip controls) */
     AuthUserIP *new_ipdata;
     while (from->ip_list.head != NULL) {
@@ -338,6 +339,14 @@ Auth::User::addIp(Ip::Address ipaddr)
     debugs(29, 2, HERE << "user '" << username() << "' has been seen at a new IP address (" << ipaddr << ")");
 }
 
+SBuf
+Auth::User::BuildUserKey(const char *username, const char *realm)
+{
+    SBuf key;
+    key.Printf("%s:%s", username, realm);
+    return key;
+}
+
 /**
  * Add the Auth::User structure to the username cache.
  */
@@ -383,3 +392,16 @@ Auth::User::UsernameCacheStats(StoreEntry *output)
                          );
     }
 }
+
+void
+Auth::User::username(char const *aString)
+{
+    if (aString) {
+        assert(!username_);
+        username_ = xstrdup(aString);
+        if (!requestRealm_.isEmpty())
+            userKey_ = BuildUserKey(username_, requestRealm_.c_str());
+    } else {
+        safe_free(username_);
+    }
+}
diff --git a/src/auth/User.cci b/src/auth/User.cci
deleted file mode 100644 (file)
index 758c460..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * DEBUG: section 29    Authenticator
- * AUTHOR:  Robert Collins
- *
- * SQUID Web Proxy Cache          http://www.squid-cache.org/
- * ----------------------------------------------------------
- *
- *  Squid is the result of efforts by numerous individuals from
- *  the Internet community; see the CONTRIBUTORS file for full
- *  details.   Many organizations have provided support for Squid's
- *  development; see the SPONSORS file for full details.  Squid is
- *  Copyrighted (C) 2001 by the Regents of the University of
- *  California; see the COPYRIGHT file for full details.  Squid
- *  incorporates software developed and/or copyrighted by other
- *  sources; see the CREDITS file for full details.
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
- *
- * Copyright (c) 2003, Robert Collins <robertc@squid-cache.org>
- */
-
-char const *
-Auth::User::username () const
-{
-    return username_;
-}
-
-void
-Auth::User::username(char const *aString)
-{
-    if (aString) {
-        assert(!username_);
-        username_ = xstrdup(aString);
-    } else {
-        safe_free(username_);
-    }
-}
index 11d2e15078bc78eb0adad543bfc63a352c8de6ff..74de93cfd83ade3f639b31be864c0bdf27d62c18 100644 (file)
@@ -39,6 +39,8 @@
 #include "base/RefCount.h"
 #include "dlink.h"
 #include "ip/Address.h"
+#include "Notes.h"
+#include "SBuf.h"
 
 class AuthUserHashPointer;
 class StoreEntry;
@@ -75,14 +77,20 @@ public:
     size_t ipcount;
     long expiretime;
 
+    /// list of key=value pairs the helper produced
+    NotePairs notes;
+
 public:
     static void cacheInit();
     static void CachedACLsReset();
+    static SBuf BuildUserKey(const char *username, const char *realm);
 
     void absorb(Auth::User::Pointer from);
     virtual ~User();
-    _SQUID_INLINE_ char const *username() const;
-    _SQUID_INLINE_ void username(char const *);
+    char const *username() const { return username_; }
+    void username(char const *);
+
+    const char *userKey() {return !userKey_.isEmpty() ? userKey_.c_str() : username_;}
 
     /**
      * How long these credentials are still valid for.
@@ -113,7 +121,7 @@ private:
     CredentialState credentials_state;
 
 protected:
-    User(Auth::Config *);
+    User(Auth::Config *, const char *requestRealm);
 
 private:
     /**
@@ -129,15 +137,22 @@ private:
      */
     const char *username_;
 
+    /**
+     * A realm for the user depending on request, designed to identify users,
+     * with the same username and different authentication domains.
+     */
+    SBuf requestRealm_;
+
+    /**
+     * A Unique key for the user, consist by username and requestRealm_
+     */
+    SBuf userKey_;
+
     /** what ip addresses has this user been seen at?, plus a list length cache */
     dlink_list ip_list;
 };
 
 } // namespace Auth
 
-#if _USE_INLINE_
-#include "auth/User.cci"
-#endif
-
 #endif /* USE_AUTH */
 #endif /* SQUID_AUTH_USER_H */
index 9d7761af8e381d6c2bccf14c0b8b54dfdd7beab0..5315c7cb4b6941eed6327ba0d086977cacbe6592 100644 (file)
 #include "squid.h"
 #include "auth/Config.h"
 #include "auth/Scheme.h"
-#include "auth/UserRequest.h"
 #include "auth/User.h"
+#include "auth/UserRequest.h"
 #include "client_side.h"
 #include "comm/Connection.h"
 #include "HttpReply.h"
 #include "HttpRequest.h"
+#include "format/Format.h"
+#include "MemBuf.h"
 
 /* Generic Functions */
 
@@ -59,12 +61,12 @@ Auth::UserRequest::username() const
 
 /* send the initial data to an authenticator module */
 void
-Auth::UserRequest::start(AUTHCB * handler, void *data)
+Auth::UserRequest::start(HttpRequest *request, AccessLogEntry::Pointer &al, AUTHCB * handler, void *data)
 {
     assert(handler);
     assert(data);
     debugs(29, 9, HERE << "auth_user_request '" << this << "'");
-    module_start(handler, data);
+    module_start(request, al, handler, data);
 }
 
 bool
@@ -248,14 +250,27 @@ authenticateAuthenticateUser(Auth::UserRequest::Pointer auth_user_request, HttpR
 static Auth::UserRequest::Pointer
 authTryGetUser(Auth::UserRequest::Pointer auth_user_request, ConnStateData * conn, HttpRequest * request)
 {
+    Auth::UserRequest::Pointer res;
+
     if (auth_user_request != NULL)
-        return auth_user_request;
+        res = auth_user_request;
     else if (request != NULL && request->auth_user_request != NULL)
-        return request->auth_user_request;
+        res = request->auth_user_request;
     else if (conn != NULL)
-        return conn->getAuth();
-    else
-        return NULL;
+        res = conn->getAuth();
+
+    // attach the credential notes from helper to the transaction
+    if (request != NULL && res != NULL && res->user() != NULL) {
+        // XXX: we have no access to the transaction / AccessLogEntry so cant SyncNotes().
+        // workaround by using anything already set in HttpRequest
+        // OR use new and rely on a later Sync copying these to AccessLogEntry
+        if (!request->notes)
+            request->notes = new NotePairs;
+
+        request->notes->appendNewOnly(&res->user()->notes);
+    }
+
+    return res;
 }
 
 /* returns one of
@@ -280,7 +295,7 @@ authTryGetUser(Auth::UserRequest::Pointer auth_user_request, ConnStateData * con
  * Caller is responsible for locking and unlocking their *auth_user_request!
  */
 AuthAclState
-Auth::UserRequest::authenticate(Auth::UserRequest::Pointer * auth_user_request, http_hdr_type headertype, HttpRequest * request, ConnStateData * conn, Ip::Address &src_addr)
+Auth::UserRequest::authenticate(Auth::UserRequest::Pointer * auth_user_request, http_hdr_type headertype, HttpRequest * request, ConnStateData * conn, Ip::Address &src_addr, AccessLogEntry::Pointer &al)
 {
     const char *proxy_auth;
     assert(headertype != 0);
@@ -359,7 +374,7 @@ Auth::UserRequest::authenticate(Auth::UserRequest::Pointer * auth_user_request,
             /* beginning of a new request check */
             debugs(29, 4, HERE << "No connection authentication type");
 
-            *auth_user_request = Auth::Config::CreateAuthUser(proxy_auth);
+            *auth_user_request = Auth::Config::CreateAuthUser(proxy_auth, al);
             if (*auth_user_request == NULL)
                 return AUTH_ACL_CHALLENGE;
             else if (!(*auth_user_request)->valid()) {
@@ -442,7 +457,7 @@ Auth::UserRequest::authenticate(Auth::UserRequest::Pointer * auth_user_request,
 }
 
 AuthAclState
-Auth::UserRequest::tryToAuthenticateAndSetAuthUser(Auth::UserRequest::Pointer * aUR, http_hdr_type headertype, HttpRequest * request, ConnStateData * conn, Ip::Address &src_addr)
+Auth::UserRequest::tryToAuthenticateAndSetAuthUser(Auth::UserRequest::Pointer * aUR, http_hdr_type headertype, HttpRequest * request, ConnStateData * conn, Ip::Address &src_addr, AccessLogEntry::Pointer &al)
 {
     // If we have already been called, return the cached value
     Auth::UserRequest::Pointer t = authTryGetUser(*aUR, conn, request);
@@ -458,7 +473,7 @@ Auth::UserRequest::tryToAuthenticateAndSetAuthUser(Auth::UserRequest::Pointer *
     }
 
     // ok, call the actual authenticator routine.
-    AuthAclState result = authenticate(aUR, headertype, request, conn, src_addr);
+    AuthAclState result = authenticate(aUR, headertype, request, conn, src_addr, al);
 
     // auth process may have changed the UserRequest we are dealing with
     t = authTryGetUser(*aUR, conn, request);
@@ -551,3 +566,20 @@ Auth::UserRequest::scheme() const
 {
     return Auth::Scheme::Find(user()->config->type());
 }
+
+const char *
+Auth::UserRequest::helperRequestKeyExtras(HttpRequest *request, AccessLogEntry::Pointer &al)
+{
+    if (Format::Format *reqFmt = user()->config->keyExtras) {
+        static MemBuf mb;
+        mb.reset();
+        // We should pass AccessLogEntry as second argument ....
+        Auth::UserRequest::Pointer oldReq = request->auth_user_request;
+        request->auth_user_request = this;
+        reqFmt->assemble(mb, al, 0);
+        request->auth_user_request = oldReq;
+        debugs(29, 5, "Assembled line to send :" << mb.content());
+        return mb.content();
+    }
+    return NULL;
+}
index beed1b994218645abe3e78a922844478b145719e..7ca884e24cf158b7177eaa0a008e254126fca4e5 100644 (file)
 
 #if USE_AUTH
 
+#include "AccessLogEntry.h"
 #include "auth/AuthAclState.h"
 #include "auth/Scheme.h"
 #include "auth/User.h"
 #include "dlink.h"
-#include "ip/Address.h"
 #include "helper.h"
 #include "HttpHeader.h"
+#include "ip/Address.h"
 
 class ConnStateData;
 class HttpReply;
@@ -164,7 +165,7 @@ public:
      * \param handler  Handler to process the callback when its run
      * \param data     CBDATA for handler
      */
-    virtual void module_start(AUTHCB *handler, void *data) = 0;
+    virtual void module_start(HttpRequest *request, AccessLogEntry::Pointer &al, AUTHCB *handler, void *data) = 0;
 
     // User credentials object this UserRequest is managing
     virtual User::Pointer user() {return _auth_user;}
@@ -189,12 +190,12 @@ public:
      *
      * \return Some AUTH_ACL_* state
      */
-    static AuthAclState tryToAuthenticateAndSetAuthUser(UserRequest::Pointer *aUR, http_hdr_type, HttpRequest *, ConnStateData *, Ip::Address &);
+    static AuthAclState tryToAuthenticateAndSetAuthUser(UserRequest::Pointer *aUR, http_hdr_type, HttpRequest *, ConnStateData *, Ip::Address &, AccessLogEntry::Pointer &);
 
     /// Add the appropriate [Proxy-]Authenticate header to the given reply
     static void addReplyAuthHeader(HttpReply * rep, UserRequest::Pointer auth_user_request, HttpRequest * request, int accelerated, int internal);
 
-    void start(AUTHCB *handler, void *data);
+    void start(HttpRequest *request, AccessLogEntry::Pointer &al, AUTHCB *handler, void *data);
     char const * denyMessage(char const * const default_message = NULL);
 
     /** Possibly overrideable in future */
@@ -217,9 +218,15 @@ public:
 
     virtual const char * connLastHeader();
 
+    /**
+     * The string representation of the credentials send by client
+     */
+    virtual const char *credentialsStr() = 0;
+
+    const char *helperRequestKeyExtras(HttpRequest *, AccessLogEntry::Pointer &al);
 private:
 
-    static AuthAclState authenticate(UserRequest::Pointer * auth_user_request, http_hdr_type headertype, HttpRequest * request, ConnStateData * conn, Ip::Address &src_addr);
+    static AuthAclState authenticate(UserRequest::Pointer * auth_user_request, http_hdr_type headertype, HttpRequest * request, ConnStateData * conn, Ip::Address &src_addr, AccessLogEntry::Pointer &al);
 
     /** return a message on the 407 error pages */
     char *message;
index 607058987ab67df90b6d518b467ca482b702c7a2..bbd217742b168dd9dd13ba36161c29328270ab74 100644 (file)
@@ -31,8 +31,8 @@
 #ifndef SQUID_AUTH_BASIC_SCHEME_H
 #define SQUID_AUTH_BASIC_SCHEME_H
 
-#include "auth/Scheme.h"
 #include "auth/basic/auth_basic.h"
+#include "auth/Scheme.h"
 
 namespace Auth
 {
index 66320d2241f24ab05c68f729cf86682990e079b9..273ee33f2f55f0a6abdf935a1fc751e6a2bc693c 100644 (file)
@@ -5,8 +5,8 @@
 #include "SquidConfig.h"
 #include "SquidTime.h"
 
-Auth::Basic::User::User(Auth::Config *aConfig) :
-        Auth::User(aConfig),
+Auth::Basic::User::User(Auth::Config *aConfig, const char *aRequestRealm) :
+        Auth::User(aConfig, aRequestRealm),
         passwd(NULL),
         queue(NULL),
         currentRequest(NULL)
index 52ed43cfb5631d04622cd8b02c996be1b81edb60..1226fb736cec4e18837ffde83b2216c0a52bf4bb 100644 (file)
@@ -19,7 +19,7 @@ class User : public Auth::User
 public:
     MEMPROXY_CLASS(Auth::Basic::User);
 
-    User(Auth::Config *);
+    User(Auth::Config *, const char *requestRealm);
     ~User();
     bool authenticated() const;
     bool valid() const;
index c85830fc3d6d173195b0c4320b8201aa9d81349e..a9f6305ec70311b0d90c495dadc016f13f0923e1 100644 (file)
@@ -7,6 +7,10 @@
 #include "charset.h"
 #include "Debug.h"
 #include "HelperReply.h"
+#include "HttpMsg.h"
+#include "HttpRequest.h"
+#include "format/Format.h"
+#include "MemBuf.h"
 #include "rfc1738.h"
 #include "SquidTime.h"
 
@@ -25,6 +29,15 @@ Auth::Basic::UserRequest::authenticated() const
     return 0;
 }
 
+const char *
+Auth::Basic::UserRequest::credentialsStr()
+{
+    Auth::Basic::User const *basic_auth = dynamic_cast<Auth::Basic::User const *>(user().getRaw());
+    if (basic_auth)
+        return basic_auth->passwd;
+    return NULL;
+}
+
 /* log a basic user in
  */
 void
@@ -80,7 +93,7 @@ Auth::Basic::UserRequest::module_direction()
 
 /* send the initial data to a basic authenticator module */
 void
-Auth::Basic::UserRequest::module_start(AUTHCB * handler, void *data)
+Auth::Basic::UserRequest::module_start(HttpRequest *request, AccessLogEntry::Pointer &al, AUTHCB * handler, void *data)
 {
     assert(user()->auth_type == Auth::AUTH_BASIC);
     Auth::Basic::User *basic_auth = dynamic_cast<Auth::Basic::User *>(user().getRaw());
@@ -120,7 +133,12 @@ Auth::Basic::UserRequest::module_start(AUTHCB * handler, void *data)
         xstrncpy(usern, rfc1738_escape(user()->username()), sizeof(usern));
         xstrncpy(pass, rfc1738_escape(basic_auth->passwd), sizeof(pass));
     }
-    int sz = snprintf(buf, sizeof(buf), "%s %s\n", usern, pass);
+    int sz = 0;
+    if (const char *keyExtras = helperRequestKeyExtras(request, al))
+        sz = snprintf(buf, sizeof(buf), "%s %s %s\n", usern, pass, keyExtras);
+    else
+        sz = snprintf(buf, sizeof(buf), "%s %s\n", usern, pass);
+
     if (sz<=0) {
         debugs(9, DBG_CRITICAL, "ERROR: Basic Authentication Failure. Can not build helper validation request.");
         handler(data);
@@ -142,6 +160,10 @@ Auth::Basic::UserRequest::HandleReply(void *data, const HelperReply &reply)
     assert(r->auth_user_request != NULL);
     assert(r->auth_user_request->user()->auth_type == Auth::AUTH_BASIC);
 
+    // add new helper kv-pair notes to the credentials object
+    // so that any transaction using those credentials can access them
+    r->auth_user_request->user()->notes.appendNewOnly(&reply.notes);
+
     /* this is okay since we only play with the Auth::Basic::User child fields below
      * and dont pass the pointer itself anywhere */
     Auth::Basic::User *basic_auth = dynamic_cast<Auth::Basic::User *>(r->auth_user_request->user().getRaw());
index 4dafb094f3a5e8546cd7670a2e5d61d75ac1e13d..7fad9169c73f635fcb7e3fa70b9c653f1c941dc0 100644 (file)
@@ -26,7 +26,8 @@ public:
     virtual int authenticated() const;
     virtual void authenticate(HttpRequest * request, ConnStateData *conn, http_hdr_type type);
     virtual Auth::Direction module_direction();
-    virtual void module_start(AUTHCB *, void *);
+    virtual void module_start(HttpRequest * request, AccessLogEntry::Pointer &al, AUTHCB *, void *);
+    virtual const char *credentialsStr();
 
 private:
     static HLPCB HandleReply;
index 71002efeab24d379d7840f7249c30a16aea28c55..8b47206a1999143247fe99438f75c7ca2462bfe6 100644 (file)
 #include "auth/State.h"
 #include "cache_cf.h"
 #include "charset.h"
-#include "mgr/Registration.h"
-#include "Store.h"
 #include "HttpHeaderTools.h"
 #include "HttpReply.h"
+#include "mgr/Registration.h"
 #include "rfc1738.h"
+#include "SquidTime.h"
+#include "Store.h"
 #include "uudecode.h"
 #include "wordlist.h"
-#include "SquidTime.h"
 
 /* Basic Scheme */
 static AUTHSSTATS authenticateBasicStats;
@@ -116,6 +116,8 @@ Auth::Basic::Config::rotateHelpers()
 void
 Auth::Basic::Config::done()
 {
+    Auth::Config::done();
+
     authbasic_initialised = 0;
 
     if (basicauthenticators) {
@@ -149,6 +151,7 @@ Auth::Basic::Config::dump(StoreEntry * entry, const char *name, Auth::Config * s
     storeAppendPrintf(entry, "%s basic children %d startup=%d idle=%d concurrency=%d\n", name, authenticateChildren.n_max, authenticateChildren.n_startup, authenticateChildren.n_idle, authenticateChildren.concurrency);
     storeAppendPrintf(entry, "%s basic credentialsttl %d seconds\n", name, (int) credentialsTTL);
     storeAppendPrintf(entry, "%s basic casesensitive %s\n", name, casesensitive ? "on" : "off");
+    Auth::Config::dump(entry, name, scheme);
 }
 
 Auth::Basic::Config::Config() :
@@ -184,9 +187,8 @@ Auth::Basic::Config::parse(Auth::Config * scheme, int n_configured, char *param_
         parse_onoff(&casesensitive);
     } else if (strcmp(param_str, "utf8") == 0) {
         parse_onoff(&utf8);
-    } else {
-        debugs(29, DBG_CRITICAL, HERE << "unrecognised basic auth scheme parameter '" << param_str << "'");
-    }
+    } else
+        Auth::Config::parse(scheme, n_configured, param_str);
 }
 
 static void
@@ -196,15 +198,15 @@ authenticateBasicStats(StoreEntry * sentry)
 }
 
 static Auth::User::Pointer
-authBasicAuthUserFindUsername(const char *username)
+authBasicAuthUserFindUsername(const char *userkey)
 {
     AuthUserHashPointer *usernamehash;
-    debugs(29, 9, HERE << "Looking for user '" << username << "'");
+    debugs(29, 9, "Looking for user '" << userkey << "'");
 
-    if (username && (usernamehash = static_cast<AuthUserHashPointer *>(hash_lookup(proxy_auth_username_cache, username)))) {
+    if (userkey && (usernamehash = static_cast<AuthUserHashPointer *>(hash_lookup(proxy_auth_username_cache, userkey)))) {
         while (usernamehash) {
             if ((usernamehash->user()->auth_type == Auth::AUTH_BASIC) &&
-                    !strcmp(username, (char const *)usernamehash->key))
+                    !strcmp(userkey, (char const *)usernamehash->key))
                 return usernamehash->user();
 
             usernamehash = static_cast<AuthUserHashPointer *>(usernamehash->next);
@@ -257,7 +259,7 @@ Auth::Basic::Config::decodeCleartext(const char *httpAuthHeader)
  * descriptive message to the user.
  */
 Auth::UserRequest::Pointer
-Auth::Basic::Config::decode(char const *proxy_auth)
+Auth::Basic::Config::decode(char const *proxy_auth, const char *aRequestRealm)
 {
     Auth::UserRequest::Pointer auth_user_request = dynamic_cast<Auth::UserRequest*>(new Auth::Basic::UserRequest);
     /* decode the username */
@@ -275,18 +277,18 @@ Auth::Basic::Config::decode(char const *proxy_auth)
 
     char *seperator = strchr(cleartext, ':');
 
-    lb = local_basic = new Auth::Basic::User(this);
-    if (seperator == NULL) {
-        local_basic->username(cleartext);
-    } else {
+    lb = local_basic = new Auth::Basic::User(this, aRequestRealm);
+
+    if (seperator) {
         /* terminate the username */
         *seperator = '\0';
-        local_basic->username(cleartext);
         local_basic->passwd = xstrdup(seperator+1);
     }
 
     if (!casesensitive)
-        Tolower((char *)local_basic->username());
+        Tolower(cleartext);
+    local_basic->username(cleartext);
+
 
     if (local_basic->passwd == NULL) {
         debugs(29, 4, HERE << "no password in proxy authorization header '" << proxy_auth << "'");
@@ -310,7 +312,7 @@ Auth::Basic::Config::decode(char const *proxy_auth)
     /* now lookup and see if we have a matching auth_user structure in memory. */
     Auth::User::Pointer auth_user;
 
-    if ((auth_user = authBasicAuthUserFindUsername(lb->username())) == NULL) {
+    if ((auth_user = authBasicAuthUserFindUsername(lb->userKey())) == NULL) {
         /* the user doesn't exist in the username cache yet */
         /* save the credentials */
         debugs(29, 9, HERE << "Creating new user '" << lb->username() << "'");
index 3e10b21f6d3439315d64b8963a3f339f0e50ff60..e15fe26747bfcfc8841b120bf9760c35b79904bf 100644 (file)
@@ -6,9 +6,9 @@
 #ifndef __AUTH_BASIC_H__
 #define __AUTH_BASIC_H__
 
+#include "auth/Config.h"
 #include "auth/Gadgets.h"
 #include "auth/UserRequest.h"
-#include "auth/Config.h"
 #include "helper.h"
 
 #define DefaultAuthenticateChildrenMax  32     /* 32 processes */
@@ -26,7 +26,7 @@ public:
     ~Config();
     virtual bool active() const;
     virtual bool configured() const;
-    virtual Auth::UserRequest::Pointer decode(char const *proxy_auth);
+    virtual Auth::UserRequest::Pointer decode(char const *proxy_auth, const char *requestRealm);
     virtual void done();
     virtual void rotateHelpers();
     virtual void dump(StoreEntry *, const char *, Auth::Config *);
index 30e2f4dbb46daa01b23efb6ba33b344cb7aba0d0..6b34665772c43e4291c58faf3151e7feb6909f72 100644 (file)
@@ -31,8 +31,8 @@
 #ifndef SQUID_AUTH_DIGEST_SCHEME_H
 #define SQUID_AUTH_DIGEST_SCHEME_H
 
-#include "auth/Scheme.h"
 #include "auth/digest/auth_digest.h"
+#include "auth/Scheme.h"
 
 namespace Auth
 {
index 1cf7dd0ba51b5df061ee5569484e093b84bf916b..ecb2b1988891ad21727a61eb68b11e0e70fffea1 100644 (file)
@@ -6,8 +6,8 @@
 #include "SquidConfig.h"
 #include "SquidTime.h"
 
-Auth::Digest::User::User(Auth::Config *aConfig) :
-        Auth::User(aConfig),
+Auth::Digest::User::User(Auth::Config *aConfig, const char *aRequestRealm) :
+        Auth::User(aConfig, aRequestRealm),
         HA1created(0)
 {
     memset(HA1, 0, sizeof(HA1));
index 2e86534d0ff6e56e15f5f863b70148124996ea72..08ccae847de4b3b706958e6352ed828c4e7df405 100644 (file)
@@ -14,7 +14,7 @@ class User : public Auth::User
 public:
     MEMPROXY_CLASS(Auth::Digest::User);
 
-    User(Auth::Config *);
+    User(Auth::Config *, const char *requestRealm);
     ~User();
     int authenticated() const;
 
index e9fc63012b7b6d2084ebfa65675503f40ae06f27..0a4e9452ee504b801d814310c6b37070a2947223 100644 (file)
@@ -1,4 +1,5 @@
 #include "squid.h"
+#include "AccessLogEntry.h"
 #include "auth/digest/auth_digest.h"
 #include "auth/digest/User.h"
 #include "auth/digest/UserRequest.h"
@@ -7,6 +8,8 @@
 #include "HttpHeaderTools.h"
 #include "HttpReply.h"
 #include "HttpRequest.h"
+#include "format/Format.h"
+#include "MemBuf.h"
 #include "SquidTime.h"
 
 Auth::Digest::UserRequest::UserRequest() :
@@ -56,6 +59,12 @@ Auth::Digest::UserRequest::authenticated() const
     return 0;
 }
 
+const char *
+Auth::Digest::UserRequest::credentialsStr()
+{
+    return realm;
+}
+
 /** log a digest user in
  */
 void
@@ -149,14 +158,14 @@ Auth::Digest::UserRequest::authenticate(HttpRequest * request, ConnStateData * c
             digest_request->setDenyMessage("Incorrect password");
             return;
         }
+    }
 
-        /* check for stale nonce */
-        if (!authDigestNonceIsValid(digest_request->nonce, digest_request->nc)) {
-            debugs(29, 3, HERE << "user '" << auth_user->username() << "' validated OK but nonce stale");
-            auth_user->credentials(Auth::Failed);
-            digest_request->setDenyMessage("Stale nonce");
-            return;
-        }
+    /* check for stale nonce */
+    if (!authDigestNonceIsValid(digest_request->nonce, digest_request->nc)) {
+        debugs(29, 3, "user '" << auth_user->username() << "' validated OK but nonce stale");
+        auth_user->credentials(Auth::Failed);
+        digest_request->setDenyMessage("Stale nonce");
+        return;
     }
 
     auth_user->credentials(Auth::Ok);
@@ -248,7 +257,7 @@ Auth::Digest::UserRequest::addAuthenticationInfoTrailer(HttpReply * rep, int acc
 
 /* send the initial data to a digest authenticator module */
 void
-Auth::Digest::UserRequest::module_start(AUTHCB * handler, void *data)
+Auth::Digest::UserRequest::module_start(HttpRequest *request, AccessLogEntry::Pointer &al, AUTHCB * handler, void *data)
 {
     char buf[8192];
 
@@ -261,12 +270,19 @@ Auth::Digest::UserRequest::module_start(AUTHCB * handler, void *data)
         return;
     }
 
+    const char *keyExtras = helperRequestKeyExtras(request, al);
     if (static_cast<Auth::Digest::Config*>(Auth::Config::Find("digest"))->utf8) {
         char userstr[1024];
         latin1_to_utf8(userstr, sizeof(userstr), user()->username());
-        snprintf(buf, 8192, "\"%s\":\"%s\"\n", userstr, realm);
+        if (keyExtras)
+            snprintf(buf, 8192, "\"%s\":\"%s\" %s\n", userstr, realm, keyExtras);
+        else
+            snprintf(buf, 8192, "\"%s\":\"%s\"\n", userstr, realm);
     } else {
-        snprintf(buf, 8192, "\"%s\":\"%s\"\n", user()->username(), realm);
+        if (keyExtras)
+            snprintf(buf, 8192, "\"%s\":\"%s\" %s\n", user()->username(), realm, keyExtras);
+        else
+            snprintf(buf, 8192, "\"%s\":\"%s\"\n", user()->username(), realm);
     }
 
     helperSubmit(digestauthenticators, buf, Auth::Digest::UserRequest::HandleReply,
@@ -282,6 +298,10 @@ Auth::Digest::UserRequest::HandleReply(void *data, const HelperReply &reply)
     assert(replyData->auth_user_request != NULL);
     Auth::UserRequest::Pointer auth_user_request = replyData->auth_user_request;
 
+    // add new helper kv-pair notes to the credentials object
+    // so that any transaction using those credentials can access them
+    auth_user_request->user()->notes.appendNewOnly(&reply.notes);
+
     static bool oldHelperWarningDone = false;
     switch (reply.result) {
     case HelperReply::Unknown: {
index 6c328ed933ed2100f884da4ba37c7df634ef4828..85415d1801d38cb6e2795ee5bc20b5c5bab9e44c 100644 (file)
@@ -1,8 +1,8 @@
 #ifndef _SQUID_SRC_AUTH_DIGEST_USERREQUEST_H
 #define _SQUID_SRC_AUTH_DIGEST_USERREQUEST_H
 
-#include "auth/UserRequest.h"
 #include "auth/digest/auth_digest.h"
+#include "auth/UserRequest.h"
 #include "MemPool.h"
 
 class ConnStateData;
@@ -34,7 +34,8 @@ public:
     virtual void addAuthenticationInfoTrailer(HttpReply * rep, int accel);
 #endif
 
-    virtual void module_start(AUTHCB *, void *);
+    virtual void module_start(HttpRequest *request, AccessLogEntry::Pointer &al, AUTHCB *, void *);
+    virtual const char *credentialsStr();
 
     char *nonceb64;             /* "dcd98b7102dd2f0e8b11d0f600bfb0c093" */
     char *cnonce;               /* "0a4f113b" */
index f9609c842a1818f7673835db3a49e5e0d6a67c46..1b7c738a3f7b68645aefaeecea7d934e93532df5 100644 (file)
@@ -35,8 +35,6 @@
  * See acl.c for access control and client_side.c for auditing */
 
 #include "squid.h"
-#include "cache_cf.h"
-#include "rfc2617.h"
 #include "auth/digest/auth_digest.h"
 #include "auth/digest/Scheme.h"
 #include "auth/digest/User.h"
 #include "auth/Gadgets.h"
 #include "auth/State.h"
 #include "base64.h"
-#include "base/StringArea.h"
+#include "cache_cf.h"
 #include "event.h"
 #include "HttpHeaderTools.h"
-#include "mgr/Registration.h"
-#include "Store.h"
-#include "HttpRequest.h"
 #include "HttpReply.h"
-#include "wordlist.h"
+#include "HttpRequest.h"
+#include "mgr/Registration.h"
+#include "rfc2617.h"
+#include "SBuf.h"
 #include "SquidTime.h"
+#include "Store.h"
 #include "StrList.h"
+#include "wordlist.h"
 
 /* Digest Scheme */
 
@@ -477,12 +477,12 @@ authDigestNoncePurge(digest_nonce_h * nonce)
 
 /* USER related functions */
 static Auth::User::Pointer
-authDigestUserFindUsername(const char *username)
+authDigestUserFindUsername(const char *userkey)
 {
     AuthUserHashPointer *usernamehash;
-    debugs(29, 9, HERE << "Looking for user '" << username << "'");
+    debugs(29, 9, "Looking for user '" << userkey << "'");
 
-    if (username && (usernamehash = static_cast < AuthUserHashPointer * >(hash_lookup(proxy_auth_username_cache, username)))) {
+    if ((usernamehash = static_cast < AuthUserHashPointer * >(hash_lookup(proxy_auth_username_cache, userkey)))) {
         while ((usernamehash->user()->auth_type != Auth::AUTH_DIGEST) && (usernamehash->next))
             usernamehash = static_cast<AuthUserHashPointer *>(usernamehash->next);
 
@@ -523,6 +523,7 @@ Auth::Digest::Config::dump(StoreEntry * entry, const char *name, Auth::Config *
                       name, "digest", noncemaxuses,
                       name, "digest", (int) noncemaxduration,
                       name, "digest", (int) nonceGCInterval);
+    Auth::Config::dump(entry, name, scheme);
 }
 
 bool
@@ -605,6 +606,8 @@ Auth::Digest::Config::registerWithCacheManager(void)
 void
 Auth::Digest::Config::done()
 {
+    Auth::Config::done();
+
     authdigest_initialised = 0;
 
     if (digestauthenticators)
@@ -666,9 +669,8 @@ Auth::Digest::Config::parse(Auth::Config * scheme, int n_configured, char *param
         parse_onoff(&PostWorkaround);
     } else if (strcmp(param_str, "utf8") == 0) {
         parse_onoff(&utf8);
-    } else {
-        debugs(29, DBG_CRITICAL, "unrecognised digest auth scheme parameter '" << param_str << "'");
-    }
+    } else
+        Auth::Config::parse(scheme, n_configured, param_str);
 }
 
 const char *
@@ -758,13 +760,13 @@ authDigestUserLinkNonce(Auth::Digest::User * user, digest_nonce_h * nonce)
 
 /* setup the necessary info to log the username */
 static Auth::UserRequest::Pointer
-authDigestLogUsername(char *username, Auth::UserRequest::Pointer auth_user_request)
+authDigestLogUsername(char *username, Auth::UserRequest::Pointer auth_user_request, const char *requestRealm)
 {
     assert(auth_user_request != NULL);
 
     /* log the username */
     debugs(29, 9, "Creating new user for logging '" << (username?username:"[no username]") << "'");
-    Auth::User::Pointer digest_user = new Auth::Digest::User(static_cast<Auth::Digest::Config*>(Auth::Config::Find("digest")));
+    Auth::User::Pointer digest_user = new Auth::Digest::User(static_cast<Auth::Digest::Config*>(Auth::Config::Find("digest")), requestRealm);
     /* save the credentials */
     digest_user->username(username);
     /* set the auth_user type */
@@ -779,7 +781,7 @@ authDigestLogUsername(char *username, Auth::UserRequest::Pointer auth_user_reque
  * Auth_user structure.
  */
 Auth::UserRequest::Pointer
-Auth::Digest::Config::decode(char const *proxy_auth)
+Auth::Digest::Config::decode(char const *proxy_auth, const char *aRequestRealm)
 {
     const char *item;
     const char *p;
@@ -816,19 +818,19 @@ Auth::Digest::Config::decode(char const *proxy_auth)
             vlen = 0;
         }
 
-        StringArea keyName(item, nlen);
+        SBuf keyName(item, nlen);
         String value;
 
         if (vlen > 0) {
             // see RFC 2617 section 3.2.1 and 3.2.2 for details on the BNF
 
-            if (keyName == StringArea("domain",6) || keyName == StringArea("uri",3)) {
+            if (keyName == SBuf("domain",6) || keyName == SBuf("uri",3)) {
                 // domain is Special. Not a quoted-string, must not be de-quoted. But is wrapped in '"'
                 // BUG 3077: uri= can also be sent to us in a mangled (invalid!) form like domain
                 if (*p == '"' && *(p + vlen -1) == '"') {
                     value.limitInit(p+1, vlen-2);
                 }
-            } else if (keyName == StringArea("qop",3)) {
+            } else if (keyName == SBuf("qop",3)) {
                 // qop is more special.
                 // On request this must not be quoted-string de-quoted. But is several values wrapped in '"'
                 // On response this is a single un-quoted token.
@@ -856,37 +858,43 @@ Auth::Digest::Config::decode(char const *proxy_auth)
         switch (t) {
         case DIGEST_USERNAME:
             safe_free(username);
-            username = xstrndup(value.rawBuf(), value.size() + 1);
+            if (value.size() != 0)
+                username = xstrndup(value.rawBuf(), value.size() + 1);
             debugs(29, 9, HERE << "Found Username '" << username << "'");
             break;
 
         case DIGEST_REALM:
             safe_free(digest_request->realm);
-            digest_request->realm = xstrndup(value.rawBuf(), value.size() + 1);
+            if (value.size() != 0)
+                digest_request->realm = xstrndup(value.rawBuf(), value.size() + 1);
             debugs(29, 9, HERE << "Found realm '" << digest_request->realm << "'");
             break;
 
         case DIGEST_QOP:
             safe_free(digest_request->qop);
-            digest_request->qop = xstrndup(value.rawBuf(), value.size() + 1);
+            if (value.size() != 0)
+                digest_request->qop = xstrndup(value.rawBuf(), value.size() + 1);
             debugs(29, 9, HERE << "Found qop '" << digest_request->qop << "'");
             break;
 
         case DIGEST_ALGORITHM:
             safe_free(digest_request->algorithm);
-            digest_request->algorithm = xstrndup(value.rawBuf(), value.size() + 1);
+            if (value.size() != 0)
+                digest_request->algorithm = xstrndup(value.rawBuf(), value.size() + 1);
             debugs(29, 9, HERE << "Found algorithm '" << digest_request->algorithm << "'");
             break;
 
         case DIGEST_URI:
             safe_free(digest_request->uri);
-            digest_request->uri = xstrndup(value.rawBuf(), value.size() + 1);
+            if (value.size() != 0)
+                digest_request->uri = xstrndup(value.rawBuf(), value.size() + 1);
             debugs(29, 9, HERE << "Found uri '" << digest_request->uri << "'");
             break;
 
         case DIGEST_NONCE:
             safe_free(digest_request->nonceb64);
-            digest_request->nonceb64 = xstrndup(value.rawBuf(), value.size() + 1);
+            if (value.size() != 0)
+                digest_request->nonceb64 = xstrndup(value.rawBuf(), value.size() + 1);
             debugs(29, 9, HERE << "Found nonce '" << digest_request->nonceb64 << "'");
             break;
 
@@ -900,13 +908,15 @@ Auth::Digest::Config::decode(char const *proxy_auth)
 
         case DIGEST_CNONCE:
             safe_free(digest_request->cnonce);
-            digest_request->cnonce = xstrndup(value.rawBuf(), value.size() + 1);
+            if (value.size() != 0)
+                digest_request->cnonce = xstrndup(value.rawBuf(), value.size() + 1);
             debugs(29, 9, HERE << "Found cnonce '" << digest_request->cnonce << "'");
             break;
 
         case DIGEST_RESPONSE:
             safe_free(digest_request->response);
-            digest_request->response = xstrndup(value.rawBuf(), value.size() + 1);
+            if (value.size() != 0)
+                digest_request->response = xstrndup(value.rawBuf(), value.size() + 1);
             debugs(29, 9, HERE << "Found response '" << digest_request->response << "'");
             break;
 
@@ -936,7 +946,7 @@ Auth::Digest::Config::decode(char const *proxy_auth)
     /* do we have a username ? */
     if (!username || username[0] == '\0') {
         debugs(29, 2, "Empty or not present username");
-        rv = authDigestLogUsername(username, digest_request);
+        rv = authDigestLogUsername(username, digest_request, aRequestRealm);
         safe_free(username);
         return rv;
     }
@@ -947,7 +957,7 @@ Auth::Digest::Config::decode(char const *proxy_auth)
      */
     if (strchr(username, '"')) {
         debugs(29, 2, "Unacceptable username '" << username << "'");
-        rv = authDigestLogUsername(username, digest_request);
+        rv = authDigestLogUsername(username, digest_request, aRequestRealm);
         safe_free(username);
         return rv;
     }
@@ -955,7 +965,7 @@ Auth::Digest::Config::decode(char const *proxy_auth)
     /* do we have a realm ? */
     if (!digest_request->realm || digest_request->realm[0] == '\0') {
         debugs(29, 2, "Empty or not present realm");
-        rv = authDigestLogUsername(username, digest_request);
+        rv = authDigestLogUsername(username, digest_request, aRequestRealm);
         safe_free(username);
         return rv;
     }
@@ -963,7 +973,7 @@ Auth::Digest::Config::decode(char const *proxy_auth)
     /* and a nonce? */
     if (!digest_request->nonceb64 || digest_request->nonceb64[0] == '\0') {
         debugs(29, 2, "Empty or not present nonce");
-        rv = authDigestLogUsername(username, digest_request);
+        rv = authDigestLogUsername(username, digest_request, aRequestRealm);
         safe_free(username);
         return rv;
     }
@@ -972,7 +982,7 @@ Auth::Digest::Config::decode(char const *proxy_auth)
      * authenticate phase, but needs to be given */
     if (!digest_request->uri || digest_request->uri[0] == '\0') {
         debugs(29, 2, "Missing URI field");
-        rv = authDigestLogUsername(username, digest_request);
+        rv = authDigestLogUsername(username, digest_request, aRequestRealm);
         safe_free(username);
         return rv;
     }
@@ -980,7 +990,7 @@ Auth::Digest::Config::decode(char const *proxy_auth)
     /* is the response the correct length? */
     if (!digest_request->response || strlen(digest_request->response) != 32) {
         debugs(29, 2, "Response length invalid");
-        rv = authDigestLogUsername(username, digest_request);
+        rv = authDigestLogUsername(username, digest_request, aRequestRealm);
         safe_free(username);
         return rv;
     }
@@ -991,7 +1001,7 @@ Auth::Digest::Config::decode(char const *proxy_auth)
     else if (strcmp(digest_request->algorithm, "MD5")
              && strcmp(digest_request->algorithm, "MD5-sess")) {
         debugs(29, 2, "invalid algorithm specified!");
-        rv = authDigestLogUsername(username, digest_request);
+        rv = authDigestLogUsername(username, digest_request, aRequestRealm);
         safe_free(username);
         return rv;
     }
@@ -1003,7 +1013,7 @@ Auth::Digest::Config::decode(char const *proxy_auth)
         if (strcmp(digest_request->qop, QOP_AUTH) != 0) {
             /* we received a qop option we didn't send */
             debugs(29, 2, "Invalid qop option received");
-            rv = authDigestLogUsername(username, digest_request);
+            rv = authDigestLogUsername(username, digest_request, aRequestRealm);
             safe_free(username);
             return rv;
         }
@@ -1011,7 +1021,7 @@ Auth::Digest::Config::decode(char const *proxy_auth)
         /* check cnonce */
         if (!digest_request->cnonce || digest_request->cnonce[0] == '\0') {
             debugs(29, 2, "Missing cnonce field");
-            rv = authDigestLogUsername(username, digest_request);
+            rv = authDigestLogUsername(username, digest_request, aRequestRealm);
             safe_free(username);
             return rv;
         }
@@ -1019,7 +1029,7 @@ Auth::Digest::Config::decode(char const *proxy_auth)
         /* check nc */
         if (strlen(digest_request->nc) != 8 || strspn(digest_request->nc, "0123456789abcdefABCDEF") != 8) {
             debugs(29, 2, "invalid nonce count");
-            rv = authDigestLogUsername(username, digest_request);
+            rv = authDigestLogUsername(username, digest_request, aRequestRealm);
             safe_free(username);
             return rv;
         }
@@ -1027,7 +1037,7 @@ Auth::Digest::Config::decode(char const *proxy_auth)
         /* cnonce and nc both require qop */
         if (digest_request->cnonce || digest_request->nc[0] != '\0') {
             debugs(29, 2, "missing qop!");
-            rv = authDigestLogUsername(username, digest_request);
+            rv = authDigestLogUsername(username, digest_request, aRequestRealm);
             safe_free(username);
             return rv;
         }
@@ -1042,7 +1052,7 @@ Auth::Digest::Config::decode(char const *proxy_auth)
         debugs(29, 2, "Unexpected or invalid nonce received");
         if (digest_request->user() != NULL)
             digest_request->user()->credentials(Auth::Failed);
-        rv = authDigestLogUsername(username, digest_request);
+        rv = authDigestLogUsername(username, digest_request, aRequestRealm);
         safe_free(username);
         return rv;
     }
@@ -1053,7 +1063,7 @@ Auth::Digest::Config::decode(char const *proxy_auth)
     /* check that we're not being hacked / the username hasn't changed */
     if (nonce->user && strcmp(username, nonce->user->username())) {
         debugs(29, 2, "Username for the nonce does not equal the username for the request");
-        rv = authDigestLogUsername(username, digest_request);
+        rv = authDigestLogUsername(username, digest_request, aRequestRealm);
         safe_free(username);
         return rv;
     }
@@ -1067,10 +1077,11 @@ Auth::Digest::Config::decode(char const *proxy_auth)
 
     Auth::User::Pointer auth_user;
 
-    if ((auth_user = authDigestUserFindUsername(username)) == NULL) {
+    SBuf key = Auth::User::BuildUserKey(username, aRequestRealm);
+    if (key.isEmpty() || (auth_user = authDigestUserFindUsername(key.c_str())) == NULL) {
         /* the user doesn't exist in the username cache yet */
         debugs(29, 9, HERE << "Creating new digest user '" << username << "'");
-        digest_user = new Auth::Digest::User(this);
+        digest_user = new Auth::Digest::User(this, aRequestRealm);
         /* auth_user is a parent */
         auth_user = digest_user;
         /* save the username */
index 1b3892d61854669eb328f762ead6f1ce21b0b6a1..386109a3a19cb85e43389db6ce447109936f81cb 100644 (file)
@@ -69,7 +69,7 @@ public:
     Config();
     virtual bool active() const;
     virtual bool configured() const;
-    virtual Auth::UserRequest::Pointer decode(char const *proxy_auth);
+    virtual Auth::UserRequest::Pointer decode(char const *proxy_auth, const char *requestRealm);
     virtual void done();
     virtual void rotateHelpers();
     virtual void dump(StoreEntry *, const char *, Auth::Config *);
index c4bfa2ebb0fd9b18997ed96a96e6c994d6914d17..9b482548616c19cf35523d828d7204e0d21e8f5e 100644 (file)
@@ -31,8 +31,8 @@
 #ifndef SQUID_AUTH_NEGOTIATE_SCHEME_H
 #define SQUID_AUTH_NEGOTIATE_SCHEME_H
 
-#include "auth/Scheme.h"
 #include "auth/negotiate/auth_negotiate.h"
+#include "auth/Scheme.h"
 
 namespace Auth
 {
index ca73352da29141fa631d62d197f22dbf6b1526b2..a4b9c42373f7c1148eaf1ecb6c4223ed087b9163 100644 (file)
@@ -3,8 +3,8 @@
 #include "auth/negotiate/User.h"
 #include "Debug.h"
 
-Auth::Negotiate::User::User(Auth::Config *aConfig) :
-        Auth::User(aConfig)
+Auth::Negotiate::User::User(Auth::Config *aConfig, const char *aRequestRealm) :
+        Auth::User(aConfig, aRequestRealm)
 {
     proxy_auth_list.head = proxy_auth_list.tail = NULL;
 }
index b6e84588f8af6e79aac1776374743f074194ff38..57de9e5eff26dbc614a0b35fe308043d40f67d79 100644 (file)
@@ -16,7 +16,7 @@ class User : public Auth::User
 {
 public:
     MEMPROXY_CLASS(Auth::Negotiate::User);
-    User(Auth::Config *);
+    User(Auth::Config *, const char *requestRealm);
     ~User();
     virtual int32_t ttl() const;
 
index 2115841adef954e600e64d467a14bf60e2ea7aba..ed34ff2d63a84dc1735320775355dea37779b9e8 100644 (file)
@@ -1,4 +1,5 @@
 #include "squid.h"
+#include "AccessLogEntry.h"
 #include "auth/negotiate/auth_negotiate.h"
 #include "auth/negotiate/UserRequest.h"
 #include "auth/State.h"
@@ -9,6 +10,8 @@
 #include "HttpHeaderTools.h"
 #include "HttpReply.h"
 #include "HttpRequest.h"
+#include "format/Format.h"
+#include "MemBuf.h"
 #include "SquidTime.h"
 
 Auth::Negotiate::UserRequest::UserRequest()
@@ -52,6 +55,18 @@ Auth::Negotiate::UserRequest::authenticated() const
     return 0;
 }
 
+const char *
+Auth::Negotiate::UserRequest::credentialsStr()
+{
+    static char buf[MAX_AUTHTOKEN_LEN];
+    if (user()->credentials() == Auth::Pending) {
+        snprintf(buf, sizeof(buf), "YR %s\n", client_blob); //CHECKME: can ever client_blob be 0 here?
+    } else {
+        snprintf(buf, sizeof(buf), "KK %s\n", client_blob);
+    }
+    return buf;
+}
+
 Auth::Direction
 Auth::Negotiate::UserRequest::module_direction()
 {
@@ -82,7 +97,7 @@ Auth::Negotiate::UserRequest::module_direction()
 }
 
 void
-Auth::Negotiate::UserRequest::module_start(AUTHCB * handler, void *data)
+Auth::Negotiate::UserRequest::module_start(HttpRequest *req, AccessLogEntry::Pointer &al, AUTHCB * handler, void *data)
 {
     static char buf[MAX_AUTHTOKEN_LEN];
 
@@ -100,10 +115,17 @@ Auth::Negotiate::UserRequest::module_start(AUTHCB * handler, void *data)
 
     debugs(29, 8, HERE << "credentials state is '" << user()->credentials() << "'");
 
+    const char *keyExtras = helperRequestKeyExtras(request, al);
     if (user()->credentials() == Auth::Pending) {
-        snprintf(buf, sizeof(buf), "YR %s\n", client_blob); //CHECKME: can ever client_blob be 0 here?
+        if (keyExtras)
+            snprintf(buf, sizeof(buf), "YR %s %s\n", client_blob, keyExtras);
+        else
+            snprintf(buf, sizeof(buf), "YR %s\n", client_blob); //CHECKME: can ever client_blob be 0 here?
     } else {
-        snprintf(buf, sizeof(buf), "KK %s\n", client_blob);
+        if (keyExtras)
+            snprintf(buf, sizeof(buf), "KK %s %s\n", client_blob, keyExtras);
+        else
+            snprintf(buf, sizeof(buf), "KK %s\n", client_blob);
     }
 
     waiting = 1;
@@ -226,6 +248,10 @@ Auth::Negotiate::UserRequest::HandleReply(void *data, const HelperReply &reply)
     Auth::UserRequest::Pointer auth_user_request = r->auth_user_request;
     assert(auth_user_request != NULL);
 
+    // add new helper kv-pair notes to the credentials object
+    // so that any transaction using those credentials can access them
+    auth_user_request->user()->notes.appendNewOnly(&reply.notes);
+
     Auth::Negotiate::UserRequest *lm_request = dynamic_cast<Auth::Negotiate::UserRequest *>(auth_user_request.getRaw());
     assert(lm_request != NULL);
     assert(lm_request->waiting);
@@ -279,10 +305,10 @@ Auth::Negotiate::UserRequest::HandleReply(void *data, const HelperReply &reply)
         debugs(29, 4, HERE << "authenticated user " << auth_user_request->user()->username());
         /* see if this is an existing user with a different proxy_auth
          * string */
-        AuthUserHashPointer *usernamehash = static_cast<AuthUserHashPointer *>(hash_lookup(proxy_auth_username_cache, auth_user_request->user()->username()));
+        AuthUserHashPointer *usernamehash = static_cast<AuthUserHashPointer *>(hash_lookup(proxy_auth_username_cache, auth_user_request->user()->userKey()));
         Auth::User::Pointer local_auth_user = lm_request->user();
         while (usernamehash && (usernamehash->user()->auth_type != Auth::AUTH_NEGOTIATE ||
-                                strcmp(usernamehash->user()->username(), auth_user_request->user()->username()) != 0))
+                                strcmp(usernamehash->user()->userKey(), auth_user_request->user()->userKey()) != 0))
             usernamehash = static_cast<AuthUserHashPointer *>(usernamehash->next);
         if (usernamehash) {
             /* we can't seamlessly recheck the username due to the
index 98276841d46b8a689fcb9e16542f2c41ac2c5a43..b7af9311ec00c7a9d496a53620a8a4cff8f31d5c 100644 (file)
@@ -26,7 +26,8 @@ public:
     virtual int authenticated() const;
     virtual void authenticate(HttpRequest * request, ConnStateData * conn, http_hdr_type type);
     virtual Direction module_direction();
-    virtual void module_start(AUTHCB *, void *);
+    virtual void module_start(HttpRequest *request, AccessLogEntry::Pointer &al, AUTHCB *, void *);
+    virtual const char *credentialsStr();
 
     virtual void addAuthenticationInfoHeader(HttpReply * rep, int accel);
 
index dd0b75f114e3aaa7a9b56712a3c0a567c518d4c9..9ce6010ae220848a9a45f464174e363c49e59762 100644 (file)
  * See acl.c for access control and client_side.c for auditing */
 
 #include "squid.h"
-#include "auth/negotiate/auth_negotiate.h"
 #include "auth/Gadgets.h"
+#include "auth/negotiate/auth_negotiate.h"
+#include "auth/negotiate/Scheme.h"
+#include "auth/negotiate/User.h"
+#include "auth/negotiate/UserRequest.h"
 #include "auth/State.h"
 #include "cache_cf.h"
-#include "mgr/Registration.h"
-#include "Store.h"
 #include "client_side.h"
 #include "HttpHeaderTools.h"
 #include "HttpReply.h"
 #include "HttpRequest.h"
+#include "mgr/Registration.h"
 #include "SquidTime.h"
-#include "auth/negotiate/Scheme.h"
-#include "auth/negotiate/User.h"
-#include "auth/negotiate/UserRequest.h"
+#include "Store.h"
 #include "wordlist.h"
 
 /**
@@ -88,6 +88,8 @@ Auth::Negotiate::Config::rotateHelpers()
 void
 Auth::Negotiate::Config::done()
 {
+    Auth::Config::done();
+
     authnegotiate_initialised = 0;
 
     if (negotiateauthenticators) {
@@ -120,7 +122,7 @@ Auth::Negotiate::Config::dump(StoreEntry * entry, const char *name, Auth::Config
     storeAppendPrintf(entry, "\n%s negotiate children %d startup=%d idle=%d concurrency=%d\n",
                       name, authenticateChildren.n_max, authenticateChildren.n_startup, authenticateChildren.n_idle, authenticateChildren.concurrency);
     storeAppendPrintf(entry, "%s %s keep_alive %s\n", name, "negotiate", keep_alive ? "on" : "off");
-
+    Auth::Config::dump(entry, name, scheme);
 }
 
 Auth::Negotiate::Config::Config() : keep_alive(1)
@@ -140,9 +142,8 @@ Auth::Negotiate::Config::parse(Auth::Config * scheme, int n_configured, char *pa
         authenticateChildren.parseConfig();
     } else if (strcmp(param_str, "keep_alive") == 0) {
         parse_onoff(&keep_alive);
-    } else {
-        debugs(29, DBG_CRITICAL, "ERROR: unrecognised Negotiate auth scheme parameter '" << param_str << "'");
-    }
+    } else
+        Auth::Config::parse(scheme, n_configured, param_str);
 }
 
 const char *
@@ -287,9 +288,9 @@ authenticateNegotiateStats(StoreEntry * sentry)
  * Auth_user structure.
  */
 Auth::UserRequest::Pointer
-Auth::Negotiate::Config::decode(char const *proxy_auth)
+Auth::Negotiate::Config::decode(char const *proxy_auth, const char *aRequestRealm)
 {
-    Auth::Negotiate::User *newUser = new Auth::Negotiate::User(Auth::Config::Find("negotiate"));
+    Auth::Negotiate::User *newUser = new Auth::Negotiate::User(Auth::Config::Find("negotiate"), aRequestRealm);
     Auth::UserRequest *auth_user_request = new Auth::Negotiate::UserRequest();
     assert(auth_user_request->user() == NULL);
 
index b5414f5bf77ab49558aeb91483f81472c169264d..b1dcfb8e345b27876aa2fe4b395feb762c2c57c0 100644 (file)
@@ -31,7 +31,7 @@ public:
     Config();
     virtual bool active() const;
     virtual bool configured() const;
-    virtual Auth::UserRequest::Pointer decode(char const *proxy_auth);
+    virtual Auth::UserRequest::Pointer decode(char const *proxy_auth, const char *requestRealm);
     virtual void done();
     virtual void rotateHelpers();
     virtual void dump(StoreEntry *, const char *, Auth::Config *);
index 9bab40109c18fca5de00469cbccdd7da50c41506..034ff07bb330d3e268dc243fb232ced64a5c3d79 100644 (file)
@@ -31,8 +31,8 @@
 #ifndef SQUID_AUTH_NTLM_SCHEME_H
 #define SQUID_AUTH_NTLM_SCHEME_H
 
-#include "auth/Scheme.h"
 #include "auth/ntlm/auth_ntlm.h"
+#include "auth/Scheme.h"
 
 namespace Auth
 {
index 61457b098356451606410046e80114c287ad7777..cc5d9c704d7d45d7e091222e5344a57f2d2ff8b1 100644 (file)
@@ -3,8 +3,8 @@
 #include "auth/ntlm/User.h"
 #include "Debug.h"
 
-Auth::Ntlm::User::User(Auth::Config *aConfig) :
-        Auth::User(aConfig)
+Auth::Ntlm::User::User(Auth::Config *aConfig, const char *aRequestRealm) :
+        Auth::User(aConfig, aRequestRealm)
 {
     proxy_auth_list.head = proxy_auth_list.tail = NULL;
 }
index efdee13f41ff099542bc1a53333c02a6d2693e45..0dd72f96d5c48edc409452968ab0201e8e538e22 100644 (file)
@@ -16,7 +16,7 @@ class User : public Auth::User
 {
 public:
     MEMPROXY_CLASS(Auth::Ntlm::User);
-    User(Auth::Config *);
+    User(Auth::Config *, const char *requestRealm);
     ~User();
 
     virtual int32_t ttl() const;
index 01300609eca3a6aec21e37a40bc28efbfc91ffa7..9c6d58c9ee37854d502c61f498e151d52d79565f 100644 (file)
@@ -1,11 +1,15 @@
 #include "squid.h"
+#include "AccessLogEntry.h"
 #include "auth/ntlm/auth_ntlm.h"
 #include "auth/ntlm/UserRequest.h"
 #include "auth/State.h"
 #include "cbdata.h"
 #include "client_side.h"
 #include "globals.h"
+#include "HttpMsg.h"
 #include "HttpRequest.h"
+#include "format/Format.h"
+#include "MemBuf.h"
 #include "SquidTime.h"
 
 Auth::Ntlm::UserRequest::UserRequest()
@@ -49,6 +53,18 @@ Auth::Ntlm::UserRequest::authenticated() const
     return 0;
 }
 
+const char *
+Auth::Ntlm::UserRequest::credentialsStr()
+{
+    static char buf[MAX_AUTHTOKEN_LEN];
+    if (user()->credentials() == Auth::Pending) {
+        snprintf(buf, sizeof(buf), "YR %s\n", client_blob);
+    } else {
+        snprintf(buf, sizeof(buf), "KK %s\n", client_blob);
+    }
+    return buf;
+}
+
 Auth::Direction
 Auth::Ntlm::UserRequest::module_direction()
 {
@@ -79,7 +95,7 @@ Auth::Ntlm::UserRequest::module_direction()
 }
 
 void
-Auth::Ntlm::UserRequest::module_start(AUTHCB * handler, void *data)
+Auth::Ntlm::UserRequest::module_start(HttpRequest *req, AccessLogEntry::Pointer &al, AUTHCB * handler, void *data)
 {
     static char buf[MAX_AUTHTOKEN_LEN];
 
@@ -94,12 +110,18 @@ Auth::Ntlm::UserRequest::module_start(AUTHCB * handler, void *data)
 
     debugs(29, 8, HERE << "credentials state is '" << user()->credentials() << "'");
 
+    const char *keyExtras = helperRequestKeyExtras(request, al);
     if (user()->credentials() == Auth::Pending) {
-        snprintf(buf, sizeof(buf), "YR %s\n", client_blob); //CHECKME: can ever client_blob be 0 here?
+        if (keyExtras)
+            snprintf(buf, sizeof(buf), "YR %s %s\n", client_blob, keyExtras);
+        else
+            snprintf(buf, sizeof(buf), "YR %s\n", client_blob); //CHECKME: can ever client_blob be 0 here?
     } else {
-        snprintf(buf, sizeof(buf), "KK %s\n", client_blob);
+        if (keyExtras)
+            snprintf(buf, sizeof(buf), "KK %s %s\n", client_blob, keyExtras);
+        else
+            snprintf(buf, sizeof(buf), "KK %s\n", client_blob);
     }
-
     waiting = 1;
 
     safe_free(client_blob);
@@ -220,6 +242,10 @@ Auth::Ntlm::UserRequest::HandleReply(void *data, const HelperReply &reply)
     Auth::UserRequest::Pointer auth_user_request = r->auth_user_request;
     assert(auth_user_request != NULL);
 
+    // add new helper kv-pair notes to the credentials object
+    // so that any transaction using those credentials can access them
+    auth_user_request->user()->notes.appendNewOnly(&reply.notes);
+
     Auth::Ntlm::UserRequest *lm_request = dynamic_cast<Auth::Ntlm::UserRequest *>(auth_user_request.getRaw());
     assert(lm_request != NULL);
     assert(lm_request->waiting);
@@ -272,10 +298,10 @@ Auth::Ntlm::UserRequest::HandleReply(void *data, const HelperReply &reply)
         debugs(29, 4, HERE << "authenticated user " << auth_user_request->user()->username());
         /* see if this is an existing user with a different proxy_auth
          * string */
-        AuthUserHashPointer *usernamehash = static_cast<AuthUserHashPointer *>(hash_lookup(proxy_auth_username_cache, auth_user_request->user()->username()));
+        AuthUserHashPointer *usernamehash = static_cast<AuthUserHashPointer *>(hash_lookup(proxy_auth_username_cache, auth_user_request->user()->userKey()));
         Auth::User::Pointer local_auth_user = lm_request->user();
         while (usernamehash && (usernamehash->user()->auth_type != Auth::AUTH_NTLM ||
-                                strcmp(usernamehash->user()->username(), auth_user_request->user()->username()) != 0))
+                                strcmp(usernamehash->user()->userKey(), auth_user_request->user()->userKey()) != 0))
             usernamehash = static_cast<AuthUserHashPointer *>(usernamehash->next);
         if (usernamehash) {
             /* we can't seamlessly recheck the username due to the
index 396e86038cf009e8fe98e097829dbc66b23f1204..7bed6b12793a81db69b91e75d4d6bb55fb28af0b 100644 (file)
@@ -1,8 +1,8 @@
 #ifndef _SQUID_SRC_AUTH_NTLM_USERREQUEST_H
 #define _SQUID_SRC_AUTH_NTLM_USERREQUEST_H
 
-#include "auth/UserRequest.h"
 #include "auth/ntlm/auth_ntlm.h"
+#include "auth/UserRequest.h"
 #include "MemPool.h"
 
 class ConnStateData;
@@ -26,7 +26,8 @@ public:
     virtual int authenticated() const;
     virtual void authenticate(HttpRequest * request, ConnStateData * conn, http_hdr_type type);
     virtual Auth::Direction module_direction();
-    virtual void module_start(AUTHCB *, void *);
+    virtual void module_start(HttpRequest *req, AccessLogEntry::Pointer &al, AUTHCB *, void *);
+    virtual const char *credentialsStr();
 
     virtual const char * connLastHeader();
 
index 34b1478c81827e71e41758bb01e728fcec7c712a..03d62f1dfd6a447b88a1aebe84a3149f57d9c763 100644 (file)
 #include "auth/ntlm/UserRequest.h"
 #include "auth/State.h"
 #include "cache_cf.h"
-#include "mgr/Registration.h"
-#include "Store.h"
 #include "client_side.h"
 #include "HttpHeaderTools.h"
 #include "HttpReply.h"
 #include "HttpRequest.h"
-#include "wordlist.h"
+#include "mgr/Registration.h"
 #include "SquidTime.h"
+#include "Store.h"
+#include "wordlist.h"
 
 /* NTLM Scheme */
 static AUTHSSTATS authenticateNTLMStats;
@@ -80,6 +80,8 @@ Auth::Ntlm::Config::rotateHelpers()
 void
 Auth::Ntlm::Config::done()
 {
+    Auth::Config::done();
+
     authntlm_initialised = 0;
 
     if (ntlmauthenticators) {
@@ -112,7 +114,7 @@ Auth::Ntlm::Config::dump(StoreEntry * entry, const char *name, Auth::Config * sc
     storeAppendPrintf(entry, "\n%s ntlm children %d startup=%d idle=%d concurrency=%d\n",
                       name, authenticateChildren.n_max, authenticateChildren.n_startup, authenticateChildren.n_idle, authenticateChildren.concurrency);
     storeAppendPrintf(entry, "%s %s keep_alive %s\n", name, "ntlm", keep_alive ? "on" : "off");
-
+    Auth::Config::dump(entry, name, scheme);
 }
 
 Auth::Ntlm::Config::Config() : keep_alive(1)
@@ -132,9 +134,8 @@ Auth::Ntlm::Config::parse(Auth::Config * scheme, int n_configured, char *param_s
         authenticateChildren.parseConfig();
     } else if (strcmp(param_str, "keep_alive") == 0) {
         parse_onoff(&keep_alive);
-    } else {
-        debugs(29, DBG_CRITICAL, "ERROR unrecognised NTLM auth scheme parameter '" << param_str << "'");
-    }
+    } else
+        Auth::Config::parse(scheme, n_configured, param_str);
 }
 
 const char *
@@ -267,9 +268,9 @@ authenticateNTLMStats(StoreEntry * sentry)
  * Auth_user structure.
  */
 Auth::UserRequest::Pointer
-Auth::Ntlm::Config::decode(char const *proxy_auth)
+Auth::Ntlm::Config::decode(char const *proxy_auth, const char *aRequestRealm)
 {
-    Auth::Ntlm::User *newUser = new Auth::Ntlm::User(Auth::Config::Find("ntlm"));
+    Auth::Ntlm::User *newUser = new Auth::Ntlm::User(Auth::Config::Find("ntlm"), aRequestRealm);
     Auth::UserRequest::Pointer auth_user_request = new Auth::Ntlm::UserRequest();
     assert(auth_user_request->user() == NULL);
 
index b19e1c85699d6e49adba1ee11b90f0a94e5abe4c..e704c2a73973609fc8ebccd45e7548325f5d41e0 100644 (file)
@@ -5,9 +5,9 @@
 
 #ifndef __AUTH_NTLM_H__
 #define __AUTH_NTLM_H__
+#include "auth/Config.h"
 #include "auth/Gadgets.h"
 #include "auth/UserRequest.h"
-#include "auth/Config.h"
 #include "helper.h"
 
 #define DefaultAuthenticateChildrenMax  32     /* 32 processes */
@@ -27,7 +27,7 @@ public:
     Config();
     virtual bool active() const;
     virtual bool configured() const;
-    virtual Auth::UserRequest::Pointer decode(char const *proxy_auth);
+    virtual Auth::UserRequest::Pointer decode(char const *proxy_auth, const char *requestRealm);
     virtual void done();
     virtual void rotateHelpers();
     virtual void dump(StoreEntry *, const char *, Auth::Config *);
index a058f8db46d044d144af0bc97cffd7ea666af8b7..58be965b5389832761201dd82dd80dc1f9e5129b 100644 (file)
@@ -5,8 +5,8 @@
  */
 
 #include "squid.h"
-#include "base/AsyncCallQueue.h"
 #include "base/AsyncCall.h"
+#include "base/AsyncCallQueue.h"
 #include "Debug.h"
 
 AsyncCallQueue *AsyncCallQueue::TheInstance = 0;
index fa87fc16fb59b09e9a5ed6aad833c2dcf0438fdc..1b84589d87d419fad2124ea79ae1f23f35e0c88b 100644 (file)
@@ -22,6 +22,5 @@ libbase_la_SOURCES = \
        Subscription.h \
        TextException.cc \
        TextException.h \
-       StringArea.h \
        Vector.cc \
        Vector.h
diff --git a/src/base/StringArea.h b/src/base/StringArea.h
deleted file mode 100644 (file)
index e5b14a8..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * StringArea.h
- *
- *
- * SQUID Web Proxy Cache          http://www.squid-cache.org/
- * ----------------------------------------------------------
- *
- *  Squid is the result of efforts by numerous individuals from
- *  the Internet community; see the CONTRIBUTORS file for full
- *  details.   Many organizations have provided support for Squid's
- *  development; see the SPONSORS file for full details.  Squid is
- *  Copyrighted (C) 2001 by the Regents of the University of
- *  California; see the COPYRIGHT file for full details.  Squid
- *  incorporates software developed and/or copyrighted by other
- *  sources; see the CREDITS file for full details.
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
- */
-
-#ifndef SQUID_STRINGAREA_H
-#define SQUID_STRINGAREA_H
-
-#if HAVE_CSTRING
-#include <cstring>
-#endif
-#include <ostream>
-
-/** A char* plus length combination. Useful for temporary storing
- * and quickly looking up strings.
- *
- * The pointed-to string may not be null-terminated.
- * The pointed-to string is not copied.
- *
- * Not meant for stand-alone storage. Validity of the
- * pointed-to string is responsibility of the caller.
- */
-class StringArea
-{
-public:
-    /// build a StringArea by explicitly assigning pointed-to area and and length
-    StringArea(const char * ptr, size_t len): theStart(ptr), theLen(len) {}
-    bool operator==(const StringArea &s) const { return theLen==s.theLen && memcmp(theStart,s.theStart,theLen)==0; }
-    bool operator!=(const StringArea &s) const { return !operator==(s); }
-    bool operator< ( const StringArea &s) const {
-        return (theLen < s.theLen || (theLen == s.theLen && memcmp(theStart,s.theStart,theLen) < 0)) ;
-    }
-
-    void print(std::ostream &os) const { os.write(theStart, theLen); }
-
-private:
-    /// pointed to the externally-managed memory area
-    const char *theStart;
-    /// length of the string
-    size_t theLen;
-};
-
-inline std::ostream &
-operator <<(std::ostream &os, const StringArea &a)
-{
-    a.print(os);
-    return os;
-}
-
-#endif /* SQUID_STRINGAREA_H */
index 29861c9dc21eace2e95ca49ff8d7221e82faaf0d..667b7b3b82abce9fa9a3b1ea3e06aa40f05953b7 100644 (file)
 #include "anyp/PortCfg.h"
 #include "AuthReg.h"
 #include "base/RunnersRegistry.h"
-#include "mgr/ActionPasswordList.h"
+#include "cache_cf.h"
 #include "CachePeer.h"
 #include "CachePeerDomainList.h"
-#include "cache_cf.h"
 #include "ConfigParser.h"
 #include "CpuAffinityMap.h"
 #include "DiskIO/DiskIOModule.h"
@@ -64,7 +63,9 @@
 #include "log/CustomLog.h"
 #include "Mem.h"
 #include "MemBuf.h"
+#include "mgr/ActionPasswordList.h"
 #include "mgr/Registration.h"
+#include "neighbors.h"
 #include "NeighborTypeDomainList.h"
 #include "Parsing.h"
 #include "PeerDigest.h"
 #include "Store.h"
 #include "StoreFileSystem.h"
 #include "SwapDir.h"
-#include "wordlist.h"
-#include "neighbors.h"
 #include "tools.h"
 #include "URLScheme.h"
+#include "wordlist.h"
 /* wccp2 has its own conditional definitions */
 #include "wccp2.h"
 #if USE_ADAPTATION
@@ -92,8 +92,8 @@
 #include "adaptation/ecap/Config.h"
 #endif
 #if USE_SSL
-#include "ssl/support.h"
 #include "ssl/Config.h"
+#include "ssl/support.h"
 #endif
 #if USE_AUTH
 #include "auth/Config.h"
@@ -1003,6 +1003,14 @@ parse_obsolete(const char *name)
 
     if (!strcmp(name, "log_icap"))
         self_destruct();
+
+    if (!strcmp(name, "ignore_ims_on_miss")) {
+        // the replacement directive cache_revalidate_on_miss has opposite meanings for ON/OFF value
+        // than the 2.7 directive. We need to parse and invert the configured value.
+        int temp = 0;
+        parse_onoff(&temp);
+        Config.onoff.cache_miss_revalidate = !temp;
+    }
 }
 
 /* Parse a time specification from the config file.  Store the
@@ -1640,8 +1648,8 @@ free_acl_b_size_t(AclSizeLimit ** head)
 
 #if USE_DELAY_POOLS
 
-#include "DelayPools.h"
 #include "DelayConfig.h"
+#include "DelayPools.h"
 /* do nothing - free_delay_pool_count is the magic free function.
  * this is why delay_pool_count isn't just marked TYPE: u_short
  */
index 9d881b5cf463989aa7a5029f3b95e7ec59334735..66976cd916991b95294ecddafd10fa1d4e5db021 100644 (file)
@@ -32,7 +32,6 @@
 
 #include "squid.h"
 #include "base/TextException.h"
-#include "mgr/ActionPasswordList.h"
 #include "CacheManager.h"
 #include "comm/Connection.h"
 #include "Debug.h"
@@ -40,8 +39,9 @@
 #include "fde.h"
 #include "HttpReply.h"
 #include "HttpRequest.h"
-#include "mgr/ActionCreator.h"
 #include "mgr/Action.h"
+#include "mgr/ActionCreator.h"
+#include "mgr/ActionPasswordList.h"
 #include "mgr/ActionProfile.h"
 #include "mgr/BasicActions.h"
 #include "mgr/Command.h"
 #include "mgr/FunAction.h"
 #include "mgr/QueryParams.h"
 #include "protos.h"
-#include "tools.h"
 #include "SquidConfig.h"
 #include "SquidTime.h"
 #include "Store.h"
+#include "tools.h"
 #include "wordlist.h"
 
 #include <algorithm>
index d0b5d6aa8b70f830254f873ec60d890b43c49dcc..769061644fa5077eb468608676d69a0495b9d55e 100644 (file)
@@ -412,11 +412,12 @@ cbdata_type cbdataInternalAddType(cbdata_type type, const char *label, int size,
  * Initializes the cbdatatype. Must be called prior to the first use of cbdataAlloc() for the type.
  *
  \par
- * Alternative to CBDATA_INIT_TYPE_FREECB()
+ * Alternative to CBDATA_INIT_TYPE()
  *
  \param type           Type being initialized
+ \param free_func      The freehandler called when the last known reference to an allocated entry goes away.
  */
-#define CBDATA_INIT_TYPE(type) (CBDATA_##type ?  CBDATA_UNKNOWN : (CBDATA_##type = cbdataInternalAddType(CBDATA_##type, #type, sizeof(type), NULL)))
+#define CBDATA_INIT_TYPE_FREECB(type, free_func) do { if (!CBDATA_##type) CBDATA_##type = cbdataInternalAddType(CBDATA_##type, #type, sizeof(type), free_func); } while (false)
 
 /**
  \ingroup CBDATAAPI
@@ -424,12 +425,11 @@ cbdata_type cbdataInternalAddType(cbdata_type type, const char *label, int size,
  * Initializes the cbdatatype. Must be called prior to the first use of cbdataAlloc() for the type.
  *
  \par
- * Alternative to CBDATA_INIT_TYPE()
+ * Alternative to CBDATA_INIT_TYPE_FREECB()
  *
  \param type           Type being initialized
- \param free_func      The freehandler called when the last known reference to an allocated entry goes away.
  */
-#define CBDATA_INIT_TYPE_FREECB(type, free_func)       (CBDATA_##type ?  CBDATA_UNKNOWN : (CBDATA_##type = cbdataInternalAddType(CBDATA_##type, #type, sizeof(type), free_func)))
+#define CBDATA_INIT_TYPE(type) CBDATA_INIT_TYPE_FREECB(type, NULL)
 
 /**
  \ingroup CBDATA
index 4ae333f4fd443ce7d0077dc73ad6b5d9784b7d6e..533b726ac62ede80062fdde2b7e6ea4c11463f48 100644 (file)
@@ -148,26 +148,25 @@ DOC_START
        This option is not yet supported by Squid-3.
 DOC_END
 
-NAME: ignore_ims_on_miss
+NAME: location_rewrite_program location_rewrite_access location_rewrite_children location_rewrite_concurrency
 TYPE: obsolete
 DOC_START
        This option is not yet supported by Squid-3.
 DOC_END
 
-NAME: location_rewrite_program location_rewrite_access location_rewrite_children location_rewrite_concurrency
+NAME: refresh_stale_hit
 TYPE: obsolete
 DOC_START
        This option is not yet supported by Squid-3.
 DOC_END
 
-NAME: refresh_stale_hit
+# Options Removed in 3.3
+NAME: ignore_ims_on_miss
 TYPE: obsolete
 DOC_START
-       This option is not yet supported by Squid-3.
+       Remove this line. The HTTP/1.1 feature is now fully supported by default.
 DOC_END
 
-# no Options Removed in 3.3
-
 # Options Removed in 3.2
 NAME: ignore_expect_100
 TYPE: obsolete
@@ -320,12 +319,30 @@ DOC_START
        Ports flagged 'transparent', 'intercept', or 'tproxy' have
        authentication disabled.
 
+       === Parameters common to all schemes. ===
+
+       "program" cmdline
+       Specifies the command for the external authenticator.  Such a program
+       runs a loop that, on every iteration, reads a request line from
+       the standard and responds with a scheme-specific answer. The loop
+       stops when all input is exchausted (EOF). See scheme-specific
+       "program" descriptions below for details.
+
+       "key_extras" format
+       Specifies a string to be append to request line format for the
+       authentication helper. "Quoted" format values may contain spaces and
+       logformat %macros. In theory, any logformat %macro can be used.
+       In practice, a %macro expands as a dash (-) if the helper request is
+       sent before the required macro information is available to Squid.
+       By default, Squid uses request formats provided in scheme-specific
+       examples below (search for %credentials).
+
        === Parameters for the basic scheme follow. ===
 
        "program" cmdline
        Specify the command for the external authenticator.  Such a program
-       reads a line containing "username password" and replies with one of
-       three results:
+       reads a request_format line ("username password" by default) and
+       replies with one of three results:
 
          OK
                the user exists.
@@ -408,8 +425,8 @@ DOC_START
        === Parameters for the digest scheme follow ===
 
        "program" cmdline
-       Specify the command for the external authenticator.  Such
-       a program reads a line containing "username":"realm" and
+       Specify the command for the external authenticator.  Such a program
+       reads a request_format line ("username":"realm" by default) and
        replies with one of three results:
 
          OK ha1="..."
@@ -577,7 +594,6 @@ DOC_START
        supported by the proxy.
 
        auth_param negotiate keep_alive on
-
        
        Examples:
 
@@ -1074,6 +1090,15 @@ DOC_START
          # Annotation sources include note and adaptation_meta directives
          # as well as helper and eCAP responses.
 
+       acl aclname adaptation_service service ...
+         # Matches the name of any icap_service, ecap_service,
+         # adaptation_service_set, or adaptation_service_chain that Squid
+         # has used (or attempted to use) for the master transaction.
+         # This ACL must be defined after the corresponding adaptation
+         # service is named in squid.conf. This ACL is usable with
+         # adaptation_meta because it starts matching immediately after
+         # the service has been selected for adaptation.
+
 IF USE_SSL
        acl aclname ssl_error errorname
          # match against SSL certificate validation error [fast]
@@ -3698,6 +3723,16 @@ DOC_START
                                default %d/%b/%Y:%H:%M:%S %z
                tr      Response time (milliseconds)
                dt      Total time spent making DNS lookups (milliseconds)
+               tS      Approximate master transaction start time in 
+                       <full seconds since epoch>.<fractional seconds> format.
+                       Currently, Squid considers the master transaction
+                       started when a complete HTTP request header initiating
+                       the transaction is received from the client. This is
+                       the same value that Squid uses to calculate transaction
+                       response time when logging %tr to access.log. Currently,
+                       Squid uses millisecond resolution for %tS values,
+                       similar to the default access.log "current time" field
+                       (%ts.%03tu).
 
        Access Control related format codes:
 
@@ -3708,9 +3743,29 @@ DOC_START
                ue      User name from external acl helper
                ui      User name from ident
                us      User name from SSL
+               credentials Client credentials. The exact meaning depends on
+                       the authentication scheme: For Basic authentication,
+                       it is the password; for Digest, the realm sent by the
+                       client; for NTLM and Negotiate, the client challenge
+                       or client credentials prefixed with "YR " or "KK ".
 
        HTTP related format codes:
 
+           REQUEST
+
+               [http::]rm      Request method (GET/POST etc)
+               [http::]>rm     Request method from client
+               [http::]<rm     Request method sent to server or peer
+               [http::]ru      Request URL from client (historic, filtered for logging)
+               [http::]>ru     Request URL from client
+               [http::]<ru     Request URL sent to server or peer
+               [http::]rp      Request URL-Path excluding hostname
+               [http::]>rp     Request URL-Path excluding hostname from client
+               [http::]<rp     Request URL-Path excluding hostname sent to server or peer
+               [http::]rv      Request protocol version
+               [http::]>rv     Request protocol version from client
+               [http::]<rv     Request protocol version sent to server or peer
+
                [http::]>h      Original received request header. 
                                Usually differs from the request header sent by
                                Squid, although most fields are often preserved.
@@ -3721,37 +3776,41 @@ DOC_START
                                Usually differs from the request header sent by
                                Squid, although most fields are often preserved.
                                Optional header name argument as for >h
+
+
+           RESPONSE
+
+               [http::]<Hs     HTTP status code received from the next hop
+               [http::]>Hs     HTTP status code sent to the client
+
                [http::]<h      Reply header. Optional header name argument
                                as for >h
-               [http::]>Hs     HTTP status code sent to the client
-               [http::]<Hs     HTTP status code received from the next hop
+
+               [http::]mt      MIME content type
+
+
+           SIZE COUNTERS
+
+               [http::]st      Total size of request + reply traffic with client
+               [http::]>st     Total size of request received from client.
+                               Excluding chunked encoding bytes.
+               [http::]<st     Total size of reply sent to client (after adaptation)
+
+               [http::]>sh     Size of request headers received from client
+               [http::]<sh     Size of reply headers sent to client (after adaptation)
+
+               [http::]<sH     Reply high offset sent
+               [http::]<sS     Upstream object size
+
                [http::]<bs     Number of HTTP-equivalent message body bytes 
                                received from the next hop, excluding chunked
                                transfer encoding and control messages.
                                Generated FTP/Gopher listings are treated as
                                received bodies.
-               [http::]mt      MIME content type
-               [http::]rm      Request method (GET/POST etc)
-               [http::]>rm     Request method from client
-               [http::]<rm     Request method sent to server or peer
-               [http::]ru      Request URL from client (historic, filtered for logging)
-               [http::]>ru     Request URL from client
-               [http::]<ru     Request URL sent to server or peer
-               [http::]rp      Request URL-Path excluding hostname
-               [http::]>rp     Request URL-Path excluding hostname from client
-               [http::]<rp     Request URL-Path excluding hostname sento to server or peer
-               [http::]rv      Request protocol version
-               [http::]>rv     Request protocol version from client
-               [http::]<rv     Request protocol version sent to server or peer
-               [http::]<st     Sent reply size including HTTP headers
-               [http::]>st     Received request size including HTTP headers. In the
-                               case of chunked requests the chunked encoding metadata
-                               are not included
-               [http::]>sh     Received HTTP request headers size
-               [http::]<sh     Sent HTTP reply headers size
-               [http::]st      Request+Reply size including HTTP headers
-               [http::]<sH     Reply high offset sent
-               [http::]<sS     Upstream object size
+
+
+           TIMING
+
                [http::]<pt     Peer response time in milliseconds. The timer starts
                                when the last request byte is sent to the next hop
                                and stops when the last response byte is received.
@@ -4534,12 +4593,17 @@ DOC_START
                The new URL is fetched directly by Squid and returned to
                the client as the response to its request.
 
+         OK
+               When neither of url= and rewrite-url= are sent Squid does
+               not change the URL.
+
          ERR
                Do not change the URL.
 
          BH
                An internal error occurred in the helper, preventing
-               a result being identified.
+               a result being identified. The 'message=' key name is
+               reserved for delivering a log message.
 
 
        In the future, the interface protocol will be extended with
@@ -7287,6 +7351,25 @@ DOC_START
        acts on cacheable requests.
 DOC_END
 
+NAME: cache_miss_revalidate
+COMMENT: on|off
+TYPE: onoff
+DEFAULT: on
+LOC: Config.onoff.cache_miss_revalidate
+DOC_START
+       Whether Squid on cache MISS will pass client revalidation requests
+       to the server or tries to fetch new content for caching.
+       This is useful while the cache is mostly empty to more quickly
+       have the cache populated.
+
+       When set to 'on' (default), Squid will pass all client If-* headers
+       to the server.
+
+       When set to 'off' and if the request is cacheable, Squid will
+       remove the clients If-Modified-Since and If-None-Match headers from
+       the request sent to the server.
+DOC_END
+
 NAME: always_direct
 TYPE: acl_access
 LOC: Config.accessList.AlwaysDirect
index 3624e39f808d4e34dd2394ce393e3914b7af7342..6452835a349048397b7e3cfa8c0064d32d99fb5c 100644 (file)
  */
 
 #include "squid.h"
+#include "client_side_request.h"
 #include "clientStream.h"
 #include "HttpReply.h"
 #include "HttpRequest.h"
-#include "client_side_request.h"
 
 /**
  \defgroup ClientStreamInternal Client Streams Internals
index fb737b21e73e8507c53c93ba9ab42bbd19746f4d..1f6eb6ebf64a0df2847cc5610df2ee7216151e01 100644 (file)
@@ -32,9 +32,9 @@
 
 #include "squid.h"
 #include "client_db.h"
+#include "ClientInfo.h"
 #include "event.h"
 #include "format/Token.h"
-#include "ClientInfo.h"
 #include "fqdncache.h"
 #include "ip/Address.h"
 #include "log/access_log.h"
index f34e7b0494c2c36a9da98e6757db362d3669c61f..77229a3dd7ede4c3c0450d87411a6f39e36baba7 100644 (file)
@@ -86,9 +86,9 @@
 #include "CachePeer.h"
 #include "ChunkedCodingParser.h"
 #include "client_db.h"
+#include "client_side.h"
 #include "client_side_reply.h"
 #include "client_side_request.h"
-#include "client_side.h"
 #include "ClientRequestContext.h"
 #include "clientStream.h"
 #include "comm.h"
 #include "ClientInfo.h"
 #endif
 #if USE_SSL
-#include "ssl/ProxyCerts.h"
 #include "ssl/context_storage.h"
+#include "ssl/gadgets.h"
 #include "ssl/helper.h"
+#include "ssl/ProxyCerts.h"
 #include "ssl/ServerBump.h"
 #include "ssl/support.h"
-#include "ssl/gadgets.h"
 #endif
 #if USE_SSL_CRTD
-#include "ssl/crtd_message.h"
 #include "ssl/certificate_db.h"
+#include "ssl/crtd_message.h"
 #endif
 
 #if HAVE_LIMITS_H
@@ -543,7 +543,7 @@ ClientHttpRequest::updateCounters()
         ++ statCounter.client_http.errors;
 
     clientUpdateStatHistCounters(logType,
-                                 tvSubMsec(start_time, current_time));
+                                 tvSubMsec(al->cache.start_time, current_time));
 
     clientUpdateHierCounters(&request->hier);
 }
@@ -597,7 +597,7 @@ prepareLogWithRequestDetails(HttpRequest * request, AccessLogEntry::Pointer &aLo
     aLogEntry->http.version = request->http_ver;
     aLogEntry->hier = request->hier;
     if (request->content_length > 0) // negative when no body or unknown length
-        aLogEntry->cache.requestSize += request->content_length;
+        aLogEntry->http.clientRequestSz.payloadData += request->content_length; // XXX: actually adaptedRequest payload size ??
     aLogEntry->cache.extuser = request->extacl_user.termedBuf();
 
     // Adapted request, if any, inherits and then collects all the stats, but
@@ -631,26 +631,18 @@ ClientHttpRequest::logRequest()
     debugs(33, 9, "clientLogRequest: http.code='" << al->http.code << "'");
 
     if (loggingEntry() && loggingEntry()->mem_obj)
-        al->cache.objectSize = loggingEntry()->contentLen();
-
-    al->cache.caddr.setNoAddr();
-
-    if (getConn() != NULL) {
-        al->cache.caddr = getConn()->log_addr;
-        al->cache.port =  cbdataReference(getConn()->port);
-    }
-
-    al->cache.requestSize = req_sz;
-    al->cache.requestHeadersSize = req_sz;
+        al->cache.objectSize = loggingEntry()->contentLen(); // payload duplicate ?? with or without TE ?
 
-    al->cache.replySize = out.size;
-    al->cache.replyHeadersSize = out.headers_sz;
+    al->http.clientRequestSz.header = req_sz;
+    al->http.clientReplySz.header = out.headers_sz;
+    // XXX: calculate without payload encoding or headers !!
+    al->http.clientReplySz.payloadData = out.size - out.headers_sz; // pretend its all un-encoded data for now.
 
     al->cache.highOffset = out.offset;
 
     al->cache.code = logType;
 
-    al->cache.msec = tvSubMsec(start_time, current_time);
+    al->cache.msec = tvSubMsec(al->cache.start_time, current_time);
 
     if (request)
         prepareLogWithRequestDetails(request, al);
@@ -670,11 +662,10 @@ ClientHttpRequest::logRequest()
 
     /*Add notes*/
     // The al->notes and request->notes must point to the same object.
-    // Enable the following assertion to check for possible bugs.
-    // assert(request->notes == al->notes);
+    (void)SyncNotes(*al, *request);
     typedef Notes::iterator ACAMLI;
     for (ACAMLI i = Config.notes.begin(); i != Config.notes.end(); ++i) {
-        if (const char *value = (*i)->match(request, al->reply)) {
+        if (const char *value = (*i)->match(request, al->reply, NULL)) {
             NotePairs &notes = SyncNotes(*al, *request);
             notes.add((*i)->key.termedBuf(), value);
             debugs(33, 3, HERE << (*i)->key.termedBuf() << " " << value);
@@ -3798,7 +3789,7 @@ ConnStateData::sslCrtdHandleReply(const HelperReply &reply)
 
 void ConnStateData::buildSslCertGenerationParams(Ssl::CertificateProperties &certProperties)
 {
-    certProperties.commonName =  sslCommonName.defined() ? sslCommonName.termedBuf() : sslConnectHostOrIp.termedBuf();
+    certProperties.commonName =  sslCommonName.size() > 0 ? sslCommonName.termedBuf() : sslConnectHostOrIp.termedBuf();
 
     // fake certificate adaptation requires bump-server-first mode
     if (!sslServerBump) {
@@ -3893,7 +3884,7 @@ ConnStateData::getSslContextStart()
         Ssl::CertificateProperties certProperties;
         buildSslCertGenerationParams(certProperties);
         sslBumpCertKey = certProperties.dbKey().c_str();
-        assert(sslBumpCertKey.defined() && sslBumpCertKey[0] != '\0');
+        assert(sslBumpCertKey.size() > 0 && sslBumpCertKey[0] != '\0');
 
         debugs(33, 5, HERE << "Finding SSL certificate for " << sslBumpCertKey << " in cache");
         Ssl::LocalContextStorage & ssl_ctx_cache(Ssl::TheGlobalContextStorage.getLocalStorage(port->s));
@@ -3960,7 +3951,7 @@ ConnStateData::getSslContextDone(SSL_CTX * sslContext, bool isNew)
         //else it is self-signed or untrusted do not attrach any certificate
 
         Ssl::LocalContextStorage & ssl_ctx_cache(Ssl::TheGlobalContextStorage.getLocalStorage(port->s));
-        assert(sslBumpCertKey.defined() && sslBumpCertKey[0] != '\0');
+        assert(sslBumpCertKey.size() > 0 && sslBumpCertKey[0] != '\0');
         if (sslContext) {
             if (!ssl_ctx_cache.add(sslBumpCertKey.termedBuf(), new Ssl::SSL_CTX_Pointer(sslContext))) {
                 // If it is not in storage delete after using. Else storage deleted it.
@@ -4332,7 +4323,7 @@ clientAclChecklistCreate(const acl_access * acl, ClientHttpRequest * http)
     ConnStateData * conn = http->getConn();
     ACLFilledChecklist *ch = new ACLFilledChecklist(acl, http->request,
             cbdataReferenceValid(conn) && conn != NULL && conn->clientConnection != NULL ? conn->clientConnection->rfc931 : dash_str);
-
+    ch->al = http->al;
     /*
      * hack for ident ACL. It needs to get full addresses, and a place to store
      * the ident result on persistent connections...
index 0f6a39b5b125d77bf1ab9abb6d60ec475df36a5e..fd1effe8387e6f2ac4ae728aefd1b91866201cab 100644 (file)
 #include "acl/FilledChecklist.h"
 #include "acl/Gadgets.h"
 #include "anyp/PortCfg.h"
-#include "ClientRequestContext.h"
 #include "client_side.h"
 #include "client_side_reply.h"
 #include "client_side_request.h"
+#include "ClientRequestContext.h"
 #include "clientStream.h"
 #include "comm/Connection.h"
 #include "comm/Write.h"
@@ -62,8 +62,8 @@
 #include "HttpHdrCc.h"
 #include "HttpReply.h"
 #include "HttpRequest.h"
-#include "ipcache.h"
 #include "ip/QosConfig.h"
+#include "ipcache.h"
 #include "log/access_log.h"
 #include "MemObject.h"
 #include "Parsing.h"
@@ -89,8 +89,8 @@
 #endif
 #endif
 #if USE_SSL
-#include "ssl/support.h"
 #include "ssl/ServerBump.h"
+#include "ssl/support.h"
 #endif
 
 #if LINGERING_CLOSE
@@ -160,10 +160,13 @@ ClientHttpRequest::ClientHttpRequest(ConnStateData * aConn) :
 #endif
         loggingEntry_(NULL)
 {
-    start_time = current_time;
     setConn(aConn);
     al = new AccessLogEntry;
+    al->cache.start_time = current_time;
     al->tcpClient = clientConnection = aConn->clientConnection;
+    al->cache.port =  cbdataReference(aConn->port);
+    al->cache.caddr = aConn->log_addr;
+
 #if USE_SSL
     if (aConn->clientConnection != NULL && aConn->clientConnection->isOpen()) {
         if (SSL *ssl = fd_table[aConn->clientConnection->fd].ssl)
@@ -322,7 +325,8 @@ clientBeginRequest(const HttpRequestMethod& method, char const *url, CSCB * stre
     ClientHttpRequest *http = new ClientHttpRequest(NULL);
     HttpRequest *request;
     StoreIOBuffer tempBuffer;
-    http->start_time = current_time;
+    if (http->al != NULL)
+        http->al->cache.start_time = current_time;
     /* this is only used to adjust the connection offset in client_side.c */
     http->req_sz = 0;
     tempBuffer.length = taillen;
@@ -506,6 +510,7 @@ clientFollowXForwardedForCheck(allow_t answer, void *data)
         */
         ConnStateData *conn = http->getConn();
         conn->log_addr = request->indirect_client_addr;
+        http->al->cache.caddr = conn->log_addr;
     }
     request->x_forwarded_for_iterator.clean();
     request->flags.done_follow_x_forwarded_for = true;
@@ -1706,7 +1711,7 @@ ClientHttpRequest::doCallouts()
             calloutContext->adaptation_acl_check_done = true;
             if (Adaptation::AccessCheck::Start(
                         Adaptation::methodReqmod, Adaptation::pointPreCache,
-                        request, NULL, this))
+                        request, NULL, calloutContext->http->al, this))
                 return; // will call callback
         }
 #endif
@@ -1855,7 +1860,7 @@ ClientHttpRequest::startAdaptation(const Adaptation::ServiceGroupPointer &g)
     assert(!virginHeadSource);
     assert(!adaptedBodySource);
     virginHeadSource = initiateAdaptation(
-                           new Adaptation::Iterator(request, NULL, g));
+                           new Adaptation::Iterator(request, NULL, al, g));
 
     // we could try to guess whether we can bypass this adaptation
     // initiation failure, but it should not really happen
@@ -1896,6 +1901,11 @@ ClientHttpRequest::handleAdaptedHeader(HttpMsg *msg)
         HTTPMSGUNLOCK(request);
         request = new_req;
         HTTPMSGLOCK(request);
+
+        // update the new message to flag whether URL re-writing was done on it
+        if (strcmp(urlCanonical(request),uri) != 0)
+            request->flags.redirected = 1;
+
         /*
          * Store the new URI for logging
          */
index 509d9a1934e03c3b66b0e710963d07d6b47c5cf7..e34a2c76ca7d7e870af3d1e4adec948ffd2bf677 100644 (file)
 #ifndef SQUID_CLIENTSIDEREQUEST_H
 #define SQUID_CLIENTSIDEREQUEST_H
 
-#include "acl/forward.h"
 #include "AccessLogEntry.h"
-#include "clientStream.h"
+#include "acl/forward.h"
 #include "client_side.h"
+#include "clientStream.h"
 #include "HttpHeaderRange.h"
 #include "LogTags.h"
 
@@ -105,7 +105,6 @@ public:
     // NP: still an enum so each stage altering it must take care when replacing it.
     LogTags logType;
 
-    struct timeval start_time;
     AccessLogEntry::Pointer al; ///< access.log entry
 
     struct {
@@ -205,8 +204,8 @@ void clientAccessCheck(ClientHttpRequest *);
 void tunnelStart(ClientHttpRequest *, int64_t *, int *, const AccessLogEntry::Pointer &al);
 
 #if _USE_INLINE_
-#include "Store.h"
 #include "client_side_request.cci"
+#include "Store.h"
 #endif
 
 #endif /* SQUID_CLIENTSIDEREQUEST_H */
index dd9d5717a5b82fdf14f8076ca620e50dfde68cce..017a4c33154a0a4594aef9b6d8953505bfaaeda0 100644 (file)
@@ -39,8 +39,8 @@
 #include "comm/Connection.h"
 #include "comm/IoCallback.h"
 #include "comm/Loops.h"
-#include "comm/Write.h"
 #include "comm/TcpAcceptor.h"
+#include "comm/Write.h"
 #include "CommRead.h"
 #include "compat/cmsg.h"
 #include "DescriptorSet.h"
index 571c1b310e1549622fb109f79935ca3266a40246..8c5b04ea91af5a30721dccb39d55cacaddf4c2f5 100644 (file)
@@ -1,8 +1,8 @@
 #ifndef __COMM_H__
 #define __COMM_H__
 
-#include "CommCalls.h"
 #include "comm/IoCallback.h"
+#include "CommCalls.h"
 #include "StoreIOBuffer.h"
 
 namespace Ip
index 4c95f37b193844f91824d7d7e47eaa1937c3d125..c2913dbc55496aa456ffb59b16028f157f00921c 100644 (file)
@@ -4,16 +4,16 @@
 
 #include "squid.h"
 #include "CachePeer.h"
-#include "comm/ConnOpener.h"
+#include "comm.h"
 #include "comm/Connection.h"
+#include "comm/ConnOpener.h"
 #include "comm/Loops.h"
-#include "comm.h"
 #include "fd.h"
 #include "fde.h"
 #include "globals.h"
 #include "icmp/net_db.h"
-#include "ipcache.h"
 #include "ip/tools.h"
+#include "ipcache.h"
 #include "SquidConfig.h"
 #include "SquidTime.h"
 
index f4dce459de89adc958557348f2869ee79ba31624..003b474908b9836e68fcbfcb2326d4c0a7dbd640 100644 (file)
@@ -4,9 +4,9 @@
 #include "base/AsyncCall.h"
 #include "base/AsyncJob.h"
 #include "cbdata.h"
-#include "CommCalls.h"
-#include "comm_err_t.h"
 #include "comm/forward.h"
+#include "comm_err_t.h"
+#include "CommCalls.h"
 
 namespace Comm
 {
index 81e8a29839be1131be37ec1eae739962694fe642..47c822566983a114fea20d8931aa61c7dc9f6f17 100644 (file)
 #include "globals.h"
 #include "ICP.h"
 #include "mgr/Registration.h"
+#include "SquidConfig.h"
 #include "SquidTime.h"
 #include "StatCounters.h"
 #include "StatHist.h"
 #include "Store.h"
-#include "SquidConfig.h"
 
 #if HAVE_SYS_STAT_H
 #include <sys/stat.h>
index 33cf3fbd7fe01591453c01763a16cf0341736119..d0d3709c317bb4f60697fb8631d33984094a572f 100644 (file)
 #include "base/TextException.h"
 #include "client_db.h"
 #include "comm/AcceptLimiter.h"
-#include "CommCalls.h"
 #include "comm/comm_internal.h"
 #include "comm/Connection.h"
 #include "comm/Loops.h"
 #include "comm/TcpAcceptor.h"
+#include "CommCalls.h"
 #include "eui/Config.h"
 #include "fd.h"
 #include "fde.h"
index 48aee211eeb0d92fed8c4f2400dd7765e5f9b4d5..ee3b392cd15961846da13cd7a4ff77cb4b728234 100644 (file)
@@ -4,8 +4,8 @@
 #include "base/AsyncJob.h"
 #include "base/CbcPointer.h"
 #include "base/Subscription.h"
-#include "comm_err_t.h"
 #include "comm/forward.h"
+#include "comm_err_t.h"
 
 namespace Comm
 {
index 104d7a7820d69aaac5670ed558b61789741ad2f5..711c546814edeedb0b378b3fcc5f2a8d120bde9e 100644 (file)
@@ -1,8 +1,8 @@
 #ifndef _SQUID_COMM_FORWARD_H
 #define _SQUID_COMM_FORWARD_H
 
-#include "base/Vector.h"
 #include "base/RefCount.h"
+#include "base/Vector.h"
 
 namespace Comm
 {
index 7320fe9ad374392356b6480aaa1c18d94b288f75..ec3a99877104c13eca030fccdd1acf3855fa8790 100644 (file)
@@ -32,9 +32,9 @@
 
 #include "squid.h"
 #include "Debug.h"
+#include "ipc/Kids.h"
 #include "SquidTime.h"
 #include "util.h"
-#include "ipc/Kids.h"
 
 /* for shutting_down flag in xassert() */
 #include "globals.h"
index bcc6ad769104f0e0abdf479c111a26b2f61293a2..96489686ebfcc56782088ca33b246457bc174315 100644 (file)
@@ -63,8 +63,8 @@
 #include "NullDelayId.h"
 #include "SquidString.h"
 #include "SquidTime.h"
-#include "StoreClient.h"
 #include "Store.h"
+#include "StoreClient.h"
 
 /// \ingroup DelayPoolsInternal
 long DelayPools::MemoryUsed = 0;
index 4122a1dbb0c603c65786a5b39f418af4b7d50a98..fd3c43facde8f4bd717571ac1ad6298c23adce2d 100644 (file)
@@ -32,9 +32,9 @@
 
 #include "squid.h"
 #include "base/InstanceId.h"
+#include "comm.h"
 #include "comm/Connection.h"
 #include "comm/ConnOpener.h"
-#include "comm.h"
 #include "comm/Loops.h"
 #include "comm/Write.h"
 #include "dlink.h"
index edea909c663960831ead6c96e3d3d0f76a4662bf..f268ce3981112475c6afe829063d5d0d6606aca2 100644 (file)
 #include "disk.h"
 #include "err_detail_type.h"
 #include "errorpage.h"
+#include "fde.h"
 #include "ftp.h"
-#include "Store.h"
 #include "html_quote.h"
 #include "HttpHeaderTools.h"
 #include "HttpReply.h"
 #include "HttpRequest.h"
-#include "MemObject.h"
-#include "fde.h"
 #include "MemBuf.h"
+#include "MemObject.h"
 #include "rfc1738.h"
 #include "SquidConfig.h"
+#include "Store.h"
+#include "tools.h"
 #include "URL.h"
-#include "URLScheme.h"
 #include "URL.h"
-#include "tools.h"
+#include "URLScheme.h"
 #include "wordlist.h"
 #if USE_AUTH
 #include "auth/UserRequest.h"
@@ -839,7 +839,7 @@ ErrorState::Convert(char token, bool building_deny_info_url, bool allowRecursion
         else if (detail) {
             detail->useRequest(request);
             const String &errDetail = detail->toString();
-            if (errDetail.defined()) {
+            if (errDetail.size() > 0) {
                 MemBuf *detail_mb  = ConvertText(errDetail.termedBuf(), false);
                 mb.append(detail_mb->content(), detail_mb->contentSize());
                 delete detail_mb;
index 4b321afd46e0c41220042a08fa11740874a776f5..870c33bd168e2aa9a2508455f9b33ec9921a913b 100644 (file)
@@ -38,9 +38,9 @@
  */
 #if (USE_SQUID_ESI == 1)
 
+#include "client_side_request.h"
 #include "esi/Context.h"
 #include "Store.h"
-#include "client_side_request.h"
 
 void
 ESIContext::updateCachedAST()
index 7f8012dfbdd1c5fa227c6301f28e6edf568cd59d..801de17318ff21a1f7bce07a5eb020e35f5eae97 100644 (file)
 #ifndef SQUID_ESICONTEXT_H
 #define SQUID_ESICONTEXT_H
 
-#include "esi/Parser.h"
-#include "esi/Element.h"
 #include "clientStream.h"
 #include "err_type.h"
+#include "esi/Element.h"
+#include "esi/Parser.h"
 #include "http/StatusCode.h"
 
 class ESIVarState;
index effb2a646507eafe89778fc7b0e0aa7dadd366fb..8f632ca79f0e10ef4e63c80f594356c77a3afebb 100644 (file)
@@ -33,8 +33,8 @@
 
 #include "squid.h"
 #include "base/Vector.h"
-#include "esi/CustomParser.h"
 #include "Debug.h"
+#include "esi/CustomParser.h"
 #include "libTrie/Trie.h"
 #include "libTrie/TrieCharTransform.h"
 
index 480453d54f542f1c70bba2f6a51725ac383c0bc0..bfdd18ddc3ed93fcb4926889b37312c75034530b 100644 (file)
@@ -38,8 +38,8 @@
  */
 #if (USE_SQUID_ESI == 1)
 
-#include "client_side_request.h"
 #include "client_side.h"
+#include "client_side_request.h"
 #include "clientStream.h"
 #include "comm/Connection.h"
 #include "errorpage.h"
index 46d441a1d598bb8d4573868eef8d3beea51e17ef..120f71beff14a7233279b77d42c07f71fb908523 100644 (file)
@@ -39,8 +39,8 @@
  */
 #if (USE_SQUID_ESI == 1)
 
-#include "client_side_request.h"
 #include "client_side.h"
+#include "client_side_request.h"
 #include "esi/Include.h"
 #include "esi/VarState.h"
 #include "HttpReply.h"
index 64da18979abe4eee009d322d964f381cee4d5aae..abeb1f94174cb3e8fdd4739a1e33d647e3e2baac 100644 (file)
@@ -1,7 +1,7 @@
 #include "squid.h"
-#include "esi/Module.h"
 #include "esi/CustomParser.h"
 #include "esi/Libxml2Parser.h"
+#include "esi/Module.h"
 /* include for esi/ExpatParser.h must follow esi/Libxml2Parser.h */
 /* do not remove this comment, as it acts as barrier for the autmatic sorting */
 #include "esi/ExpatParser.h"
index 75c794d8a59331477cbc4a6329e8f06fcd41928c..94b373f0d60ea71fabb3c5781a9efd19ab344b1d 100644 (file)
  */
 #if (USE_SQUID_ESI == 1)
 
-#include "esi/Sequence.h"
-#include "esi/Literal.h"
 #include "esi/Attempt.h"
 #include "esi/Except.h"
+#include "esi/Literal.h"
+#include "esi/Sequence.h"
 
 class esiExcept;
 
index 0a538fb49466a1a975ebb3e7b60958fb2cfb7ea2..7a00daf244df63c69eb4b2452c205d95219af371 100644 (file)
 #ifndef SQUID_ESIVARSTATE_H
 #define SQUID_ESIVARSTATE_H
 
-#include "esi/Segment.h"
-#include "libTrie/Trie.h"
 #include "base/Vector.h"
+#include "esi/Segment.h"
 #include "HttpHeader.h"
+#include "libTrie/Trie.h"
 
 class HttpReply;
 
index a812705904251460f38a5ca048e4a2f2600efc86..830299557a8500384b83fe50f167d3242234eea2 100644 (file)
 #include "compat/drand48.h"
 #include "event.h"
 #include "mgr/Registration.h"
-#include "Store.h"
-#include "SquidTime.h"
 #include "profiler/Profiler.h"
+#include "SquidTime.h"
+#include "Store.h"
 #include "tools.h"
 
+#if HAVE_MATH_H
+#include <math.h>
+#endif
+
 /* The list of event processes */
 
 static OBJH eventDump;
@@ -219,39 +223,37 @@ EventScheduler::cancel(EVH * func, void *arg)
         debug_trap("eventDelete: event not found");
 }
 
+// The event API does not guarantee exact timing, but guarantees that no event
+// is fired before it is due. We may delay firing, but never fire too early.
 int
-EventScheduler::checkDelay()
+EventScheduler::timeRemaining() const
 {
     if (!tasks)
         return EVENT_IDLE;
 
-    int result = (int) ((tasks->when - current_dtime) * 1000);
-
-    if (result < 0)
-        return 0;
+    if (tasks->when <= current_dtime) // we are on time or late
+        return 0; // fire the event ASAP
 
-    return result;
+    const double diff = tasks->when - current_dtime; // microseconds
+    // Round UP: If we come back a nanosecond earlier, we will wait again!
+    const int timeLeft = static_cast<int>(ceil(1000*diff)); // milliseconds
+    // Avoid hot idle: A series of rapid select() calls with zero timeout.
+    const int minDelay = 1; // millisecond
+    return max(minDelay, timeLeft);
 }
 
 int
 EventScheduler::checkEvents(int timeout)
 {
-
-    ev_entry *event = NULL;
-
-    if (NULL == tasks)
-        return checkDelay();
-
-    if (tasks->when > current_dtime)
-        return checkDelay();
+    int result = timeRemaining();
+    if (result != 0)
+        return result;
 
     PROF_start(eventRun);
 
-    debugs(41, 5, HERE << "checkEvents");
-
-    while ((event = tasks)) {
-        if (event->when > current_dtime)
-            break;
+    do {
+        ev_entry *event = tasks;
+        assert(event);
 
         /* XXX assumes event->name is static memory! */
         AsyncCall::Pointer call = asyncCall(41,5, event->name,
@@ -265,14 +267,16 @@ EventScheduler::checkEvents(int timeout)
         tasks = event->next;
         delete event;
 
+        result = timeRemaining();
+
         // XXX: We may be called again during the same event loop iteration.
         // Is there a point in breaking now?
         if (heavy)
             break; // do not dequeue events following a heavy event
-    }
+    } while (result == 0);
 
     PROF_stop(eventRun);
-    return checkDelay();
+    return result;
 }
 
 void
index e35460d4489163bfe3059fdb90b5852867f566a4..41b7895891f94758168c35a08a476084e413e4ec 100644 (file)
@@ -32,8 +32,8 @@
 #ifndef SQUID_EVENT_H
 #define SQUID_EVENT_H
 
-#include "base/Vector.h"
 #include "AsyncEngine.h"
+#include "base/Vector.h"
 #include "MemPool.h"
 
 class StoreEntry;
@@ -80,8 +80,8 @@ public:
     void cancel(EVH * func, void * arg);
     /* clean up the used memory in the scheduler */
     void clean();
-    /* how long until the next event ? */
-    int checkDelay();
+    /* either EVENT_IDLE or milliseconds remaining until the next event */
+    int timeRemaining() const;
     /* cache manager output for the event queue */
     void dump(StoreEntry *);
     /* find a scheduled event */
index d8f85a1e96d114ab4635c545818118a4438fa299..c5063c73213e95572b460a2facc136058ccad095 100644 (file)
@@ -1380,6 +1380,8 @@ externalAclHandleReply(void *data, const HelperReply &reply)
 
     // XXX: make entryData store a proper HelperReply object instead of copying.
 
+    entryData.notes.append(&reply.notes);
+
     const char *label = reply.notes.findFirst("tag");
     if (label != NULL && *label != '\0')
         entryData.tag = label;
@@ -1603,6 +1605,18 @@ ExternalACLLookup::LookupDone(void *data, void *result)
 {
     ACLFilledChecklist *checklist = Filled(static_cast<ACLChecklist*>(data));
     checklist->extacl_entry = cbdataReference((external_acl_entry *)result);
+
+    // attach the helper kv-pair to the transaction
+    if (HttpRequest * req = checklist->request) {
+        // XXX: we have no access to the transaction / AccessLogEntry so cant SyncNotes().
+        // workaround by using anything already set in HttpRequest
+        // OR use new and rely on a later Sync copying these to AccessLogEntry
+        if (!req->notes)
+            req->notes = new NotePairs;
+
+        req->notes->appendNewOnly(&checklist->extacl_entry->notes);
+    }
+
     checklist->resumeNonBlockingCheck(ExternalACLLookup::Instance());
 }
 
index 81e33a836f27f8effc325c1c937b636620bd6c83..e19d7d4a1e4b1b704cdb80bd9279029d1ce17674 100644 (file)
@@ -88,9 +88,8 @@ typedef enum {
     LFT_SERVER_REQ_VERSION,
 
     /* request meta details */
-    LFT_REQUEST_SIZE_TOTAL,
-    /*LFT_REQUEST_SIZE_LINE, */
-    LFT_REQUEST_SIZE_HEADERS,
+    LFT_CLIENT_REQUEST_SIZE_TOTAL,
+    LFT_CLIENT_REQUEST_SIZE_HEADERS,
     /*LFT_REQUEST_SIZE_BODY, */
     /*LFT_REQUEST_SIZE_BODY_NO_TE, */
 
@@ -118,14 +117,15 @@ typedef enum {
     /* LFT_ADAPTED_REPLY_ALL_HEADERS, */
 
     /* response meta details */
-    LFT_REPLY_SIZE_TOTAL,
+    LFT_ADAPTED_REPLY_SIZE_TOTAL,
     LFT_REPLY_HIGHOFFSET,
     LFT_REPLY_OBJECTSIZE,
-    /*LFT_REPLY_SIZE_LINE, */
-    LFT_REPLY_SIZE_HEADERS,
+    LFT_ADAPTED_REPLY_SIZE_HEADERS,
     /*LFT_REPLY_SIZE_BODY, */
     /*LFT_REPLY_SIZE_BODY_NO_TE, */
 
+    LFT_CLIENT_IO_SIZE_TOTAL,
+
     /* client credentials */
     LFT_USER_NAME,   /* any source will do */
     LFT_USER_LOGIN,
@@ -140,6 +140,7 @@ typedef enum {
     LFT_TIME_SUBSECOND,
     LFT_TIME_LOCALTIME,
     LFT_TIME_GMT,
+    LFT_TIME_START, // the time the master transaction started
 
     /* processing time details */
     LFT_TIME_TO_HANDLE_REQUEST,
@@ -155,7 +156,6 @@ typedef enum {
 
     LFT_MIME_TYPE,
     LFT_TAG,
-    LFT_IO_SIZE_TOTAL,
     LFT_EXT_LOG,
 
     LFT_SEQUENCE_NUMBER,
@@ -193,6 +193,7 @@ typedef enum {
     LFT_ICAP_OUTCOME,
     LFT_ICAP_STATUS_CODE,
 #endif
+    LFT_CREDENTIALS,
 
 #if USE_SSL
     LFT_SSL_BUMP_MODE,
index cb955a0bd8a2a5fc7a9fbfc9ec50d21ffeed6f78..c0cfb2fc98b9c3d915a3903fb3f23356d484b457 100644 (file)
@@ -1,6 +1,6 @@
 #include "squid.h"
-#include "ConfigParser.h"
 #include "cache_cf.h"
+#include "ConfigParser.h"
 #include "Debug.h"
 #include "format/Config.h"
 #include <list>
index e737280e8e572cd44ef8f2aa76d5fdd47cecea59..15bef5e86888653fdc37ea975699f4f1edcf4989 100644 (file)
@@ -495,6 +495,13 @@ Format::Format::assemble(MemBuf &mb, const AccessLogEntry::Pointer &al, int logS
 
         break;
 
+        case LFT_TIME_START: {
+            int precision = fmt->widthMax >=0 ? fmt->widthMax : 3;
+            snprintf(tmp, sizeof(tmp), "%0*" PRId64 ".%0*d", fmt->zero && (fmt->widthMin - precision - 1 >= 0) ? fmt->widthMin - precision - 1 : 0, al->cache.start_time.tv_sec, precision, (int)(al->cache.start_time.tv_usec / fmt->divisor));
+            out = tmp;
+        }
+            break;
+
         case LFT_TIME_TO_HANDLE_REQUEST:
             outint = al->cache.msec;
             doint = 1;
@@ -982,21 +989,21 @@ Format::Format::assemble(MemBuf &mb, const AccessLogEntry::Pointer &al, int logS
             }
             break;
 
-        case LFT_REQUEST_SIZE_TOTAL:
-            outoff = al->cache.requestSize;
+        case LFT_CLIENT_REQUEST_SIZE_TOTAL:
+            outoff = al->http.clientRequestSz.messageTotal();
             dooff = 1;
             break;
 
-            /*case LFT_REQUEST_SIZE_LINE: */
-        case LFT_REQUEST_SIZE_HEADERS:
-            outoff = al->cache.requestHeadersSize;
+        case LFT_CLIENT_REQUEST_SIZE_HEADERS:
+            outoff = al->http.clientRequestSz.header;
             dooff =1;
             break;
+
             /*case LFT_REQUEST_SIZE_BODY: */
             /*case LFT_REQUEST_SIZE_BODY_NO_TE: */
 
-        case LFT_REPLY_SIZE_TOTAL:
-            outoff = al->cache.replySize;
+        case LFT_ADAPTED_REPLY_SIZE_TOTAL:
+            outoff = al->http.clientReplySz.messageTotal();
             dooff = 1;
             break;
 
@@ -1014,14 +1021,20 @@ Format::Format::assemble(MemBuf &mb, const AccessLogEntry::Pointer &al, int logS
 
             break;
 
-            /*case LFT_REPLY_SIZE_LINE: */
-        case LFT_REPLY_SIZE_HEADERS:
-            outint = al->cache.replyHeadersSize;
+        case LFT_ADAPTED_REPLY_SIZE_HEADERS:
+            outint = al->http.clientReplySz.header;
             doint = 1;
             break;
+
             /*case LFT_REPLY_SIZE_BODY: */
             /*case LFT_REPLY_SIZE_BODY_NO_TE: */
 
+        case LFT_CLIENT_IO_SIZE_TOTAL:
+            outint = al->http.clientRequestSz.messageTotal() + al->http.clientReplySz.messageTotal();
+            doint = 1;
+            break;
+            /*case LFT_SERVER_IO_SIZE_TOTAL: */
+
         case LFT_TAG:
             if (al->request)
                 out = al->request->tag.termedBuf();
@@ -1030,11 +1043,6 @@ Format::Format::assemble(MemBuf &mb, const AccessLogEntry::Pointer &al, int logS
 
             break;
 
-        case LFT_IO_SIZE_TOTAL:
-            outint = al->cache.requestSize + al->cache.replySize;
-            doint = 1;
-            break;
-
         case LFT_EXT_LOG:
             if (al->request)
                 out = al->request->extacl_log.termedBuf();
@@ -1107,6 +1115,14 @@ Format::Format::assemble(MemBuf &mb, const AccessLogEntry::Pointer &al, int logS
             }
             break;
 
+        case LFT_CREDENTIALS:
+#if USE_AUTH
+            if (al->request && al->request->auth_user_request != NULL)
+                out = strOrNull(al->request->auth_user_request->credentialsStr());
+#endif
+
+            break;
+
         case LFT_PERCENT:
             out = "%";
 
@@ -1168,7 +1184,7 @@ Format::Format::assemble(MemBuf &mb, const AccessLogEntry::Pointer &al, int logS
             }
 
             // enforce width limits if configured
-            const bool haveMaxWidth = fmt->widthMax >=0 && !doint && !dooff;
+            const bool haveMaxWidth = fmt->widthMax >=0 && !doint && !dooff && !fmt->divisor;
             if (haveMaxWidth || fmt->widthMin) {
                 const int minWidth = fmt->widthMin >= 0 ?
                                      fmt->widthMin :0;
index 1dd60e6c504efdf730f063552033cea3266ff9b1..a0341be0d83067de711519b58769fdd9938a5a70 100644 (file)
@@ -51,6 +51,7 @@ static TokenTableEntry TokenTable2C[] = {
     {"tu", LFT_TIME_SUBSECOND},
     {"tl", LFT_TIME_LOCALTIME},
     {"tg", LFT_TIME_GMT},
+    {"tS", LFT_TIME_START},
     {"tr", LFT_TIME_TO_HANDLE_REQUEST},
 
     {"<pt", LFT_PEER_RESPONSE_TIME},
@@ -96,22 +97,22 @@ static TokenTableEntry TokenTable2C[] = {
     /*{"<rq", LFT_SERVER_REQ_QUERY},*/
     {"<rv", LFT_SERVER_REQ_VERSION},
 
-    {">st", LFT_REQUEST_SIZE_TOTAL },
-    /*{ ">sl", LFT_REQUEST_SIZE_LINE }, * / / * the request line "GET ... " */
-    {">sh", LFT_REQUEST_SIZE_HEADERS },
+    {">st", LFT_CLIENT_REQUEST_SIZE_TOTAL },
+    {">sh", LFT_CLIENT_REQUEST_SIZE_HEADERS },
     /*{ ">sb", LFT_REQUEST_SIZE_BODY }, */
     /*{ ">sB", LFT_REQUEST_SIZE_BODY_NO_TE }, */
 
-    {"<st", LFT_REPLY_SIZE_TOTAL},
+    {"<st", LFT_ADAPTED_REPLY_SIZE_TOTAL}, // XXX: adapted should be code: <sta
     {"<sH", LFT_REPLY_HIGHOFFSET},
     {"<sS", LFT_REPLY_OBJECTSIZE},
-    /*{ "<sl", LFT_REPLY_SIZE_LINE }, * /   / * the reply line (protocol, code, text) */
-    {"<sh", LFT_REPLY_SIZE_HEADERS },
+    {"<sh", LFT_ADAPTED_REPLY_SIZE_HEADERS }, // XXX: adapted should be code: <sha
     /*{ "<sb", LFT_REPLY_SIZE_BODY }, */
     /*{ "<sB", LFT_REPLY_SIZE_BODY_NO_TE }, */
 
+    {"st", LFT_CLIENT_IO_SIZE_TOTAL}, // XXX: total from client should be stC ??
+    /*{"stP", LFT_SERVER_IO_SIZE_TOTAL},*/
+
     {"et", LFT_TAG},
-    {"st", LFT_IO_SIZE_TOTAL},
     {"ea", LFT_EXT_LOG},
     {"sn", LFT_SEQUENCE_NUMBER},
 
@@ -128,6 +129,7 @@ static TokenTableEntry TokenTableMisc[] = {
     {"err_code", LFT_SQUID_ERROR },
     {"err_detail", LFT_SQUID_ERROR_DETAIL },
     {"note", LFT_NOTE },
+    {"credentials", LFT_CREDENTIALS},
     {NULL, LFT_NONE}           /* this must be last */
 };
 
@@ -490,18 +492,18 @@ done:
         Config.onoff.log_fqdn = 1;
         break;
 
+    case LFT_TIME_START:
     case LFT_TIME_SUBSECOND:
         divisor = 1000;
 
         if (widthMax > 0) {
-            int i;
             divisor = 1000000;
 
-            for (i = widthMax; i > 1; --i)
+            for (int i = widthMax; i > 0; --i)
                 divisor /= 10;
 
             if (!divisor)
-                divisor = 0;
+                divisor = 1;
         }
         break;
 
index a682fb5128573aa6a5258cfb5c97490edd41cb1d..8190f28e9c10c2c2f7361c239601e4820477b084 100644 (file)
@@ -3,15 +3,15 @@
  */
 
 #include "squid.h"
-#include "MemObject.h"
-#include "Parsing.h"
 #include "DiskIO/DiskIOModule.h"
 #include "DiskIO/DiskIOStrategy.h"
 #include "DiskIO/WriteRequest.h"
-#include "fs/rock/RockIoState.h"
 #include "fs/rock/RockIoRequests.h"
+#include "fs/rock/RockIoState.h"
 #include "fs/rock/RockSwapDir.h"
 #include "globals.h"
+#include "MemObject.h"
+#include "Parsing.h"
 
 Rock::IoState::IoState(SwapDir *dir,
                        StoreEntry *anEntry,
index 8f07ded9d9faa8633720a6825baf969c428db3c7..aca7d890591e9bbd0f7f20935089576ce3c0c310 100644 (file)
@@ -4,15 +4,15 @@
 
 #include "squid.h"
 #include "disk.h"
+#include "fs/rock/RockDbCell.h"
 #include "fs/rock/RockRebuild.h"
 #include "fs/rock/RockSwapDir.h"
-#include "fs/rock/RockDbCell.h"
 #include "globals.h"
 #include "md5.h"
-#include "tools.h"
-#include "typedefs.h"
 #include "SquidTime.h"
 #include "store_rebuild.h"
+#include "tools.h"
+#include "typedefs.h"
 
 #if HAVE_ERRNO_H
 #include <errno.h>
index 7f4526b367cbe82b83b383672cc616e033f1dbec..88183253c1463516173bb97d5fa947b21a6c39a1 100644 (file)
@@ -9,10 +9,10 @@
 #include "DiskIO/DiskIOStrategy.h"
 #include "DiskIO/ReadRequest.h"
 #include "DiskIO/WriteRequest.h"
-#include "fs/rock/RockSwapDir.h"
-#include "fs/rock/RockIoState.h"
 #include "fs/rock/RockIoRequests.h"
+#include "fs/rock/RockIoState.h"
 #include "fs/rock/RockRebuild.h"
+#include "fs/rock/RockSwapDir.h"
 #include "globals.h"
 #include "ipc/mem/Pages.h"
 #include "MemObject.h"
index 165fa2cfc14f03745ca265249356464eec04b4f1..00cb22ca87beb4e5c589fe5411eb08bf5e095524 100644 (file)
@@ -1,11 +1,11 @@
 #ifndef SQUID_FS_ROCK_SWAP_DIR_H
 #define SQUID_FS_ROCK_SWAP_DIR_H
 
-#include "SwapDir.h"
 #include "DiskIO/DiskFile.h"
 #include "DiskIO/IORequestor.h"
 #include "fs/rock/RockDbCell.h"
 #include "ipc/StoreMap.h"
+#include "SwapDir.h"
 
 class DiskIOStrategy;
 class ReadRequest;
index 6a89e055d41fefb743533ff433ea40a24a21a165..9c20e01ecbfa293e73007f52d157e21a37ab1218 100644 (file)
@@ -31,9 +31,9 @@
 #define SQUID_FS_UFS_REBUILDSTATE_H
 
 #include "base/RefCount.h"
+#include "store_rebuild.h"
 #include "UFSSwapDir.h"
 #include "UFSSwapLogParser.h"
-#include "store_rebuild.h"
 
 class StoreEntry;
 
index a6c4708571f1117a983f487d08b3378e5c997335..5a5b9e2fe32b9a60d0886597cdaad17de96679b9 100644 (file)
  */
 
 #include "squid.h"
-#include "Store.h"
-#include "Generic.h"
 #include "DiskIO/DiskFile.h"
 #include "DiskIO/DiskIOStrategy.h"
 #include "DiskIO/ReadRequest.h"
 #include "DiskIO/WriteRequest.h"
+#include "Generic.h"
 #include "SquidList.h"
+#include "Store.h"
 #include "SwapDir.h"
-#include "UFSStrategy.h"
 #include "UFSStoreState.h"
+#include "UFSStrategy.h"
 
 CBDATA_NAMESPACED_CLASS_INIT(Fs::Ufs,UFSStoreState);
 
index fd3517440ebaadf9784d595739f7a73acd7149cd..5df2477c0f02b0c0d214251f7472110d542ce16e 100644 (file)
@@ -32,8 +32,8 @@
 #include "squid.h"
 
 #include "DiskIO/DiskIOStrategy.h"
-#include "UFSStrategy.h"
 #include "UFSStoreState.h"
+#include "UFSStrategy.h"
 #include "UFSSwapDir.h"
 
 bool
index 9a1094d7dd9829ce8d73f32dfe9e0512927b93f2..39e114573fe01bc2ac0e575370f5555b5c3a6f04 100644 (file)
 
 #include "squid.h"
 #include "cache_cf.h"
-#include "disk.h"
 #include "ConfigOption.h"
+#include "disk.h"
 #include "DiskIO/DiskIOModule.h"
-#include "FileMap.h"
+#include "DiskIO/DiskIOStrategy.h"
 #include "fde.h"
+#include "FileMap.h"
 #include "globals.h"
 #include "Parsing.h"
 #include "RebuildState.h"
+#include "SquidConfig.h"
 #include "SquidMath.h"
-#include "DiskIO/DiskIOStrategy.h"
+#include "SquidTime.h"
+#include "StatCounters.h"
 #include "store_key_md5.h"
 #include "StoreSearchUFS.h"
 #include "StoreSwapLogData.h"
-#include "SquidConfig.h"
-#include "SquidTime.h"
-#include "StatCounters.h"
 #include "tools.h"
 #include "UFSSwapDir.h"
 
index 3132e37bc53d32c6e75d00452a1a16ef76d1827c..dc6776e5e76916964751e2612758a49ded8bafe4 100644 (file)
@@ -33,8 +33,8 @@
 #include "Store.h"
 #include "StoreIOState.h"
 #include "StoreSearch.h"
-#include "SwapDir.h"
 #include "swap_log_op.h"
+#include "SwapDir.h"
 #include "UFSStrategy.h"
 
 class HttpRequest;
index fb320b0664587d1e243e353174d1b922c704f377..f4b108080936ff6056e3a9ec42bd5e8ed6af10a6 100644 (file)
@@ -1419,7 +1419,7 @@ FtpStateData::checkUrlpath()
     int l;
     size_t t;
 
-    if (str_type_eq.undefined()) //hack. String doesn't support global-static
+    if (str_type_eq.size()==0) //hack. String doesn't support global-static
         str_type_eq="type=";
 
     if ((t = request->urlpath.rfind(';')) != String::npos) {
index 55c47208676c92f92d988088d3d20fe337b98637..8e8ed002f06e3c893e8f16d5a21e5a0d0e97619f 100644 (file)
@@ -81,9 +81,9 @@ static void StatefulEnqueue(statefulhelper * hlp, helper_stateful_request * r);
 static bool helperStartStats(StoreEntry *sentry, void *hlp, const char *label);
 
 CBDATA_CLASS_INIT(helper);
-CBDATA_TYPE(helper_server);
+CBDATA_CLASS_INIT(helper_server);
 CBDATA_CLASS_INIT(statefulhelper);
-CBDATA_TYPE(helper_stateful_server);
+CBDATA_CLASS_INIT(helper_stateful_server);
 
 void
 HelperServerBase::initStats()
@@ -223,8 +223,7 @@ helperOpenServers(helper * hlp)
 
         ++ hlp->childs.n_running;
         ++ hlp->childs.n_active;
-        CBDATA_INIT_TYPE(helper_server);
-        srv = cbdataAlloc(helper_server);
+        srv = new helper_server;
         srv->hIpc = hIpc;
         srv->pid = pid;
         srv->initStats();
@@ -344,8 +343,7 @@ helperStatefulOpenServers(statefulhelper * hlp)
 
         ++ hlp->childs.n_running;
         ++ hlp->childs.n_active;
-        CBDATA_INIT_TYPE(helper_stateful_server);
-        helper_stateful_server *srv = cbdataAlloc(helper_stateful_server);
+        helper_stateful_server *srv = new helper_stateful_server;
         srv->hIpc = hIpc;
         srv->pid = pid;
         srv->flags.reserved = false;
index 34dfd8465e80f9a322ddcc26698c65f696cd5292..cc865e93d883496846b67589ac5258e10034128f 100644 (file)
@@ -37,9 +37,9 @@
 #include "cbdata.h"
 #include "comm/forward.h"
 #include "dlink.h"
-#include "ip/Address.h"
 #include "HelperChildConfig.h"
 #include "HelperReply.h"
+#include "ip/Address.h"
 
 class helper_request;
 
index 6f6f1fd7ce26632c393cf9d0eb0543c8c49dd307..4ad6678bac0a114ef3ef3175742ffe3429fb9aba 100644 (file)
@@ -54,8 +54,8 @@
 #include "SquidConfig.h"
 #include "SquidTime.h"
 #include "StatCounters.h"
-#include "store_key_md5.h"
 #include "Store.h"
+#include "store_key_md5.h"
 #include "StoreClient.h"
 #include "tools.h"
 #include "URL.h"
index c7df0195246a8ff2dc26fcddd7922410d0eedda5..99773d74f7c29cb5a7687f4735bb9abbb0770bb3 100644 (file)
@@ -36,9 +36,9 @@
 
 #include "squid.h"
 #include "acl/FilledChecklist.h"
-#include "base64.h"
 #include "base/AsyncJobCalls.h"
 #include "base/TextException.h"
+#include "base64.h"
 #include "CachePeer.h"
 #include "ChunkedCodingParser.h"
 #include "client_side.h"
@@ -49,8 +49,8 @@
 #include "fd.h"
 #include "fde.h"
 #include "globals.h"
-#include "HttpControlMsg.h"
 #include "http.h"
+#include "HttpControlMsg.h"
 #include "HttpHdrCc.h"
 #include "HttpHdrContRange.h"
 #include "HttpHdrSc.h"
@@ -362,7 +362,7 @@ HttpStateData::cacheableReply()
         }
 
         // NP: request CC:no-cache only means cache READ is forbidden. STORE is permitted.
-        if (rep->cache_control && rep->cache_control->hasNoCache() && rep->cache_control->noCache().defined()) {
+        if (rep->cache_control && rep->cache_control->hasNoCache() && rep->cache_control->noCache().size() > 0) {
             /* TODO: we are allowed to cache when no-cache= has parameters.
              * Provided we strip away any of the listed headers unless they are revalidated
              * successfully (ie, must revalidate AND these headers are prohibited on stale replies).
@@ -427,7 +427,7 @@ HttpStateData::cacheableReply()
             // HTTPbis WG verdict on this is that it is omitted from the spec due to being 'unexpected' by
             // some. The caching+revalidate is not exactly unsafe though with Squids interpretation of no-cache
             // (without parameters) as equivalent to must-revalidate in the reply.
-        } else if (rep->cache_control->hasNoCache() && !rep->cache_control->noCache().defined() && !REFRESH_OVERRIDE(ignore_must_revalidate)) {
+        } else if (rep->cache_control->hasNoCache() && rep->cache_control->noCache().size() == 0 && !REFRESH_OVERRIDE(ignore_must_revalidate)) {
             debugs(22, 3, HERE << "Authenticated but server reply Cache-Control:no-cache (equivalent to must-revalidate)");
             mayStore = true;
 #endif
@@ -913,9 +913,6 @@ HttpStateData::haveParsedReplyHeaders()
     Ctx ctx = ctx_enter(entry->mem_obj->url);
     HttpReply *rep = finalReply();
 
-    if (rep->sline.status() == Http::scPartialContent && rep->content_range)
-        currentOffset = rep->content_range->spec.offset;
-
     entry->timestampsSet();
 
     /* Check if object is cacheable or not based on reply code */
@@ -986,7 +983,7 @@ no_cache:
             const bool ccMustRevalidate = (rep->cache_control->proxyRevalidate() || rep->cache_control->mustRevalidate());
 
             // CC:no-cache (only if there are no parameters)
-            const bool ccNoCacheNoParams = (rep->cache_control->hasNoCache() && rep->cache_control->noCache().undefined());
+            const bool ccNoCacheNoParams = (rep->cache_control->hasNoCache() && rep->cache_control->noCache().size()==0);
 
             // CC:s-maxage=N
             const bool ccSMaxAge = rep->cache_control->hasSMaxAge();
@@ -1709,7 +1706,7 @@ HttpStateData::httpBuildRequestHeader(HttpRequest * request,
 
     // Add our own If-None-Match field if the cached entry has a strong ETag.
     // copyOneHeaderFromClientsideRequestToUpstreamRequest() adds client ones.
-    if (request->etag.defined()) {
+    if (request->etag.size() > 0) {
         hdr_out->addEntry(new HttpHeaderEntry(HDR_IF_NONE_MATCH, NULL,
                                               request->etag.termedBuf()));
     }
@@ -1966,12 +1963,30 @@ copyOneHeaderFromClientsideRequestToUpstreamRequest(const HttpHeaderEntry *e, co
 
     case HDR_IF_MODIFIED_SINCE:
         /** \par If-Modified-Since:
-        * append unless we added our own;
-         * \note at most one client's ims header can pass through */
-
-        if (!hdr_out->has(HDR_IF_MODIFIED_SINCE))
+         * append unless we added our own,
+         * but only if cache_miss_revalidate is enabled, or
+         *  the request is not cacheable, or
+         *  the request contains authentication credentials.
+         * \note at most one client's If-Modified-Since header can pass through
+         */
+        // XXX: need to check and cleanup the auth case so cacheable auth requests get cached.
+        if (hdr_out->has(HDR_IF_MODIFIED_SINCE))
+            break;
+        else if (Config.onoff.cache_miss_revalidate || !request->flags.cachable || request->flags.auth)
             hdr_out->addEntry(e->clone());
+        break;
 
+    case HDR_IF_NONE_MATCH:
+        /** \par If-None-Match:
+         * append if the wildcard '*' special case value is present, or
+         *   cache_miss_revalidate is disabled, or
+         *   the request is not cacheable in this proxy, or
+         *   the request contains authentication credentials.
+         * \note this header lists a set of responses for the server to elide sending. Squid added values are extending that set.
+         */
+        // XXX: need to check and cleanup the auth case so cacheable auth requests get cached.
+        if (hdr_out->hasListMember(HDR_IF_MATCH, "*", ',') || Config.onoff.cache_miss_revalidate || !request->flags.cachable || request->flags.auth)
+            hdr_out->addEntry(e->clone());
         break;
 
     case HDR_MAX_FORWARDS:
index 1346a286b513670703fbfec9322b7a9da5b6d490..422b99fdd0f211c3b092e27640f29be0621a3a8d 100644 (file)
@@ -30,9 +30,9 @@
  *
  */
 #include "squid.h"
+#include "Debug.h"
 #include "Icmp.h"
 #include "SquidTime.h"
-#include "Debug.h"
 
 Icmp::Icmp()
 {
index a983cca1ca5624c54de6c2d95ce42b1312a6d82b..3b79d2116f513b69f81b3858060ac287d34ec116 100644 (file)
 
 #if USE_ICMP
 
-#include "leakcheck.h"
-#include "SquidTime.h"
+#include "Debug.h"
 #include "Icmp4.h"
 #include "IcmpPinger.h"
-#include "Debug.h"
+#include "leakcheck.h"
+#include "SquidTime.h"
 
 const char *icmpPktStr[] = {
     "Echo Reply",
index 7b4bde6ec739fc0748af88f3cc3e45dc0040257f..6e8cab1eb25b0d0bd4003b296600384c4a689bd9 100644 (file)
 
 #if USE_ICMP
 
-#include "leakcheck.h"
-#include "SquidTime.h"
 #include "Debug.h"
 #include "Icmp6.h"
 #include "IcmpPinger.h"
+#include "leakcheck.h"
+#include "SquidTime.h"
 
 // Some system headers are only neeed internally here.
 // They should not be included via the header.
index e230fb332efd83d65e0f21ec8254498d059ff5d2..e49c69b8cdc62772566b815fd47662ef1d965a18 100644 (file)
 
 #if USE_ICMP
 
-#include "SquidTime.h"
-#include "IcmpPinger.h"
+#include "Debug.h"
 #include "Icmp4.h"
 #include "Icmp6.h"
-#include "Debug.h"
+#include "IcmpPinger.h"
+#include "SquidTime.h"
 
 #if HAVE_ERRNO_H
 #include <errno.h>
index cb022bd0bdb99ec0be74407256dc7c6bf540b820..4be96995217a4a511002ff9d256ca09bf6dfe325 100644 (file)
@@ -30,12 +30,6 @@ SBUF_SOURCE= \
        $(top_srcdir)/src/OutOfBoundsException.h \
        $(top_srcdir)/src/SBufExceptions.h \
        $(top_srcdir)/src/SBufExceptions.cc \
-       $(top_srcdir)/src/SBufTokenizer.h \
-       $(top_srcdir)/src/SBufTokenizer.cc \
-       $(top_srcdir)/src/SBufList.h \
-       $(top_srcdir)/src/SBufList.cc \
-       $(top_srcdir)/src/SBufUtil.h \
-       $(top_srcdir)/src/SBufUtil.cc \
        $(top_srcdir)/src/String.cc \
        $(top_srcdir)/src/SquidString.h \
        $(top_srcdir)/src/base/TextException.h \
index 1eb210e69b8eb01fe9a9751cdbe4379f46fb29be..6f1317d573ac1264471d77fba5370a35a58fd48a 100644 (file)
@@ -222,7 +222,8 @@ icpLogIcp(const Ip::Address &caddr, LogTags logcode, int len, const char *url, i
 
     al->cache.caddr = caddr;
 
-    al->cache.replySize = len;
+    // XXX: move to use icp.clientReply instead
+    al->http.clientReplySz.payloadData = len;
 
     al->cache.code = logcode;
 
index 5bfe8680a1765088eab9173d73c16e258754af58..41f87ab6f08f3ed37139c908ee9d19762858c0db 100644 (file)
@@ -36,9 +36,9 @@
  */
 
 #include "squid.h"
-#include "Store.h"
-#include "ICP.h"
 #include "HttpRequest.h"
+#include "ICP.h"
+#include "Store.h"
 
 /// \ingroup ServerProtocolICPInternal3
 class ICP3State : public ICPState, public StoreClient
index 3f15b8700bf4a3d23e01fc519713dd04a1c78458..1f90afebec34ee18ac76af3aaba953f41ae55c58 100644 (file)
@@ -35,8 +35,8 @@
 #include "comm.h"
 #include "comm/Connection.h"
 #include "comm/ConnOpener.h"
-#include "CommCalls.h"
 #include "comm/Write.h"
+#include "CommCalls.h"
 #include "globals.h"
 #include "ident/Config.h"
 #include "ident/Ident.h"
index 15d388877dfc6a5a51ac08522f19c82416633fed..a9c51c2008555294e9bd8c64b8068ee6e44b5926 100644 (file)
 #include "CacheManager.h"
 #include "comm/Connection.h"
 #include "errorpage.h"
-#include "icmp/net_db.h"
-#include "Store.h"
-#include "HttpRequest.h"
 #include "HttpReply.h"
+#include "HttpRequest.h"
+#include "icmp/net_db.h"
 #include "MemBuf.h"
 #include "SquidConfig.h"
 #include "SquidTime.h"
+#include "Store.h"
 #include "tools.h"
 #include "URL.h"
 #include "wordlist.h"
index 693319f045607ff5383aa92e5f8f9a0076f35681..774e21431d5affec24af6afed5ea16fcd2e52afd 100644 (file)
@@ -4,8 +4,8 @@
  * COPYRIGHT: GPL version 2, (C)2007-2013 Treehouse Networks Ltd.
  */
 #include "squid.h"
-#include "compat/inet_ntop.h"
 #include "compat/getaddrinfo.h"
+#include "compat/inet_ntop.h"
 #include "Debug.h"
 #include "ip/Address.h"
 #include "ip/tools.h"
index 0bf0d7a569b891ce4c9b803019c88a623f31a7df..8e00276b642a4d5f0eb2ec39b5e330dcbd89e3e2 100644 (file)
@@ -32,8 +32,8 @@
  */
 #include "squid.h"
 #include "comm/Connection.h"
-#include "ip/Intercept.h"
 #include "fde.h"
+#include "ip/Intercept.h"
 #include "src/tools.h"
 
 #if IPF_TRANSPARENT
index 51f5ecc502e163591156ff194035f8a314bc26d5..c62f9345b00520b069fa49e3d99b02edc8f6012d 100644 (file)
@@ -5,22 +5,40 @@
 int
 Ip::Qos::setSockTos(const Comm::ConnectionPointer &conn, tos_t tos)
 {
-#if defined(IP_TOS)
     // Bug 3731: FreeBSD produces 'invalid option'
     // unless we pass it a 32-bit variable storing 8-bits of data.
     // NP: it is documented as 'int' for all systems, even those like Linux which accept 8-bit char
     //     so we convert to a int before setting.
     int bTos = tos;
-    int x = setsockopt(conn->fd, IPPROTO_IP, IP_TOS, &bTos, sizeof(bTos));
-    if (x < 0)
-        debugs(50, 2, "Ip::Qos::setSockTos: setsockopt(IP_TOS) on " << conn << ": " << xstrerror());
-    else
-        conn->tos = tos;
-    return x;
+
+    if (conn->remote.isIPv4()) {
+#if defined(IP_TOS)
+        int x = setsockopt(conn->fd, IPPROTO_IP, IP_TOS, &bTos, sizeof(bTos));
+        if (x < 0)
+            debugs(50, 2, "Ip::Qos::setSockTos: setsockopt(IP_TOS) on " << conn << ": " << xstrerror());
+        else
+            conn->tos = tos;
+        return x;
 #else
-    debugs(50, DBG_IMPORTANT, "WARNING: setsockopt(IP_TOS) not supported on this platform");
-    return -1;
+        debugs(50, DBG_IMPORTANT, "WARNING: setsockopt(IP_TOS) not supported on this platform");
+        return -1;
+#endif
+
+    } else { // if (conn->remote.isIPv6()) {
+#if defined(IPV6_TCLASS)
+        int x = setsockopt(conn->fd, IPPROTO_IPV6, IPV6_TCLASS, &bTos, sizeof(bTos));
+        if (x < 0)
+            debugs(50, 2, "Ip::Qos::setSockTos: setsockopt(IPV6_TCLASS) on " << conn << ": " << xstrerror());
+        else
+            conn->tos = tos;
+        return x;
+#else
+        debugs(50, DBG_IMPORTANT, "WARNING: setsockopt(IPV6_TCLASS) not supported on this platform");
+        return -1;
 #endif
+    }
+
+    /* CANNOT REACH HERE */
 }
 
 int
index b300a4c20dc634cc0834b05b85c9961f4d1e494c..c1a52675f30a21e0c9c43e0d5541bc8b331978b9 100644 (file)
@@ -7,8 +7,8 @@
 #include "fde.h"
 #include "globals.h"
 #include "hier_code.h"
-#include "ip/tools.h"
 #include "ip/QosConfig.h"
+#include "ip/tools.h"
 #include "Parsing.h"
 
 #if HAVE_ERRNO_H
index 4280b0b410afc863a06a9eb02c10be4bbc36f8ad..e8a69a0f27c73b4ea9a8228055b6c184289fa283 100644 (file)
@@ -1,9 +1,9 @@
 #define SQUID_UNIT_TEST 1
 #include "squid.h"
 //#include "compat/getaddrinfo.h"
-#include "testAddress.h"
 #include "ip/Address.h"
 #include "ip/tools.h"
+#include "testAddress.h"
 
 #if HAVE_CSTRING
 #include <cstring>
index 2f3f5c3c6b7a94081d9e7f9bd8b7dd7a890470d6..94e611ec8606d2c6a454bd6de872b78f17ad24fe 100644 (file)
 #include "globals.h"
 #include "ip/Address.h"
 #include "ipc/Kid.h"
+#include "rfc1738.h"
 #include "SquidConfig.h"
 #include "SquidIpc.h"
 #include "tools.h"
-#include "rfc1738.h"
 
 static const char *hello_string = "hi there\n";
 #define HELLO_BUF_SZ 32
index c51c5423c95c3a6fde2c6ebf307e6da4d48c653a..374334779332c614511f2ce5e8bf41e030e1fdc5 100644 (file)
@@ -6,8 +6,8 @@
 #ifndef SQUID_IPC_INQUIRER_H
 #define SQUID_IPC_INQUIRER_H
 
-#include "base/AsyncJobCalls.h"
 #include "base/AsyncJob.h"
+#include "base/AsyncJobCalls.h"
 #include "ipc/forward.h"
 #include "ipc/Request.h"
 #include "ipc/Response.h"
index 5f87f9986aba2566f5fb785464fbbd92a4361b14..6b3f79ace9fc9e94641151467da49c6cdb9bf0c9 100644 (file)
@@ -7,6 +7,10 @@
 #include "globals.h"
 #include "ipc/Kid.h"
 
+#if HAVE_TIME_H
+#include <time.h>
+#endif
+
 #if HAVE_SYS_WAIT_H
 #include <sys/wait.h>
 #endif
index a5dfddfba34b90a771db38b0c4523b6cdd155a38..17c1465144cde3c84cb657c7aaaf42c49c61a3a9 100644 (file)
@@ -6,8 +6,8 @@
 #include "base/TextException.h"
 #include "globals.h"
 #include "ipc/Kids.h"
-#include "tools.h"
 #include "SquidConfig.h"
+#include "tools.h"
 
 Kids TheKids;
 KidName TheKidName;
index 720625f742d75560d059b533c08db1fe7a2aa158..927252ce26308c163fcd8354a3efca751494047f 100644 (file)
@@ -5,8 +5,8 @@
 
 #include "squid.h"
 #include "comm.h"
-#include "CommCalls.h"
 #include "comm/Connection.h"
+#include "CommCalls.h"
 #include "ipc/Port.h"
 
 const char Ipc::coordinatorAddr[] = DEFAULT_STATEDIR "/coordinator.ipc";
index 9282f2385f30f218abb4d96cc4d9c36ce6f5e681..299a6c7ade7d438f7bfe2bea1e32bf4344c48418 100644 (file)
@@ -6,8 +6,8 @@
 #ifndef SQUID_IPC_PORT_H
 #define SQUID_IPC_PORT_H
 
-#include "SquidString.h"
 #include "ipc/UdsOp.h"
+#include "SquidString.h"
 
 namespace Ipc
 {
index 6c2fecd8b7f8e7134a21b60873f68d837bf9ddca..9618b47bee33960ddced7853bce66dc84ad2b662 100644 (file)
@@ -4,9 +4,9 @@
 #ifndef SQUID_IPC_QUEUE_H
 #define SQUID_IPC_QUEUE_H
 
+#include "base/InstanceId.h"
 #include "base/Vector.h"
 #include "Debug.h"
-#include "base/InstanceId.h"
 #include "ipc/AtomicWord.h"
 #include "ipc/mem/FlexibleArray.h"
 #include "ipc/mem/Pointer.h"
index 14ba1b45498b0d93c951d61ced8ed6d08444279b..855ab5bc998f4afc73775b9e1bf774743d54376c 100644 (file)
@@ -3,8 +3,8 @@
  */
 
 #include "squid.h"
-#include "Store.h"
 #include "ipc/ReadWriteLock.h"
+#include "Store.h"
 
 bool
 Ipc::ReadWriteLock::lockShared()
index 70a484805ab343a4fba0dc4fb8b50718bf8d5312..430617891ec0cd8eca9d01fc3917f5803274a26a 100644 (file)
@@ -3,16 +3,16 @@
  */
 
 #include "squid.h"
-#include "comm.h"
 #include "base/TextException.h"
+#include "comm.h"
 #include "comm/Connection.h"
 #include "globals.h"
-#include "ipc/Port.h"
-#include "ipc/Messages.h"
 #include "ipc/Kids.h"
-#include "ipc/TypedMsgHdr.h"
-#include "ipc/StartListening.h"
+#include "ipc/Messages.h"
+#include "ipc/Port.h"
 #include "ipc/SharedListen.h"
+#include "ipc/StartListening.h"
+#include "ipc/TypedMsgHdr.h"
 #include "tools.h"
 
 #include <map>
index 5d73fdfdf6e65c4fbc50f7fe810d6053f58c6581..44055c9948df224d28e5e9ff1df0c4464f811b02 100644 (file)
@@ -6,11 +6,11 @@
 #ifndef SQUID_IPC_START_LISTENING_H
 #define SQUID_IPC_START_LISTENING_H
 
+#include "base/AsyncCall.h"
 #include "base/Subscription.h"
 #include "comm/forward.h"
 #include "ip/forward.h"
 #include "ipc/FdNotes.h"
-#include "base/AsyncCall.h"
 
 #if HAVE_IOSFWD
 #include <iosfwd>
index bb365513fd974de0d3d0d0a7c305d88779f98ad8..41fdf6f0f96dac759ab1114c47dff2e86282ad2a 100644 (file)
@@ -4,8 +4,8 @@
 
 #include "squid.h"
 #include "ipc/StoreMap.h"
-#include "store_key_md5.h"
 #include "Store.h"
+#include "store_key_md5.h"
 #include "tools.h"
 
 Ipc::StoreMap::Owner *
index fcb7f9d1a3ae0f18f86721d1855e946adfea7345..54979730168a6449cf021ce8aaaab0001633ff48 100644 (file)
@@ -1,9 +1,9 @@
 #ifndef SQUID_IPC_STORE_MAP_H
 #define SQUID_IPC_STORE_MAP_H
 
-#include "ipc/ReadWriteLock.h"
 #include "ipc/mem/FlexibleArray.h"
 #include "ipc/mem/Pointer.h"
+#include "ipc/ReadWriteLock.h"
 #include "typedefs.h"
 
 namespace Ipc
index 363e706e0c0d74fb37a2648e84a8006deb5cddb3..f6939b4b5ed418efb73c8c9b3dc0a2f67e9fdd75 100644 (file)
@@ -6,19 +6,19 @@
 #include "squid.h"
 #include "base/Subscription.h"
 #include "base/TextException.h"
+#include "CacheManager.h"
 #include "comm/Connection.h"
 #include "globals.h"
-#include "ipc/Strand.h"
-#include "ipc/StrandCoord.h"
+#include "ipc/Kids.h"
 #include "ipc/Messages.h"
 #include "ipc/SharedListen.h"
+#include "ipc/Strand.h"
+#include "ipc/StrandCoord.h"
 #include "ipc/StrandSearch.h"
-#include "ipc/Kids.h"
+#include "mgr/Forwarder.h"
 #include "mgr/Request.h"
 #include "mgr/Response.h"
-#include "mgr/Forwarder.h"
 #include "SwapDir.h" /* XXX: scope boundary violation */
-#include "CacheManager.h"
 #if USE_DISKIO_IPCIO
 #include "DiskIO/IpcIo/IpcIoFile.h" /* XXX: scope boundary violation */
 #endif
index eb293542053038cd412de974b496e6c59d15dfa9..fe201b34e52c319ed54fe84cac9719f7b84e302f 100644 (file)
@@ -167,10 +167,20 @@ Ipc::TypedMsgHdr::putRaw(const void *rawBuf, size_t rawSize)
     }
 }
 
+bool
+Ipc::TypedMsgHdr::hasFd() const
+{
+    struct cmsghdr *cmsg = CMSG_FIRSTHDR(this);
+    return cmsg &&
+           cmsg->cmsg_level == SOL_SOCKET &&
+           cmsg->cmsg_type == SCM_RIGHTS;
+}
+
 void
 Ipc::TypedMsgHdr::putFd(int fd)
 {
     Must(fd >= 0);
+    Must(!hasFd());
     allocControl();
 
     const int fdCount = 1;
@@ -183,12 +193,15 @@ Ipc::TypedMsgHdr::putFd(int fd)
     int *fdStore = reinterpret_cast<int*>(CMSG_DATA(cmsg));
     memcpy(fdStore, &fd, fdCount * sizeof(int));
     msg_controllen = cmsg->cmsg_len;
+
+    Must(hasFd());
 }
 
 int
 Ipc::TypedMsgHdr::getFd() const
 {
     Must(msg_control && msg_controllen);
+    Must(hasFd());
 
     struct cmsghdr *cmsg = CMSG_FIRSTHDR(this);
     Must(cmsg->cmsg_level == SOL_SOCKET);
index df64d9a5e238c16d64d656f955d0f46985af9092..b9d4bb967af14cb696a556bb545dbc0bde057120 100644 (file)
@@ -59,7 +59,8 @@ public:
 
     /* access to a "file" descriptor that can be passed between processes */
     void putFd(int aFd); ///< stores descriptor
-    int getFd() const; ///< returns descriptor
+    int getFd() const; ///< returns stored descriptor
+    bool hasFd() const; ///< whether the message has a descriptor stored
 
     /* raw, type-independent access for I/O */
     void prepForReading(); ///< reset and provide all buffers
index 23991c2828d51f858e1519d330d65599e9f1dd8a..7448ebc4b139a627db141e16c3093b067ec0b234 100644 (file)
@@ -4,11 +4,11 @@
  */
 
 #include "squid.h"
+#include "base/TextException.h"
 #include "comm.h"
-#include "CommCalls.h"
 #include "comm/Connection.h"
 #include "comm/Write.h"
-#include "base/TextException.h"
+#include "CommCalls.h"
 #include "ipc/UdsOp.h"
 
 Ipc::UdsOp::UdsOp(const String& pathAddr):
@@ -81,11 +81,21 @@ Ipc::UdsSender::UdsSender(const String& pathAddr, const TypedMsgHdr& aMessage):
         message(aMessage),
         retries(10), // TODO: make configurable?
         timeout(10), // TODO: make configurable?
+        sleeping(false),
         writing(false)
 {
     message.address(address);
 }
 
+void Ipc::UdsSender::swanSong()
+{
+    // did we abort while waiting between retries?
+    if (sleeping)
+        cancelSleep();
+
+    UdsOp::swanSong();
+}
+
 void Ipc::UdsSender::start()
 {
     UdsOp::start();
@@ -96,7 +106,7 @@ void Ipc::UdsSender::start()
 
 bool Ipc::UdsSender::doneAll() const
 {
-    return !writing && UdsOp::doneAll();
+    return !writing && !sleeping && UdsOp::doneAll();
 }
 
 void Ipc::UdsSender::write()
@@ -114,8 +124,53 @@ void Ipc::UdsSender::wrote(const CommIoCbParams& params)
     debugs(54, 5, HERE << params.conn << " flag " << params.flag << " retries " << retries << " [" << this << ']');
     writing = false;
     if (params.flag != COMM_OK && retries-- > 0) {
-        sleep(1); // do not spend all tries at once; XXX: use an async timed event instead of blocking here; store the time when we started writing so that we do not sleep if not needed?
-        write(); // XXX: should we close on error so that conn() reopens?
+        // perhaps a fresh connection and more time will help?
+        conn()->close();
+        startSleep();
+    }
+}
+
+/// pause for a while before resending the message
+void Ipc::UdsSender::startSleep()
+{
+    Must(!sleeping);
+    sleeping = true;
+    eventAdd("Ipc::UdsSender::DelayedRetry",
+             Ipc::UdsSender::DelayedRetry,
+             new Pointer(this), 1, 0, false); // TODO: Use Fibonacci increments
+}
+
+/// stop sleeping (or do nothing if we were not)
+void Ipc::UdsSender::cancelSleep()
+{
+    if (sleeping) {
+        // Why not delete the event? See Comm::ConnOpener::cancelSleep().
+        sleeping = false;
+        debugs(54, 9, "stops sleeping");
+    }
+}
+
+/// legacy wrapper for Ipc::UdsSender::delayedRetry()
+void Ipc::UdsSender::DelayedRetry(void *data)
+{
+    Pointer *ptr = static_cast<Pointer*>(data);
+    assert(ptr);
+    if (UdsSender *us = dynamic_cast<UdsSender*>(ptr->valid())) {
+        // get back inside AsyncJob protection by scheduling an async job call
+        typedef NullaryMemFunT<Ipc::UdsSender> Dialer;
+        AsyncCall::Pointer call = JobCallback(54, 4, Dialer, us, Ipc::UdsSender::delayedRetry);
+        ScheduleCallHere(call);
+    }
+    delete ptr;
+}
+
+/// make another sending attempt after a pause
+void Ipc::UdsSender::delayedRetry()
+{
+    debugs(54, 5, HERE << sleeping);
+    if (sleeping) {
+        sleeping = false;
+        write(); // reopens the connection if needed
     }
 }
 
index 9c3b1eed136e07044e2c79b70fc2b8cafb811e38..ccb0735133cb0201a85456f60450a7ef63ce50d7 100644 (file)
@@ -6,12 +6,12 @@
 #ifndef SQUID_IPC_ASYNCUDSOP_H
 #define SQUID_IPC_ASYNCUDSOP_H
 
-#include "SquidString.h"
 #include "base/AsyncJob.h"
 #include "cbdata.h"
 #include "comm/forward.h"
-#include "ipc/TypedMsgHdr.h"
 #include "ipc/FdNotes.h"
+#include "ipc/TypedMsgHdr.h"
+#include "SquidString.h"
 
 class CommTimeoutCbParams;
 class CommIoCbParams;
@@ -65,11 +65,17 @@ public:
     UdsSender(const String& pathAddr, const TypedMsgHdr& aMessage);
 
 protected:
+    virtual void swanSong(); // UdsOp (AsyncJob) API
     virtual void start(); // UdsOp (AsyncJob) API
     virtual bool doneAll() const; // UdsOp (AsyncJob) API
     virtual void timedout(); // UdsOp API
 
 private:
+    void startSleep();
+    void cancelSleep();
+    static void DelayedRetry(void *data);
+    void delayedRetry();
+
     void write(); ///< schedule writing
     void wrote(const CommIoCbParams& params); ///< done writing or error
 
@@ -77,6 +83,7 @@ private:
     TypedMsgHdr message; ///< what to send
     int retries; ///< how many times to try after a write error
     int timeout; ///< total time to send the message
+    bool sleeping; ///< whether we are waiting to retry a failed write
     bool writing; ///< whether Comm started and did not finish writing
 
 private:
index 779db4fe96b86bfc3cb70bf5923d0b0338a19c4f..51d65dd10cafa7bfa52447a387291c720e485570 100644 (file)
@@ -4,8 +4,8 @@
  */
 
 #include "squid.h"
-#include "base/TextException.h"
 #include "base/RunnersRegistry.h"
+#include "base/TextException.h"
 #include "ipc/mem/PagePool.h"
 #include "ipc/mem/Pages.h"
 #include "SwapDir.h"
index eab7767121beb64372d5cb88c967ebcda69a3965..0e808593906520520da5428ad213bedd1c13596c 100644 (file)
@@ -31,8 +31,8 @@
  */
 
 #include "squid.h"
-#include "cbdata.h"
 #include "CacheManager.h"
+#include "cbdata.h"
 #include "dlink.h"
 #include "DnsLookupDetails.h"
 #include "event.h"
index ada83c521e38fe056e57154382ecd37d21fe4519..4c19d3e3ec924795329426826c4207305ab814ba 100644 (file)
@@ -32,8 +32,8 @@
 
 #include "squid.h"
 #include "AccessLogEntry.h"
-#include "format/Token.h"
 #include "format/Quoting.h"
+#include "format/Token.h"
 #include "globals.h"
 #include "HttpRequest.h"
 #include "log/File.h"
@@ -77,7 +77,7 @@ Log::Format::HttpdCombined(const AccessLogEntry::Pointer &al, Logfile * logfile)
                   AnyP::ProtocolType_str[al->http.version.protocol],
                   al->http.version.major, al->http.version.minor,
                   al->http.code,
-                  al->cache.replySize,
+                  al->http.clientReplySz.messageTotal(),
                   referer,
                   agent,
                   LogTags_str[al->cache.code],
index f1c6e9a94febf3f741c2b1d48d40ecbc310f8a28..401d46ec1e92eaa0083ad0cbbb6398208b75694b 100644 (file)
@@ -64,7 +64,7 @@ Log::Format::HttpdCommon(const AccessLogEntry::Pointer &al, Logfile * logfile)
                   AnyP::ProtocolType_str[al->http.version.protocol],
                   al->http.version.major, al->http.version.minor,
                   al->http.code,
-                  al->cache.replySize,
+                  al->http.clientReplySz.messageTotal(),
                   LogTags_str[al->cache.code],
                   al->http.statusSfx(),
                   hier_code_str[al->hier.code],
index 4fafb6fe51366825c6f28d84db866cb5a4383039..6cc0dbaf525d9c582d72636b911c69188a31ff5b 100644 (file)
@@ -78,7 +78,7 @@ Log::Format::SquidNative(const AccessLogEntry::Pointer &al, Logfile * logfile)
                   LogTags_str[al->cache.code],
                   al->http.statusSfx(),
                   al->http.code,
-                  al->cache.replySize,
+                  al->http.clientReplySz.messageTotal(),
                   al->_private.method_str,
                   al->url,
                   user ? user : dash_str,
index e23fccf2c59b122affa5706f98b63a76e00d0ddb..e03b677333cedbed3307a1d0badc82d036041ec5 100644 (file)
@@ -38,8 +38,8 @@
 #include "log/Config.h"
 #include "log/File.h"
 #include "log/ModDaemon.h"
-#include "SquidIpc.h"
 #include "SquidConfig.h"
+#include "SquidIpc.h"
 #include "SquidTime.h"
 
 #if HAVE_ERRNO_H
index 647f6233228ae59cbe05031d76389b0bc63369c0..52593f3ed45634ca9fdd29509157d2cb2d89987d 100644 (file)
@@ -1,7 +1,7 @@
 #include "squid.h"
 #include "comm.h"
-#include "comm/ConnOpener.h"
 #include "comm/Connection.h"
+#include "comm/ConnOpener.h"
 #include "comm/Loops.h"
 #include "comm/Write.h"
 #include "fde.h"
index cb5af0eed96da7148a95eac7efb2ee72c36f44f9..b161d7bd8edef08d830551508efead154e479713 100644 (file)
 #include "adaptation/Config.h"
 #endif
 #include "CachePeer.h"
-#include "errorpage.h"
 #include "err_detail_type.h"
 #include "errorpage.h"
 #include "errorpage.h"
+#include "errorpage.h"
 #include "format/Token.h"
 #include "globals.h"
 #include "hier_code.h"
index fc18b003dc5356e15728fe1dc0e3ecd83e816c50..71c481dc42d548868f243eefd8638d51dbddeef8 100644 (file)
@@ -53,8 +53,8 @@
 #include "ExternalACL.h"
 #include "fd.h"
 #include "format/Token.h"
-#include "fs/Module.h"
 #include "fqdncache.h"
+#include "fs/Module.h"
 #include "FwdState.h"
 #include "globals.h"
 #include "htcp.h"
 #include "icmp/net_db.h"
 #include "ICP.h"
 #include "ident/Ident.h"
-#include "ipcache.h"
+#include "ip/tools.h"
 #include "ipc/Coordinator.h"
 #include "ipc/Kids.h"
 #include "ipc/Strand.h"
-#include "ip/tools.h"
+#include "ipcache.h"
 #include "Mem.h"
 #include "MemPool.h"
 #include "mime.h"
 #include "neighbors.h"
 #include "pconn.h"
-#include "PeerSelectState.h"
 #include "peer_sourcehash.h"
 #include "peer_userhash.h"
+#include "PeerSelectState.h"
 #include "profiler/Profiler.h"
 #include "redirect.h"
 #include "refresh.h"
 #include "send-announce.h"
-#include "store_log.h"
-#include "tools.h"
 #include "SquidConfig.h"
 #include "SquidDns.h"
 #include "SquidTime.h"
 #include "stat.h"
 #include "StatCounters.h"
-#include "StoreFileSystem.h"
 #include "Store.h"
+#include "store_log.h"
+#include "StoreFileSystem.h"
 #include "SwapDir.h"
+#include "tools.h"
 #include "unlinkd.h"
 #include "URL.h"
 #include "wccp.h"
 #include "ssl/certificate_db.h"
 #endif
 #if USE_SSL
-#include "ssl/helper.h"
 #include "ssl/context_storage.h"
+#include "ssl/helper.h"
 #endif
 #if ICAP_CLIENT
 #include "adaptation/icap/Config.h"
@@ -221,17 +221,15 @@ class SignalEngine: public AsyncEngine
 {
 
 public:
-    SignalEngine(EventLoop &evtLoop) : loop(evtLoop) {}
     virtual int checkEvents(int timeout);
 
 private:
-    static void StopEventLoop(void * data) {
-        static_cast<SignalEngine *>(data)->loop.stop();
+    static void StopEventLoop(void *) {
+        if (EventLoop::Running)
+            EventLoop::Running->stop();
     }
 
     void doShutdown(time_t wait);
-
-    EventLoop &loop;
 };
 
 int
@@ -1496,7 +1494,7 @@ SquidMain(int argc, char **argv)
     /* main loop */
     EventLoop mainLoop;
 
-    SignalEngine signalEngine(mainLoop);
+    SignalEngine signalEngine;
 
     mainLoop.registerEngine(&signalEngine);
 
index 3f5fe0d0e497e255b015041fa7c5454ceddf7c3a..16e6e457beb817f5f0f496e30d7fac7444a9f4df 100644 (file)
 #include "disk.h"
 #include "dlink.h"
 #include "event.h"
+#include "icmp/net_db.h"
 #include "md5.h"
 #include "Mem.h"
 #include "MemBuf.h"
 #include "memMeter.h"
 #include "mgr/Registration.h"
-#include "icmp/net_db.h"
 #include "RegexList.h"
 #include "SquidConfig.h"
 #include "SquidList.h"
index 214028caeeb68ec89158142be6d37bd3fb0d7f55..d0392fa47207ed7d483a662fb4e97e2c6c4f8075 100644 (file)
@@ -34,8 +34,8 @@
 
 #include "defines.h"
 #include "MemPool.h"
-#include "StoreIOBuffer.h"
 #include "Range.h"
+#include "StoreIOBuffer.h"
 
 class mem_node
 {
index dcb2dc88cfad05285c76307c7a20bfe1f0ae79ad..4e1d2e643700b8f88d72fc5e049a14dec238257e 100644 (file)
@@ -7,8 +7,8 @@
 #include "comm/Connection.h"
 #include "HttpReply.h"
 #include "ipc/Port.h"
-#include "mgr/ActionCreator.h"
 #include "mgr/Action.h"
+#include "mgr/ActionCreator.h"
 #include "mgr/ActionParams.h"
 #include "mgr/ActionProfile.h"
 #include "mgr/Command.h"
index 8f96df20cabb21f3a5b991b371bb226793a49379..19100d4a8f6375d354a01f33eb011acc2e8c3f18 100644 (file)
@@ -11,8 +11,8 @@
 #include "mgr/BasicActions.h"
 #include "mgr/Registration.h"
 #include "protos.h"
-#include "Store.h"
 #include "SquidConfig.h"
+#include "Store.h"
 
 Mgr::IndexAction::Pointer
 Mgr::IndexAction::Create(const Command::Pointer &cmd)
index d7a754dcfd52753cac3e4351fc18850a6bd99537..eb139e02093bad07245293b558c9e2801d90daef 100644 (file)
@@ -6,8 +6,8 @@
 #include "squid.h"
 #include "base/AsyncJobCalls.h"
 #include "base/TextException.h"
-#include "CommCalls.h"
 #include "comm/Connection.h"
+#include "CommCalls.h"
 #include "errorpage.h"
 #include "globals.h"
 #include "HttpReply.h"
index dc9e6c1df184d4fea6d1e7008f596ba9feb26bca..174dabf78d1bf11c4aa1096c1b45bdcec21d4d4b 100644 (file)
@@ -9,8 +9,8 @@
 #include "globals.h"
 #include "HttpReply.h"
 #include "ipc/Messages.h"
-#include "ipc/UdsOp.h"
 #include "ipc/TypedMsgHdr.h"
+#include "ipc/UdsOp.h"
 #include "mgr/Filler.h"
 #include "mgr/InfoAction.h"
 #include "mgr/Request.h"
index 8475857ec09491072ffbd7f33bb150f80f8f0cb3..9eb412dea68a646828d329b3ef1381c825f9d528 100644 (file)
@@ -9,17 +9,17 @@
 #include "comm/Connection.h"
 #include "comm/Write.h"
 #include "CommCalls.h"
+#include "errorpage.h"
 #include "HttpReply.h"
 #include "HttpRequest.h"
 #include "ipc/UdsOp.h"
 #include "mgr/ActionWriter.h"
-#include "mgr/IntParam.h"
-#include "mgr/Inquirer.h"
 #include "mgr/Command.h"
+#include "mgr/Inquirer.h"
+#include "mgr/IntParam.h"
 #include "mgr/Request.h"
 #include "mgr/Response.h"
 #include "SquidTime.h"
-#include "errorpage.h"
 #include <memory>
 #include <algorithm>
 
index 6487247c1fbc59aa6a785abaea8a9014716c41d4..479fe77c50d5cdef20b9f1518297ebf09cf161bd 100644 (file)
@@ -6,8 +6,8 @@
 #ifndef SQUID_MGR_IO_ACTION_H
 #define SQUID_MGR_IO_ACTION_H
 
-#include "mgr/Action.h"
 #include "IoStats.h"
+#include "mgr/Action.h"
 
 namespace Mgr
 {
index ef5438a17f6f8b03d4bc05f697e791fe15f84b40..e43e709a2d43b73b70dc67bfcede5d70b25a412a 100644 (file)
@@ -7,8 +7,8 @@
 #include "base/TextException.h"
 #include "ipc/TypedMsgHdr.h"
 #include "mgr/IntParam.h"
-#include "mgr/StringParam.h"
 #include "mgr/QueryParams.h"
+#include "mgr/StringParam.h"
 
 Mgr::QueryParam::Pointer
 Mgr::QueryParams::get(const String& name) const
index ec16e9d0524e52c01025d236f03a649c9e024298..43a31562045cbb21f61f987c1a79ee413dd988a1 100644 (file)
@@ -6,12 +6,12 @@
 #include "squid.h"
 #include "base/TextException.h"
 #include "comm/Connection.h"
-#include "CommCalls.h"
 #include "comm/Write.h"
+#include "CommCalls.h"
 #include "ipc/FdNotes.h"
 #include "mgr/StoreToCommWriter.h"
-#include "StoreClient.h"
 #include "Store.h"
+#include "StoreClient.h"
 
 CBDATA_NAMESPACED_CLASS_INIT(Mgr, StoreToCommWriter);
 
index 267d2191269fa0a4f56115ad208cd1fd762ac5a0..52f79e87edd85d0c917b5a1d3becf856425f7759 100644 (file)
@@ -52,8 +52,8 @@
 #include "MemObject.h"
 #include "mgr/Registration.h"
 #include "multicast.h"
-#include "NeighborTypeDomainList.h"
 #include "neighbors.h"
+#include "NeighborTypeDomainList.h"
 #include "PeerDigest.h"
 #include "PeerSelectState.h"
 #include "RequestFlags.h"
@@ -1316,6 +1316,7 @@ peerProbeConnect(CachePeer * p)
         Comm::ConnectionPointer conn = new Comm::Connection;
         conn->remote = p->addresses[i];
         conn->remote.port(p->http_port);
+        conn->setPeer(p);
         getOutgoingAddress(NULL, conn);
 
         ++ p->testing_now;
index 63c13a0115f3e5e00e69e344856fadfde26a019e..e6b497f711c17f30b807e7dd0fd85cb377e4d0cd 100644 (file)
@@ -347,16 +347,15 @@ PconnPool::dumpHist(StoreEntry * e) const
     storeAppendPrintf(e,
                       "%s persistent connection counts:\n"
                       "\n"
-                      "\treq/\n"
-                      "\tconn      count\n"
-                      "\t----  ---------\n",
+                      "\t Requests\t Connection Count\n"
+                      "\t --------\t ----------------\n",
                       descr);
 
     for (int i = 0; i < PCONN_HIST_SZ; ++i) {
         if (hist[i] == 0)
             continue;
 
-        storeAppendPrintf(e, "\t%4d  %9d\n", i, hist[i]);
+        storeAppendPrintf(e, "\t%d\t%d\n", i, hist[i]);
     }
 }
 
@@ -368,7 +367,7 @@ PconnPool::dumpHash(StoreEntry *e) const
 
     int i = 0;
     for (hash_link *walker = hid->next; walker; walker = hash_next(hid)) {
-        storeAppendPrintf(e, "\t item %5d: %s\n", i, (char *)(walker->key));
+        storeAppendPrintf(e, "\t item %d:\t%s\n", i, (char *)(walker->key));
         ++i;
     }
 }
index 0d303a99d493c74d2a10affa71f24c5250887ff8..6abe52e2c803e680ef1f26f6ffb5212a0c30fc64 100644 (file)
@@ -42,8 +42,8 @@
 #include "HttpRequest.h"
 #include "internal.h"
 #include "MemObject.h"
-#include "neighbors.h"
 #include "mime_header.h"
+#include "neighbors.h"
 #include "PeerDigest.h"
 #include "SquidTime.h"
 #include "Store.h"
index 7746de51e3199ca697d55e15752d3eb6ffe3610f..2c6e4d4dfe138d2a20cdbb1e9b5b2dd350642556 100644 (file)
@@ -45,8 +45,8 @@
 #include "HttpRequest.h"
 #include "icmp/net_db.h"
 #include "ICP.h"
-#include "ipcache.h"
 #include "ip/tools.h"
+#include "ipcache.h"
 #include "Mem.h"
 #include "neighbors.h"
 #include "peer_sourcehash.h"
@@ -141,6 +141,7 @@ peerSelectIcpPing(HttpRequest * request, int direct, StoreEntry * entry)
 void
 peerSelect(Comm::ConnectionList * paths,
            HttpRequest * request,
+           AccessLogEntry::Pointer const &al,
            StoreEntry * entry,
            PSC * callback,
            void *callback_data)
@@ -156,6 +157,7 @@ peerSelect(Comm::ConnectionList * paths,
 
     psstate->request = request;
     HTTPMSGLOCK(psstate->request);
+    psstate->al = al;
 
     psstate->entry = entry;
     psstate->paths = paths;
@@ -439,13 +441,17 @@ peerSelectFoo(ps_state * ps)
         if (ps->always_direct == ACCESS_DUNNO) {
             debugs(44, 3, "peerSelectFoo: direct = " << DirectStr[ps->direct] << " (always_direct to be checked)");
             /** check always_direct; */
-            ps->acl_checklist = new ACLFilledChecklist(Config.accessList.AlwaysDirect, request, NULL);
+            ACLFilledChecklist *ch = new ACLFilledChecklist(Config.accessList.AlwaysDirect, request, NULL);
+            ch->al = ps->al;
+            ps->acl_checklist = ch;
             ps->acl_checklist->nonBlockingCheck(peerCheckAlwaysDirectDone, ps);
             return;
         } else if (ps->never_direct == ACCESS_DUNNO) {
             debugs(44, 3, "peerSelectFoo: direct = " << DirectStr[ps->direct] << " (never_direct to be checked)");
             /** check never_direct; */
-            ps->acl_checklist = new ACLFilledChecklist(Config.accessList.NeverDirect, request, NULL);
+            ACLFilledChecklist *ch = new ACLFilledChecklist(Config.accessList.NeverDirect, request, NULL);
+            ch->al = ps->al;
+            ps->acl_checklist = ch;
             ps->acl_checklist->nonBlockingCheck(peerCheckNeverDirectDone, ps);
             return;
         } else if (request->flags.noDirect) {
index 854422bb7f77b6d5d326a8d98033378f1306d2be..4131d1c3ad234f2f5c580ddd14697cb45f9fd62e 100644 (file)
@@ -43,6 +43,7 @@
 #include "mgr/Registration.h"
 #include "redirect.h"
 #include "rfc1738.h"
+#include "SBuf.h"
 #include "SquidConfig.h"
 #include "Store.h"
 #if USE_AUTH
 /// url maximum lengh + extra informations passed to redirector
 #define MAX_REDIRECTOR_REQUEST_STRLEN (MAX_URL + 1024)
 
-typedef struct {
+class RedirectStateData
+{
+public:
+    explicit RedirectStateData(const char *url);
+    ~RedirectStateData();
+
     void *data;
-    char *orig_url;
+    SBuf orig_url;
 
     Ip::Address client_addr;
     const char *client_ident;
     const char *method_s;
     HLPCB *handler;
-} redirectStateData;
+
+private:
+    CBDATA_CLASS2(RedirectStateData);
+};
 
 static HLPCB redirectHandleReply;
 static HLPCB storeIdHandleReply;
-static void redirectStateFree(redirectStateData * r);
 static helper *redirectors = NULL;
 static helper *storeIds = NULL;
 static OBJH redirectStats;
 static OBJH storeIdStats;
 static int redirectorBypassed = 0;
 static int storeIdBypassed = 0;
-CBDATA_TYPE(redirectStateData);
+
+CBDATA_CLASS_INIT(RedirectStateData);
+
+RedirectStateData::RedirectStateData(const char *url) :
+        data(NULL),
+        orig_url(url),
+        client_addr(),
+        client_ident(NULL),
+        method_s(NULL),
+        handler(NULL)
+{
+}
+
+RedirectStateData::~RedirectStateData()
+{
+}
 
 static void
 redirectHandleReply(void *data, const HelperReply &reply)
 {
-    redirectStateData *r = static_cast<redirectStateData *>(data);
+    RedirectStateData *r = static_cast<RedirectStateData *>(data);
     debugs(61, 5, HERE << "reply=" << reply);
 
     // XXX: This function is now kept only to check for and display the garbage use-case
@@ -118,7 +141,7 @@ redirectHandleReply(void *data, const HelperReply &reply)
                 HelperReply newReply;
                 // BACKWARD COMPATIBILITY 2012-06-15:
                 // We got HelperReply::Unknown reply result but new
-                // redirectStateData handlers require HelperReply::Okay,
+                // RedirectStateData handlers require HelperReply::Okay,
                 // else will drop the helper reply
                 newReply.result = HelperReply::Okay;
                 newReply.notes.append(&reply.notes);
@@ -150,7 +173,7 @@ redirectHandleReply(void *data, const HelperReply &reply)
                 if (cbdataReferenceValidDone(r->data, &cbdata))
                     r->handler(cbdata, newReply);
 
-                redirectStateFree(r);
+                delete r;
                 return;
             }
         }
@@ -160,13 +183,13 @@ redirectHandleReply(void *data, const HelperReply &reply)
     if (cbdataReferenceValidDone(r->data, &cbdata))
         r->handler(cbdata, reply);
 
-    redirectStateFree(r);
+    delete r;
 }
 
 static void
 storeIdHandleReply(void *data, const HelperReply &reply)
 {
-    redirectStateData *r = static_cast<redirectStateData *>(data);
+    RedirectStateData *r = static_cast<RedirectStateData *>(data);
     debugs(61, 5,"StoreId helper: reply=" << reply);
 
     // XXX: This function is now kept only to check for and display the garbage use-case
@@ -176,14 +199,7 @@ storeIdHandleReply(void *data, const HelperReply &reply)
     if (cbdataReferenceValidDone(r->data, &cbdata))
         r->handler(cbdata, reply);
 
-    redirectStateFree(r);
-}
-
-static void
-redirectStateFree(redirectStateData * r)
-{
-    safe_free(r->orig_url);
-    cbdataFree(r);
+    delete r;
 }
 
 static void
@@ -228,10 +244,9 @@ constructHelperQuery(const char *name, helper *hlp, HLPCB *replyHandler, ClientH
     char myaddr[MAX_IPSTRLEN];
 
     /** TODO: create a standalone method to initialize
-     * the cbdata\redirectStateData for all the helpers.
+     * the RedirectStateData for all the helpers.
      */
-    redirectStateData *r = cbdataAlloc(redirectStateData);
-    r->orig_url = xstrdup(http->uri);
+    RedirectStateData *r = new RedirectStateData(http->uri);
     if (conn != NULL)
         r->client_addr = conn->log_addr;
     else
@@ -244,8 +259,7 @@ constructHelperQuery(const char *name, helper *hlp, HLPCB *replyHandler, ClientH
     }
 #endif
 
-    // HttpRequest initializes with null_string. So we must check both defined() and size()
-    if (!r->client_ident && http->request->extacl_user.defined() && http->request->extacl_user.size()) {
+    if (!r->client_ident && http->request->extacl_user.size() > 0) {
         r->client_ident = http->request->extacl_user.termedBuf();
         debugs(61, 5, HERE << "acl-user=" << (r->client_ident?r->client_ident:"NULL"));
     }
@@ -276,7 +290,7 @@ constructHelperQuery(const char *name, helper *hlp, HLPCB *replyHandler, ClientH
         fqdn = dash_str;
 
     sz = snprintf(buf, MAX_REDIRECTOR_REQUEST_STRLEN, "%s %s/%s %s %s myip=%s myport=%d\n",
-                  r->orig_url,
+                  r->orig_url.c_str(),
                   r->client_addr.toStr(claddr,MAX_IPSTRLEN),
                   fqdn,
                   r->client_ident[0] ? rfc1738_escape(r->client_ident) : dash_str,
@@ -368,26 +382,15 @@ storeIdStart(ClientHttpRequest * http, HLPCB * handler, void *data)
     constructHelperQuery("storeId helper", storeIds, storeIdHandleReply, http, handler, data);
 }
 
-static void
-redirectRegisterWithCacheManager(void)
-{
-    Mgr::RegisterAction("redirector", "URL Redirector Stats", redirectStats, 0, 1);
-    Mgr::RegisterAction("store_id", "StoreId helper Stats", storeIdStats, 0, 1); /* registering the new StoreID statistics in Mgr*/
-}
-
 void
 redirectInit(void)
 {
-    static int init = 0;
-
-    redirectRegisterWithCacheManager();
+    static bool init = false;
 
-    /** FIXME: Temporary unified helpers startup
-     * When and if needed for more helpers a separated startup
-     * method will be added for each of them.
-     */
-    if (!Config.Program.redirect && !Config.Program.store_id)
-        return;
+    if (!init) {
+        Mgr::RegisterAction("redirector", "URL Redirector Stats", redirectStats, 0, 1);
+        Mgr::RegisterAction("store_id", "StoreId helper Stats", storeIdStats, 0, 1);
+    }
 
     if (Config.Program.redirect) {
 
@@ -417,10 +420,7 @@ redirectInit(void)
         helperOpenServers(storeIds);
     }
 
-    if (!init) {
-        init = 1;
-        CBDATA_INIT_TYPE(redirectStateData);
-    }
+    init = true;
 }
 
 void
index cf5d9fd9666d3ed55306e80293b04baa91894cc9..4a4f08e921c7bf31642badfd308c985497d8b2d7 100644 (file)
 #endif
 
 #include "squid.h"
-#include "mgr/Registration.h"
 #include "HttpHdrCc.h"
-#include "HttpRequest.h"
 #include "HttpReply.h"
+#include "HttpRequest.h"
 #include "MemObject.h"
+#include "mgr/Registration.h"
 #include "RefreshPattern.h"
-#include "SquidTime.h"
 #include "SquidConfig.h"
+#include "SquidTime.h"
 #include "Store.h"
 #include "URL.h"
 
index 5eb9265ddfbf6fda5f1b6ca532f73696904fd338..168687a0f0750f91d39acbcac78800ffe99c1c3e 100644 (file)
 
 #include "squid.h"
 #include "heap.h"
-#include "store_heap_replacement.h"
-#include "Store.h"
 #include "MemObject.h"
 #include "SquidTime.h"
+#include "Store.h"
+#include "store_heap_replacement.h"
 
 #if HAVE_MATH_H
 #include <math.h>
index 66dabaf72aff86622502d0173f431182f0e3518b..0ac8c0714b92cc9115e10e6ed10f8fae8d59d9a3 100644 (file)
 
 #include "squid.h"
 #include "heap.h"
-#include "store_heap_replacement.h"
+#include "MemObject.h"
 #include "SquidList.h"
 #include "Store.h"
-#include "MemObject.h"
+#include "store_heap_replacement.h"
 #include "wordlist.h"
 
 REMOVALPOLICYCREATE createRemovalPolicy_heap;
index 97b8acb512eccabaec5946f852bf5953e39922bd..86e2c39fd244d1bfa40dca852fb059728f38a252 100644 (file)
@@ -32,9 +32,9 @@
  */
 
 #include "squid.h"
-#include "Store.h"
 #include "MemObject.h"
 #include "SquidTime.h"
+#include "Store.h"
 
 REMOVALPOLICYCREATE createRemovalPolicy_lru;
 
index 96811088fc74bbeafb38c3dfc8fb0cf52a2c60b8..3ec663fcf2ad7286476f7f4af00c2b117c7fe5db 100644 (file)
@@ -5,14 +5,14 @@
 
 #include "squid.h"
 #include "base/TextException.h"
-#include "CommCalls.h"
 #include "comm.h"
+#include "CommCalls.h"
 #include "globals.h"
 #include "ipc/Port.h"
-#include "snmp_core.h"
 #include "snmp/Forwarder.h"
 #include "snmp/Request.h"
 #include "snmp/Response.h"
+#include "snmp_core.h"
 
 CBDATA_NAMESPACED_CLASS_INIT(Snmp, Forwarder);
 
index 7b9b882455f2f005ce91d71d1a44ca39aa77a8af..9af1a42ae0d50e24a2fd684c8e11ba88b14aa3e2 100644 (file)
@@ -5,14 +5,14 @@
 
 #include "squid.h"
 #include "base/TextException.h"
-#include "CommCalls.h"
 #include "comm.h"
 #include "comm/Connection.h"
+#include "CommCalls.h"
 #include "ipc/UdsOp.h"
-#include "snmp_core.h"
 #include "snmp/Inquirer.h"
-#include "snmp/Response.h"
 #include "snmp/Request.h"
+#include "snmp/Response.h"
+#include "snmp_core.h"
 
 CBDATA_NAMESPACED_CLASS_INIT(Snmp, Inquirer);
 
@@ -28,6 +28,10 @@ Snmp::Inquirer::Inquirer(const Request& aRequest, const Ipc::StrandCoords& coord
     closer = asyncCall(49, 5, "Snmp::Inquirer::noteCommClosed",
                        CommCbMemFunT<Inquirer, CommCloseCbParams>(this, &Inquirer::noteCommClosed));
     comm_add_close_handler(conn->fd, closer);
+
+    // forget client FD to avoid sending it to strands that may forget to close
+    if (Request *snmpRequest = dynamic_cast<Request*>(request.getRaw()))
+        snmpRequest->fd = -1;
 }
 
 /// closes our copy of the client connection socket
index bf8ab94d92cb5f1cb727f4625b77162d6cdefce0..2c08fe45f432f185c0a743444e0b5fd68f5e02f4 100644 (file)
@@ -6,9 +6,9 @@
 #include "squid.h"
 #include "base/TextException.h"
 #include "ipc/TypedMsgHdr.h"
-#include "snmp_core.h"
 #include "snmp/Pdu.h"
 #include "snmp/Var.h"
+#include "snmp_core.h"
 #include "tools.h"
 #if HAVE_ALGORITHM
 #include <algorithm>
index 1cc3266ba1657bb1af3df56ee73b429e6c4e7356..359eae23b0d0b5b75aa761cfcd70d846f3952796 100644 (file)
@@ -33,7 +33,8 @@ Snmp::Request::Request(const Ipc::TypedMsgHdr& msg):
     session.unpack(msg);
     msg.getPod(address);
 
-    fd = msg.getFd();
+    // Requests from strands have FDs. Requests from Coordinator do not.
+    fd = msg.hasFd() ? msg.getFd() : -1;
 }
 
 void
@@ -46,7 +47,9 @@ Snmp::Request::pack(Ipc::TypedMsgHdr& msg) const
     session.pack(msg);
     msg.putPod(address);
 
-    msg.putFd(fd);
+    // Requests sent to Coordinator have FDs. Requests sent to strands do not.
+    if (fd >= 0)
+        msg.putFd(fd);
 }
 
 Ipc::Request::Pointer
index 5503c11f0f7ea80d9eb27d8f19cfed25db0a90c8..fb359e90e9b5e42f6b9dba6415f7dcffc6876763 100644 (file)
  */
 
 #include "squid.h"
-#include "CachePeer.h"
 #include "cache_snmp.h"
+#include "CachePeer.h"
 #include "globals.h"
 #include "mem_node.h"
 #include "neighbors.h"
 #include "snmp_agent.h"
 #include "snmp_core.h"
-#include "StatCounters.h"
-#include "StatHist.h"
 #include "SquidConfig.h"
 #include "SquidMath.h"
 #include "SquidTime.h"
 #include "stat.h"
+#include "StatCounters.h"
+#include "StatHist.h"
 #include "Store.h"
 #include "tools.h"
 
index 6bec56143dbcf87a1352388a96cdf4a2a484db98..c667bdb274666a0b00f7eadda9fa8a431158a3c7 100644 (file)
@@ -40,9 +40,9 @@
 #include "comm/UdpOpenDialer.h"
 #include "ip/Address.h"
 #include "ip/tools.h"
+#include "snmp/Forwarder.h"
 #include "snmp_agent.h"
 #include "snmp_core.h"
-#include "snmp/Forwarder.h"
 #include "SnmpRequest.h"
 #include "SquidConfig.h"
 #include "tools.h"
@@ -1152,8 +1152,8 @@ oid2addr(oid * id, Ip::Address &addr, u_int size)
 }
 
 /* SNMP checklists */
-#include "acl/Strategy.h"
 #include "acl/Strategised.h"
+#include "acl/Strategy.h"
 #include "acl/StringData.h"
 
 class ACLSNMPCommunityStrategy : public ACLStrategy<char const *>
index 27a181ea85e88d142c79303d9f5d64ac3ee2dfb5..7fb754f68fea572197a44ad3a993bee48bab9b64 100644 (file)
@@ -221,6 +221,31 @@ static SslErrorEntry TheSslErrorArray[] = {
     {SSL_ERROR_NONE, NULL}
 };
 
+static const char *OptionalSslErrors[] = {
+    "X509_V_ERR_UNABLE_TO_GET_CRL_ISSUER",
+    "X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION",
+    "X509_V_ERR_KEYUSAGE_NO_CRL_SIGN",
+    "X509_V_ERR_UNHANDLED_CRITICAL_CRL_EXTENSION",
+    "X509_V_ERR_INVALID_NON_CA",
+    "X509_V_ERR_PROXY_PATH_LENGTH_EXCEEDED",
+    "X509_V_ERR_KEYUSAGE_NO_DIGITAL_SIGNATURE",
+    "X509_V_ERR_PROXY_CERTIFICATES_NOT_ALLOWED",
+    "X509_V_ERR_INVALID_EXTENSION",
+    "X509_V_ERR_INVALID_POLICY_EXTENSION",
+    "X509_V_ERR_NO_EXPLICIT_POLICY",
+    "X509_V_ERR_DIFFERENT_CRL_SCOPE",
+    "X509_V_ERR_UNSUPPORTED_EXTENSION_FEATURE",
+    "X509_V_ERR_UNNESTED_RESOURCE",
+    "X509_V_ERR_PERMITTED_VIOLATION",
+    "X509_V_ERR_EXCLUDED_VIOLATION",
+    "X509_V_ERR_SUBTREE_MINMAX",
+    "X509_V_ERR_UNSUPPORTED_CONSTRAINT_TYPE",
+    "X509_V_ERR_UNSUPPORTED_CONSTRAINT_SYNTAX",
+    "X509_V_ERR_UNSUPPORTED_NAME_SYNTAX",
+    "X509_V_ERR_CRL_PATH_VALIDATION_ERROR",
+    NULL
+};
+
 struct SslErrorAlias {
     const char *name;
     const Ssl::ssl_error_t *errors;
@@ -331,6 +356,16 @@ const char *Ssl::GetErrorName(Ssl::ssl_error_t value)
     return NULL;
 }
 
+bool
+Ssl::ErrorIsOptional(const char *name)
+{
+    for (int i = 0; OptionalSslErrors[i] != NULL; ++i) {
+        if (strcmp(name, OptionalSslErrors[i]) == 0)
+            return true;
+    }
+    return false;
+}
+
 const char *
 Ssl::GetErrorDescr(Ssl::ssl_error_t value)
 {
@@ -369,7 +404,7 @@ static int copy_cn(void *check_data,  ASN1_STRING *cn_data)
     String *str = (String *)check_data;
     if (!str) // no data? abort
         return 0;
-    if (str->defined())
+    if (str->size() > 0)
         str->append(", ");
     str->append((const char *)cn_data->data, cn_data->length);
     return 1;
@@ -466,7 +501,7 @@ const char *Ssl::ErrorDetail::err_descr() const
 
 const char *Ssl::ErrorDetail::err_lib_error() const
 {
-    if (errReason.defined())
+    if (errReason.size() > 0)
         return errReason.termedBuf();
     else if (lib_error_no != SSL_ERROR_NONE)
         return ERR_error_string(lib_error_no, NULL);
@@ -539,7 +574,7 @@ void Ssl::ErrorDetail::buildDetail() const
 
 const String &Ssl::ErrorDetail::toString() const
 {
-    if (!errDetailStr.defined())
+    if (errDetailStr.size() == 0)
         buildDetail();
     return errDetailStr;
 }
index db821b87d397ee13a9d4f2126e416c9a42a7e125..181e19b6e3774a9deb966a548a52208dc14644f7 100644 (file)
@@ -38,6 +38,14 @@ const char *GetErrorName(ssl_error_t value);
  */
 const char *GetErrorDescr(ssl_error_t value);
 
+/**
+   \ingroup ServerProtocolSSLAPI
+   * Return true if the SSL error is optional and may not supported
+   * by current squid version
+ */
+
+bool ErrorIsOptional(const char *name);
+
 /**
    \ingroup ServerProtocolSSLAPI
  * Used to pass SSL error details to the error pages returned to the
index 4f0624186d68ba20d098461491047dab7de98383..5796f9c0b16bc3a9ec0f49a4e97c96c6465f954c 100644 (file)
@@ -1,7 +1,7 @@
 #include "squid.h"
 #include "ErrorDetail.h"
-#include "errorpage.h"
 #include "ErrorDetailManager.h"
+#include "errorpage.h"
 #include "mime_header.h"
 
 void Ssl::errorDetailInitialize()
@@ -218,32 +218,34 @@ Ssl::ErrorDetailFile::parse(const char *buffer, int len, bool eof)
             }
 
             Ssl::ssl_error_t ssl_error = Ssl::GetErrorCode(errorName.termedBuf());
-            if (ssl_error == SSL_ERROR_NONE) {
-                debugs(83, DBG_IMPORTANT, HERE <<
-                       "WARNING! invalid error detail name: " << errorName);
-                return false;
-            }
+            if (ssl_error != SSL_ERROR_NONE) {
 
-            if (theDetails->getErrorDetail(ssl_error)) {
-                debugs(83, DBG_IMPORTANT, HERE <<
-                       "WARNING! duplicate entry: " << errorName);
-                return false;
-            }
+                if (theDetails->getErrorDetail(ssl_error)) {
+                    debugs(83, DBG_IMPORTANT, HERE <<
+                           "WARNING! duplicate entry: " << errorName);
+                    return false;
+                }
 
-            ErrorDetailEntry &entry = theDetails->theList[ssl_error];
-            entry.error_no = ssl_error;
-            entry.name = errorName;
-            String tmp = parser.getByName("detail");
-            httpHeaderParseQuotedString(tmp.termedBuf(), tmp.size(), &entry.detail);
-            tmp = parser.getByName("descr");
-            httpHeaderParseQuotedString(tmp.termedBuf(), tmp.size(), &entry.descr);
-            bool parseOK = entry.descr.defined() && entry.detail.defined();
+                ErrorDetailEntry &entry = theDetails->theList[ssl_error];
+                entry.error_no = ssl_error;
+                entry.name = errorName;
+                String tmp = parser.getByName("detail");
+                const int detailsParseOk = httpHeaderParseQuotedString(tmp.termedBuf(), tmp.size(), &entry.detail);
+                tmp = parser.getByName("descr");
+                const int descrParseOk = httpHeaderParseQuotedString(tmp.termedBuf(), tmp.size(), &entry.descr);
+
+                if (!detailsParseOk || !descrParseOk) {
+                    debugs(83, DBG_IMPORTANT, HERE <<
+                           "WARNING! missing important field for detail error: " <<  errorName);
+                    return false;
+                }
 
-            if (!parseOK) {
+            } else if (!Ssl::ErrorIsOptional(errorName.termedBuf())) {
                 debugs(83, DBG_IMPORTANT, HERE <<
-                       "WARNING! missing imporant field for detail error: " <<  errorName);
+                       "WARNING! invalid error detail name: " << errorName);
                 return false;
             }
+
         }// else {only spaces and black lines; just ignore}
 
         buf.consume(size);
index 265bd2d0ce1779e523145fce91d139167f211e26..20a18a2cafcd53cb7e497c3f9925cce081d90d42 100644 (file)
@@ -3,8 +3,8 @@
 
 #include "base/RefCount.h"
 #include "HttpRequest.h"
-#include "ssl/support.h"
 #include "SquidString.h"
+#include "ssl/support.h"
 
 #if HAVE_MAP
 #include <map>
index 18ede8297da5de81791aa4e841af4593f80c181b..1cd5ad267c2214eb9bc7bf677ce4702afb29f800 100644 (file)
@@ -2,9 +2,9 @@
 #include "acl/FilledChecklist.h"
 #include "globals.h"
 #include "helper.h"
-#include "ssl/support.h"
 #include "ssl/cert_validate_message.h"
 #include "ssl/ErrorDetail.h"
+#include "ssl/support.h"
 
 void
 Ssl::CertValidationMsg::composeRequest(CertValidationRequest const &vcert)
index 9f92aa991d34d90bee435c3a2dc36502b6f2812b..d3d2221c5628355c0606c752a03c4c225bf68f86 100644 (file)
@@ -5,8 +5,8 @@
 #define SQUID_SSL_CERT_VALIDATE_MESSAGE_H
 
 #include "HelperReply.h"
-#include "ssl/support.h"
 #include "ssl/crtd_message.h"
+#include "ssl/support.h"
 #include <vector>
 
 namespace Ssl
index c1746849077d444a4209a3313d99e413cdb3a01f..2753d590c0274f3dfd0adc8953e82c7bb64995fb 100644 (file)
@@ -1,8 +1,8 @@
 #include "squid.h"
+#include "mgr/Registration.h"
+#include "ssl/context_storage.h"
 #include "Store.h"
 #include "StoreEntryStream.h"
-#include "ssl/context_storage.h"
-#include "mgr/Registration.h"
 #if HAVE_LIMITS
 #include <limits>
 #endif
index 59dd08c7d58e242417c2026798707e2599b2d491..20a6436234b56066847744453266917b5fc0ffc9 100644 (file)
@@ -4,11 +4,11 @@
 #if USE_SSL
 
 #include "base/LruMap.h"
-#include "SquidTime.h"
 #include "CacheManager.h"
 #include "ip/Address.h"
 #include "mgr/Action.h"
 #include "mgr/Command.h"
+#include "SquidTime.h"
 #include "ssl/gadgets.h"
 #if HAVE_MAP
 #include <map>
index 575953037399d2f31d8df5ce402d3542bf5ae559..f52db909daafdcc280f337ac288d46a7a3b885ea 100644 (file)
@@ -1,6 +1,6 @@
 #include "squid.h"
-#include "ssl/gadgets.h"
 #include "ssl/crtd_message.h"
+#include "ssl/gadgets.h"
 #if HAVE_CSTDLIB
 #include <cstdlib>
 #endif
index 789a4e31d934e75ab76d26897a71a63f20e26223..3e3099c3607d0c218d64c329d9b2214c7148aea3 100644 (file)
@@ -1,13 +1,13 @@
 #include "squid.h"
 #include "anyp/PortCfg.h"
-#include "ssl/Config.h"
-#include "ssl/helper.h"
+#include "SquidConfig.h"
 #include "SquidString.h"
 #include "SquidTime.h"
-#include "SwapDir.h"
 #include "ssl/cert_validate_message.h"
+#include "ssl/Config.h"
+#include "ssl/helper.h"
+#include "SwapDir.h"
 #include "wordlist.h"
-#include "SquidConfig.h"
 
 LruMap<Ssl::CertValidationResponse> *Ssl::CertValidationHelper::HelperCache = NULL;
 
index 0044191a02126c9a5ade114473ffc5f642f3c161..93cda09f5cb6b7fb4513d21c35a0aba088e3ad1a 100644 (file)
@@ -1,8 +1,8 @@
 #ifndef SQUID_SSL_HELPER_H
 #define SQUID_SSL_HELPER_H
 
-#include "base/LruMap.h"
 #include "../helper.h"
+#include "base/LruMap.h"
 #include "ssl/cert_validate_message.h"
 #include "ssl/crtd_message.h"
 
index 3b139ebb06983f54d4eacfebf879159082a5e0db..982faf1575796c1a23f223fa2b70dc31fd4b990e 100644 (file)
@@ -1,7 +1,7 @@
 #include "squid.h"
 #include "helpers/defines.h"
-#include "ssl/crtd_message.h"
 #include "ssl/certificate_db.h"
+#include "ssl/crtd_message.h"
 
 #if HAVE_CSTRING
 #include <cstring>
index e0123f6f667b4270385e307664285436ecc2330e..5236ec559276656068389271cc831d65c368c407 100644 (file)
@@ -45,8 +45,8 @@
 #include "SquidConfig.h"
 #include "ssl/Config.h"
 #include "ssl/ErrorDetail.h"
-#include "ssl/support.h"
 #include "ssl/gadgets.h"
+#include "ssl/support.h"
 #include "URL.h"
 
 #if HAVE_ERRNO_H
index 59db7e56a2b78a66b331cc8639db6d79b231e75d..ffad2c2c03d512602959d575e3c9e69ce5c891c0 100644 (file)
@@ -33,8 +33,8 @@
 #include "squid.h"
 #include "CacheDigest.h"
 #include "CachePeer.h"
-#include "client_side_request.h"
 #include "client_side.h"
+#include "client_side_request.h"
 #include "comm/Connection.h"
 #include "comm/Loops.h"
 #include "event.h"
@@ -43,9 +43,9 @@
 #include "globals.h"
 #include "HttpRequest.h"
 #include "IoStats.h"
-#include "MemObject.h"
 #include "mem_node.h"
 #include "MemBuf.h"
+#include "MemObject.h"
 #include "mgr/CountersAction.h"
 #include "mgr/FunAction.h"
 #include "mgr/InfoAction.h"
 #include "SquidConfig.h"
 #include "SquidMath.h"
 #include "SquidTime.h"
-#include "StatCounters.h"
 #include "stat.h"
-#include "StoreClient.h"
+#include "StatCounters.h"
 #include "Store.h"
 #include "store_digest.h"
+#include "StoreClient.h"
 #include "tools.h"
 #if USE_AUTH
 #include "auth/UserRequest.h"
@@ -2042,15 +2042,15 @@ statClientRequests(StoreEntry * s)
         e = http->storeEntry();
         storeAppendPrintf(s, "entry %p/%s\n", e, e ? e->getMD5Text() : "N/A");
         storeAppendPrintf(s, "start %ld.%06d (%f seconds ago)\n",
-                          (long int) http->start_time.tv_sec,
-                          (int) http->start_time.tv_usec,
-                          tvSubDsec(http->start_time, current_time));
+                          (long int) http->al->cache.start_time.tv_sec,
+                          (int) http->al->cache.start_time.tv_usec,
+                          tvSubDsec(http->al->cache.start_time, current_time));
 #if USE_AUTH
         if (http->request->auth_user_request != NULL)
             p = http->request->auth_user_request->username();
         else
 #endif
-            if (http->request->extacl_user.defined()) {
+            if (http->request->extacl_user.size() > 0) {
                 p = http->request->extacl_user.termedBuf();
             }
 
index c7b53981a2bd448a002c0a36dd203bfa107c5a0d..e67e4d360abf7d1e196d5d6565bd2f3a4a4d33a1 100644 (file)
@@ -33,8 +33,8 @@
 #ifndef SQUID_STMEM_H
 #define SQUID_STMEM_H
 
-#include "splay.h"
 #include "Range.h"
+#include "splay.h"
 
 class mem_node;
 
index 4d6b771bab533c559f9b3e690fb40053ba706ef2..4f83302388e76e9a4edd958ebc405b6a9ea0869b 100644 (file)
 #include "Stack.h"
 #include "StatCounters.h"
 #include "stmem.h"
+#include "Store.h"
 #include "store_digest.h"
 #include "store_key_md5.h"
 #include "store_key_md5.h"
 #include "store_log.h"
 #include "store_rebuild.h"
-#include "Store.h"
 #include "StoreClient.h"
 #include "StoreIOState.h"
 #include "StoreMeta.h"
@@ -788,7 +788,7 @@ StoreEntry::setPublicKey()
 #if X_ACCELERATOR_VARY
             vary = mem_obj->getReply()->header.getList(HDR_X_ACCELERATOR_VARY);
 
-            if (vary.defined()) {
+            if (vary.size() > 0) {
                 /* Again, we own this structure layout */
                 rep->header.putStr(HDR_X_ACCELERATOR_VARY, vary.termedBuf());
                 vary.clean();
index d0780bae15640862d31f3fdd8d8ec48a29bc3a88..b990e385c21118f26c8a3f4d6bb27075344fa403 100644 (file)
@@ -42,9 +42,9 @@
 #include "profiler/Profiler.h"
 #include "SquidConfig.h"
 #include "StatCounters.h"
-#include "StoreClient.h"
 #include "Store.h"
 #include "store_swapin.h"
+#include "StoreClient.h"
 #include "StoreMeta.h"
 #include "StoreMetaUnpacker.h"
 #if USE_DELAY_POOLS
@@ -249,12 +249,20 @@ store_client::copy(StoreEntry * anEntry,
     PROF_stop(storeClient_kickReads);
     copying = false;
 
+    // XXX: storeClientCopy2 calls doCopy() whose callback may free 'this'!
+    // We should make store copying asynchronous, to avoid worrying about
+    // 'this' being secretly deleted while we are still inside the object.
+    // For now, lock and use on-stack objects after storeClientCopy2().
+    ++anEntry->lock_count;
+
     storeClientCopy2(entry, this);
 
 #if USE_ADAPTATION
-    if (entry)
-        entry->kickProducer();
+    anEntry->kickProducer();
 #endif
+
+    anEntry->unlock(); // after the "++enEntry->lock_count" above
+    // Add no code here. This object may no longer exist.
 }
 
 /*
@@ -318,6 +326,9 @@ storeClientCopy2(StoreEntry * e, store_client * sc)
     /* Warning: doCopy may indirectly free itself in callbacks,
      * hence the lock to keep it active for the duration of
      * this function
+     * XXX: Locking does not prevent calling sc destructor (it only prevents
+     * freeing sc memory) so sc may become invalid from C++ p.o.v.
+     *
      */
     cbdataInternalLock(sc);
     assert (!sc->flags.store_copying);
@@ -712,7 +723,14 @@ storeUnregister(store_client * sc, StoreEntry * e, void *data)
 
     delete sc;
 
+    // This old assert seemed to imply that a locked entry cannot be deleted,
+    // but this entry may be deleted because StoreEntry::abort() unlocks it.
     assert(e->lock_count > 0);
+    // Since lock_count of 1 is not sufficient to prevent entry destruction,
+    // we must lock again so that we can dereference e after CheckQuickAbort().
+    // Do not call expensive StoreEntry::lock() here; e "use" has been counted.
+    // TODO: Separate entry locking from "use" counting to make locking cheap.
+    ++e->lock_count;
 
     if (mem->nclients == 0)
         CheckQuickAbort(e);
@@ -723,6 +741,7 @@ storeUnregister(store_client * sc, StoreEntry * e, void *data)
     e->kickProducer();
 #endif
 
+    e->unlock(); // after the "++e->lock_count" above
     return 1;
 }
 
index 07e8743ffbd9be749bcc5d2ce2162a74390393f5..cade545757edb10547f340169b5bdcfb64297768 100644 (file)
@@ -43,8 +43,8 @@
 #include "Store.h"
 #include "store_key_md5.h"
 #include "StoreHashIndex.h"
-#include "SwapDir.h"
 #include "swap_log_op.h"
+#include "SwapDir.h"
 #include "tools.h"
 
 #if HAVE_STATVFS
index e2f9d2a2c37def1b4b8257fd4d6d43604caa84ef..93a0a11a6d4d025b6ff3670e9ffdbc62344dc7a4 100644 (file)
@@ -1,7 +1,7 @@
 #include "squid.h"
-#include "Store.h"
 #include "MemObject.h"
 #include "SquidConfig.h"
+#include "Store.h"
 #include "SwapDir.h"
 
 StoreIoStats store_io_stats;
index c4b32217ae076c57836509fdef0213d547865bab..a888b92a4a929a52a7534afe0cbfa9b021774155 100644 (file)
 #include "log/File.h"
 #include "MemObject.h"
 #include "mgr/Registration.h"
-#include "Store.h"
-#include "store_log.h"
 #include "SquidConfig.h"
 #include "SquidTime.h"
+#include "Store.h"
+#include "store_log.h"
 
 static const char *storeLogTags[] = {
     "CREATE",
@@ -62,7 +62,7 @@ storeLog(int tag, const StoreEntry * e)
     MemObject *mem = e->mem_obj;
     HttpReply const *reply;
 
-    if (str_unknown.undefined())
+    if (str_unknown.size()==0)
         str_unknown="unknown"; //hack. Delay initialization as string doesn't support global variables..
 
     if (NULL == storelog)
index c9cec3747fdef276d97d82b626658c1c8cd54e0d..f9f9de777612fdd57d01161a11e34afb5e1344d7 100644 (file)
 #include "event.h"
 #include "globals.h"
 #include "md5.h"
+#include "SquidConfig.h"
+#include "SquidTime.h"
 #include "StatCounters.h"
 #include "Store.h"
-#include "store_key_md5.h"
-#include "SwapDir.h"
 #include "store_digest.h"
+#include "store_key_md5.h"
 #include "store_rebuild.h"
 #include "StoreSearch.h"
-#include "SquidConfig.h"
-#include "SquidTime.h"
+#include "SwapDir.h"
 
 #if HAVE_ERRNO_H
 #include <errno.h>
@@ -243,9 +243,9 @@ storeRebuildProgress(int sd_index, int total, int sofar)
 }
 
 #include "fde.h"
-#include "StoreMetaUnpacker.h"
-#include "StoreMeta.h"
 #include "Generic.h"
+#include "StoreMeta.h"
+#include "StoreMetaUnpacker.h"
 
 struct InitStoreEntry : public unary_function<StoreMeta, void> {
     InitStoreEntry(StoreEntry *anEntry, cache_key *aKey):what(anEntry),index(aKey) {}
index da4cab34273b1c46b14f9cc6771dac125feef3a8..f092df574a1822022ff0a51575d4c5a1984ef0e8 100644 (file)
@@ -33,9 +33,9 @@
 #include "squid.h"
 #include "globals.h"
 #include "StatCounters.h"
-#include "StoreClient.h"
 #include "Store.h"
 #include "store_swapin.h"
+#include "StoreClient.h"
 
 static StoreIOState::STIOCB storeSwapInFileClosed;
 static StoreIOState::STFNCB storeSwapInFileNotify;
index 9d1ad7266e64c37ea8f4d1d3b1976156ff103b0a..53121e34b4ca48975864c01bb647940da6719875 100644 (file)
 
 #include "squid.h"
 #include "cbdata.h"
-#include "StoreClient.h"
 #include "globals.h"
 #include "Store.h"
+#include "StoreClient.h"
 /* FIXME: Abstract the use of this more */
 #include "mem_node.h"
 #include "MemObject.h"
 #include "SquidConfig.h"
-#include "SwapDir.h"
 #include "StatCounters.h"
 #include "store_log.h"
 #include "swap_log_op.h"
+#include "SwapDir.h"
 
 static void storeSwapOutStart(StoreEntry * e);
 static StoreIOState::STIOCB storeSwapOutFileClosed;
index 16de357a983a55eead5908b921348950f188c867..6bfd1d29156ec34b9fba63a7eb5e4bc934d04076 100644 (file)
@@ -20,6 +20,12 @@ SBufFindTest::SBufFindTest():
         thePlacement(placeEof),
         theStringPos(0),
         theBareNeedlePos(0),
+        theFindString(0),
+        theFindSBuf(0),
+        theReportFunc(),
+        theReportNeedle(),
+        theReportPos(),
+        theReportQuote('"'),
         caseCount(0),
         errorCount(0),
         reportCount(0)
index 9bdffa0b0f289530b38ad9d4cb8c568f2a7752d1..b01b39344b3b1ec7cde205987cc39a7d86e2103c 100644 (file)
@@ -1,7 +1,9 @@
 STUB_SOURCE= tests/STUB.h \
+       tests/stub_CacheDigest.cc \
        tests/stub_CommIO.cc \
        tests/stub_DelayId.cc \
        tests/stub_DiskIOModule.cc \
+       tests/stub_ETag.cc \
        tests/stub_HelperChildConfig.cc \
        tests/stub_HttpReply.cc \
        tests/stub_HttpRequest.cc \
@@ -10,11 +12,14 @@ STUB_SOURCE= tests/STUB.h \
        tests/stub_MemStore.cc \
        tests/stub_Port.cc \
        tests/stub_StatHist.cc \
+       tests/stub_StoreMeta.cc \
+       tests/stub_SwapDir.cc \
        tests/stub_UdsOp.cc \
        tests/stub_access_log.cc \
        tests/stub_acl.cc \
        tests/stub_cache_cf.cc \
        tests/stub_cache_manager.cc \
+       tests/stub_carp.cc \
        tests/stub_cbdata.cc \
        tests/stub_client_db.cc \
        tests/stub_client_side.cc \
@@ -23,6 +28,7 @@ STUB_SOURCE= tests/STUB.h \
        tests/stub_debug.cc \
        tests/stub_errorpage.cc \
        tests/stub_event.cc \
+       tests/stub_external_acl.cc \
        tests/stub_fatal.cc \
        tests/stub_fd.cc \
        tests/stub_helper.cc \
@@ -33,6 +39,8 @@ STUB_SOURCE= tests/STUB.h \
        tests/stub_ipc_Forwarder.cc \
        tests/stub_ipc_TypedMsgHdr.cc \
        tests/stub_ipcache.cc \
+       tests/stub_libauth.cc \
+       tests/stub_libauth_acls.cc \
        tests/stub_libcomm.cc \
        tests/stub_libeui.cc \
        tests/stub_libformat.cc \
@@ -44,12 +52,18 @@ STUB_SOURCE= tests/STUB.h \
        tests/stub_mem_node.cc \
        tests/stub_mime.cc \
        tests/stub_pconn.cc \
+       tests/stub_redirect.cc \
        tests/stub_stat.cc \
        tests/stub_stmem.cc \
        tests/stub_store.cc \
        tests/stub_store_client.cc \
+       tests/stub_store_digest.cc \
        tests/stub_store_rebuild.cc \
        tests/stub_store_stats.cc \
        tests/stub_store_swapout.cc \
+       tests/stub_time.cc \
        tests/stub_tools.cc \
+       tests/stub_tunnel.cc \
+       tests/stub_wccp2.cc \
+       tests/stub_whois.cc \
        tests/stub_wordlist.cc 
diff --git a/src/tests/stub_CacheDigest.cc b/src/tests/stub_CacheDigest.cc
new file mode 100644 (file)
index 0000000..0f8fba2
--- /dev/null
@@ -0,0 +1,24 @@
+#include "squid.h"
+#include "typedefs.h" /* for cache_key */
+
+#define STUB_API "CacheDigest.cc"
+#include "tests/STUB.h"
+
+class CacheDigest;
+class CacheDigestGuessStats;
+class StoreEntry;
+
+CacheDigest * cacheDigestCreate(int, int) STUB_RETVAL(NULL)
+void cacheDigestDestroy(CacheDigest *) STUB
+CacheDigest * cacheDigestClone(const CacheDigest *) STUB_RETVAL(NULL)
+void cacheDigestClear(CacheDigest * ) STUB
+void cacheDigestChangeCap(CacheDigest *,int) STUB
+int cacheDigestTest(const CacheDigest *, const cache_key *) STUB_RETVAL(1)
+void cacheDigestAdd(CacheDigest *, const cache_key *) STUB
+void cacheDigestDel(CacheDigest *, const cache_key *) STUB
+int cacheDigestBitUtil(const CacheDigest *) STUB_RETVAL(0)
+void cacheDigestGuessStatsUpdate(CacheDigestGuessStats *, int, int) STUB
+void cacheDigestGuessStatsReport(const CacheDigestGuessStats *, StoreEntry *, const char *) STUB
+void cacheDigestReport(CacheDigest *, const char *, StoreEntry *) STUB
+size_t cacheDigestCalcMaskSize(int, int) STUB_RETVAL(1)
+
diff --git a/src/tests/stub_ETag.cc b/src/tests/stub_ETag.cc
new file mode 100644 (file)
index 0000000..3f99360
--- /dev/null
@@ -0,0 +1,10 @@
+#include "squid.h"
+#include "ETag.h"
+
+#define STUB_API "ETag.cc"
+#include "tests/STUB.h"
+
+int etagParseInit(ETag * , const char *) STUB_RETVAL(0)
+bool etagIsStrongEqual(const ETag &, const ETag &) STUB_RETVAL(false)
+bool etagIsWeakEqual(const ETag &, const ETag &) STUB_RETVAL(false)
+
diff --git a/src/tests/stub_EventLoop.cc b/src/tests/stub_EventLoop.cc
new file mode 100644 (file)
index 0000000..228f4db
--- /dev/null
@@ -0,0 +1,13 @@
+#include "squid.h"
+#include "EventLoop.h"
+
+#define STUB_API "EventLoop.cc"
+#include "tests/STUB.h"
+
+EventLoop *EventLoop::Running = NULL;
+
+EventLoop::EventLoop(): errcount(0), last_loop(false), timeService(NULL),
+        primaryEngine(NULL), loop_delay(0), error(false), runOnceResult(false)
+        STUB_NOP
+
+void EventLoop::registerEngine(AsyncEngine *engine) STUB
index 55e4be97bde9780dc2152ed77ab80a568f232a4d..b141f5b43a53b4fec8c6ec4b722aac62380c287c 100644 (file)
@@ -1,6 +1,6 @@
 #include "squid.h"
-#include "HelperChildConfig.h"
 #include "globals.h"
+#include "HelperChildConfig.h"
 
 #define STUB_API "stub_HelperChildconfig.cc"
 #include "tests/STUB.h"
index a361b8d64e8a93fb2041acc3f8eb9cedf54684b3..60f022950b11fc376d186cf0651cb564b47c5f04 100644 (file)
@@ -6,7 +6,7 @@
 
 HttpReply::HttpReply() : HttpMsg(hoReply), date (0), last_modified (0),
         expires (0), surrogate_control (NULL), content_range (NULL), keep_alive (0),
-        protoPrefix("HTTP/"), bodySizeMax(-2)
+        protoPrefix("HTTP/"), do_clean(false), bodySizeMax(-2)
         STUB_NOP
         HttpReply::~HttpReply() STUB
         void HttpReply::setHeaders(Http::StatusCode status, const char *reason, const char *ctype, int64_t clen, time_t lmt, time_t expires_) STUB
index 309e8cd7ffb8fc29701b49985224d3d2d5d8ee26..53b54209df307e4ce992aa7f15fa236fd5af389c 100644 (file)
@@ -1,7 +1,7 @@
 #include "squid.h"
 #include "comm/Connection.h"
-#include "MemObject.h"
 #include "HttpReply.h"
+#include "MemObject.h"
 #if USE_DELAY_POOLS
 #include "DelayPools.h"
 #endif
diff --git a/src/tests/stub_SBufDetailedStats.cc b/src/tests/stub_SBufDetailedStats.cc
new file mode 100644 (file)
index 0000000..8233ac2
--- /dev/null
@@ -0,0 +1,12 @@
+#include "squid.h"
+#include "SBuf.h"
+
+#define STUB_API "SBufDetailedStats.cc"
+#include "tests/STUB.h"
+
+class StatHist;
+
+void recordSBufSizeAtDestruct(SBuf::size_type) STUB_NOP
+const StatHist * collectSBufDestructTimeStats() STUB_RETVAL(NULL)
+void recordMemBlobSizeAtDestruct(SBuf::size_type) STUB_NOP
+const StatHist * collectMemBlobDestructTimeStats() STUB_RETVAL(NULL)
diff --git a/src/tests/stub_StoreMeta.cc b/src/tests/stub_StoreMeta.cc
new file mode 100644 (file)
index 0000000..36304f8
--- /dev/null
@@ -0,0 +1,14 @@
+#include "squid.h"
+
+#define STUB_API "StoreMeta.cc"
+#include "tests/STUB.h"
+
+#include "StoreMeta.h"
+
+bool StoreMeta::validType(char) STUB_RETVAL(false)
+bool StoreMeta::validLength(int) const STUB_RETVAL(false)
+StoreMeta * StoreMeta::Factory (char, size_t, void const *) STUB_RETVAL(NULL)
+void StoreMeta::FreeList(StoreMeta **) STUB
+StoreMeta ** StoreMeta::Add(StoreMeta **, StoreMeta *) STUB_RETVAL(NULL)
+bool StoreMeta::checkConsistency(StoreEntry *) const STUB_RETVAL(false)
+
diff --git a/src/tests/stub_SwapDir.cc b/src/tests/stub_SwapDir.cc
new file mode 100644 (file)
index 0000000..ee27969
--- /dev/null
@@ -0,0 +1,43 @@
+#include "squid.h"
+#include "SwapDir.h"
+
+#define STUB_API "SwapDir.cc"
+#include "tests/STUB.h"
+
+// SwapDir::SwapDir(char const *) STUB
+// SwapDir::~SwapDir() STUB
+void SwapDir::create() STUB
+void SwapDir::dump(StoreEntry &) const STUB
+bool SwapDir::doubleCheck(StoreEntry &) STUB_RETVAL(false)
+void SwapDir::unlink(StoreEntry &) STUB
+void SwapDir::getStats(StoreInfoStats &) const STUB
+void SwapDir::stat(StoreEntry &) const STUB
+void SwapDir::statfs(StoreEntry &)const STUB
+void SwapDir::maintain() STUB
+uint64_t SwapDir::minSize() const STUB_RETVAL(0)
+int64_t SwapDir::maxObjectSize() const STUB_RETVAL(0)
+void SwapDir::maxObjectSize(int64_t) STUB
+void SwapDir::reference(StoreEntry &) STUB
+bool SwapDir::dereference(StoreEntry &, bool) STUB_RETVAL(false)
+int SwapDir::callback() STUB_RETVAL(0)
+bool SwapDir::canStore(const StoreEntry &, int64_t, int &) const STUB_RETVAL(false)
+bool SwapDir::canLog(StoreEntry const &)const STUB_RETVAL(false)
+void SwapDir::sync() STUB
+void SwapDir::openLog() STUB
+void SwapDir::closeLog() STUB
+int SwapDir::writeCleanStart() STUB_RETVAL(0)
+void SwapDir::writeCleanDone() STUB
+void SwapDir::logEntry(const StoreEntry &, int) const STUB
+char const * SwapDir::type() const STUB_RETVAL("stub")
+bool SwapDir::active() const STUB_RETVAL(false)
+bool SwapDir::needsDiskStrand() const STUB_RETVAL(false)
+ConfigOption * SwapDir::getOptionTree() const STUB_RETVAL(NULL)
+void SwapDir::parseOptions(int) STUB
+void SwapDir::dumpOptions(StoreEntry *) const STUB
+bool SwapDir::optionReadOnlyParse(char const *, const char *, int) STUB_RETVAL(false)
+void SwapDir::optionReadOnlyDump(StoreEntry *) const STUB
+bool SwapDir::optionObjectSizeParse(char const *, const char *, int) STUB_RETVAL(false)
+void SwapDir::optionObjectSizeDump(StoreEntry *) const STUB
+StoreEntry * SwapDir::get(const cache_key *) STUB_RETVAL(NULL)
+void SwapDir::get(String const, STOREGETCLIENT , void *) STUB
+
index b364a080b9772605c1d5019fc6b947e14b6e2628..95b369d44a8f86f831bf791726c14d62be5f7f6e 100644 (file)
@@ -16,3 +16,5 @@ CacheManager* CacheManager::instance=0;
 CacheManager* CacheManager::GetInstance() STUB_RETVAL(instance)
 void Mgr::RegisterAction(char const*, char const*, OBJH, int, int) {}
 void Mgr::RegisterAction(char const *, char const *, Mgr::ClassActionCreationHandler *, int, int) {}
+
+Mgr::Action::Pointer CacheManager::createRequestedAction(const Mgr::ActionParams &) STUB_RETVAL(NULL)
diff --git a/src/tests/stub_carp.cc b/src/tests/stub_carp.cc
new file mode 100644 (file)
index 0000000..949f0de
--- /dev/null
@@ -0,0 +1,11 @@
+#include "squid.h"
+
+#define STUB_API "carp.cc"
+#include "tests/STUB.h"
+
+class CachePeer;
+class HttpRequest;
+
+void carpInit(void) STUB
+CachePeer * carpSelectParent(HttpRequest *) STUB_RETVAL(NULL)
+
index 1bdb14a48f22da04a0de63cffdec81a63dd60abb..8c02f711bbf50734441a3da7c1d905b2db8efcea 100644 (file)
@@ -21,8 +21,8 @@ int eventFind(EVH *, void *) STUB_RETVAL(-1)
 EventScheduler::EventScheduler() STUB
 EventScheduler::~EventScheduler() STUB
 void EventScheduler::cancel(EVH * func, void * arg) STUB
+int EventScheduler::timeRemaining() const STUB_RETVAL(1)
 void EventScheduler::clean() STUB
-int EventScheduler::checkDelay() STUB_RETVAL(-1)
 void EventScheduler::dump(StoreEntry *) STUB
 bool EventScheduler::find(EVH * func, void * arg) STUB_RETVAL(false)
 void EventScheduler::schedule(const char *name, EVH * func, void *arg, double when, int weight, bool cbdata) STUB
diff --git a/src/tests/stub_external_acl.cc b/src/tests/stub_external_acl.cc
new file mode 100644 (file)
index 0000000..af33a85
--- /dev/null
@@ -0,0 +1,23 @@
+#include "squid.h"
+
+#define STUB_API "external_acl.cc"
+#include "tests/STUB.h"
+
+#include "ExternalACL.h"
+#include "ExternalACLEntry.h"
+
+void parse_externalAclHelper(external_acl ** ) STUB
+void dump_externalAclHelper(StoreEntry *, const char *, const external_acl *) STUB
+void free_externalAclHelper(external_acl **) STUB
+void ACLExternal::parse() STUB
+bool ACLExternal::valid () const STUB_RETVAL(false)
+bool ACLExternal::empty () const STUB_RETVAL(false)
+int ACLExternal::match(ACLChecklist *) STUB_RETVAL(0)
+wordlist * ACLExternal::dump() const STUB_RETVAL(NULL)
+void ACLExternal::ExternalAclLookup(ACLChecklist *, ACLExternal *) STUB
+void ExternalACLLookup::Start(ACLChecklist *, external_acl_data *, bool) STUB
+void externalAclInit(void) STUB_NOP
+void externalAclShutdown(void) STUB_NOP
+ExternalACLLookup * ExternalACLLookup::Instance() STUB_RETVAL(NULL)
+void ExternalACLLookup::checkForAsync(ACLChecklist *) const STUB
+void ExternalACLLookup::LookupDone(void *, void *) STUB
index 95497c218874b0847836e6fbc8cc00f0b7d516c6..b85d7f196d7f9caa31deddcc50b243e9e9119101 100644 (file)
@@ -1,7 +1,7 @@
 #include "squid.h"
 
-#include "HttpRequest.h"
 #include "HttpReply.h"
+#include "HttpRequest.h"
 
 #define STUB_API "http.cc"
 #include "tests/STUB.h"
diff --git a/src/tests/stub_libauth.cc b/src/tests/stub_libauth.cc
new file mode 100644 (file)
index 0000000..a14c315
--- /dev/null
@@ -0,0 +1,75 @@
+#include "squid.h"
+
+#define STUB_API "auth/libauth.la"
+#include "STUB.h"
+
+#if USE_AUTH
+#include "auth/Config.h"
+Auth::UserRequest::Pointer Auth::Config::CreateAuthUser(const char *, AccessLogEntry::Pointer &al) STUB_RETVAL(NULL)
+Auth::Config * Auth::Config::Find(const char *) STUB_RETVAL(NULL)
+void Auth::Config::registerWithCacheManager(void) STUB_NOP
+Auth::ConfigVector Auth::TheConfig;
+
+#include "auth/Gadgets.h"
+int authenticateActiveSchemeCount(void) STUB_RETVAL(0)
+int authenticateSchemeCount(void) STUB_RETVAL(0)
+void authenticateInit(Auth::ConfigVector *) STUB
+void authenticateRotate(void) STUB
+void authenticateReset(void) STUB
+
+AuthUserHashPointer::AuthUserHashPointer(Auth::User::Pointer anAuth_user) STUB
+Auth::User::Pointer AuthUserHashPointer::user() const STUB_RETVAL(NULL)
+
+#include "auth/Scheme.h"
+Vector<Auth::Scheme::Pointer> *Auth::Scheme::_Schemes = NULL;
+void Auth::Scheme::AddScheme(Auth::Scheme::Pointer) STUB
+Auth::Scheme::Pointer Auth::Scheme::Find(const char *) STUB_RETVAL(NULL)
+Vector<Auth::Scheme::Pointer> & Auth::Scheme::GetSchemes() STUB_RETVAL(*_Schemes);
+void Auth::Scheme::FreeAll() STUB
+
+#include "auth/User.h"
+Auth::User::User(Auth::Config *, const char *) STUB
+Auth::CredentialState Auth::User::credentials() const STUB_RETVAL(credentials_state)
+void Auth::User::credentials(CredentialState) STUB
+void Auth::User::absorb(Auth::User::Pointer) STUB
+Auth::User::~User() STUB_NOP
+void Auth::User::cacheInit(void) STUB
+void Auth::User::CachedACLsReset() STUB
+void Auth::User::cacheCleanup(void *) STUB
+void Auth::User::clearIp() STUB
+void Auth::User::removeIp(Ip::Address) STUB
+void Auth::User::addIp(Ip::Address) STUB
+void Auth::User::addToNameCache() STUB
+void Auth::User::UsernameCacheStats(StoreEntry *) STUB
+
+#include "auth/UserRequest.h"
+char const * Auth::UserRequest::username() const STUB_RETVAL("stub_username")
+void Auth::UserRequest::start(HttpRequest *, AccessLogEntry::Pointer &, AUTHCB *, void *) STUB
+bool Auth::UserRequest::valid() const STUB_RETVAL(false)
+void * Auth::UserRequest::operator new (size_t) STUB_RETVAL((void *)1)
+void Auth::UserRequest::operator delete (void *) STUB
+Auth::UserRequest::UserRequest() STUB
+Auth::UserRequest::~UserRequest() STUB
+void Auth::UserRequest::setDenyMessage(char const *) STUB
+char const * Auth::UserRequest::getDenyMessage() STUB_RETVAL("stub")
+char const * Auth::UserRequest::denyMessage(char const * const) STUB_RETVAL("stub")
+void authenticateAuthUserRequestRemoveIp(Auth::UserRequest::Pointer, Ip::Address const &) STUB
+void authenticateAuthUserRequestClearIp(Auth::UserRequest::Pointer) STUB
+int authenticateAuthUserRequestIPCount(Auth::UserRequest::Pointer) STUB_RETVAL(0)
+int authenticateUserAuthenticated(Auth::UserRequest::Pointer) STUB_RETVAL(0)
+Auth::Direction Auth::UserRequest::direction() STUB_RETVAL(Auth::CRED_ERROR)
+void Auth::UserRequest::addAuthenticationInfoHeader(HttpReply *, int) STUB
+void Auth::UserRequest::addAuthenticationInfoTrailer(HttpReply *, int) STUB
+void Auth::UserRequest::releaseAuthServer() STUB
+const char * Auth::UserRequest::connLastHeader() STUB_RETVAL("stub")
+AuthAclState Auth::UserRequest::authenticate(Auth::UserRequest::Pointer *, http_hdr_type, HttpRequest *, ConnStateData *, Ip::Address &, AccessLogEntry::Pointer &) STUB_RETVAL(AUTH_AUTHENTICATED)
+AuthAclState Auth::UserRequest::tryToAuthenticateAndSetAuthUser(Auth::UserRequest::Pointer *, http_hdr_type, HttpRequest *, ConnStateData *, Ip::Address &, AccessLogEntry::Pointer &) STUB_RETVAL(AUTH_AUTHENTICATED)
+void Auth::UserRequest::addReplyAuthHeader(HttpReply *, Auth::UserRequest::Pointer, HttpRequest *, int, int) STUB
+void authenticateFixHeader(HttpReply *, Auth::UserRequest::Pointer, HttpRequest *, int, int) STUB
+void authenticateAddTrailer(HttpReply *, Auth::UserRequest::Pointer, HttpRequest *, int) STUB
+Auth::Scheme::Pointer Auth::UserRequest::scheme() const STUB_RETVAL(NULL)
+
+#include "AuthReg.h"
+void Auth::Init() STUB_NOP
+
+#endif /* USE_AUTH */
diff --git a/src/tests/stub_libauth_acls.cc b/src/tests/stub_libauth_acls.cc
new file mode 100644 (file)
index 0000000..cf58fa6
--- /dev/null
@@ -0,0 +1,43 @@
+#include "squid.h"
+
+#define STUB_API "auth/libacls.la"
+#include "STUB.h"
+
+#if USE_AUTH
+#include "acl/Acl.h" /* for allow_t */
+
+#include "auth/Acl.h"
+allow_t AuthenticateAcl(ACLChecklist *) STUB_RETVAL(ACCESS_DENIED)
+
+#include "auth/AclMaxUserIp.h"
+ACL * ACLMaxUserIP::clone() const STUB_RETVAL(NULL)
+ACLMaxUserIP::ACLMaxUserIP (char const *) STUB
+ACLMaxUserIP::ACLMaxUserIP (ACLMaxUserIP const &) STUB
+ACLMaxUserIP::~ACLMaxUserIP() STUB
+char const * ACLMaxUserIP::typeString() const STUB_RETVAL(NULL)
+bool ACLMaxUserIP::empty () const STUB_RETVAL(false)
+bool ACLMaxUserIP::valid () const STUB_RETVAL(false)
+void ACLMaxUserIP::parse() STUB
+int ACLMaxUserIP::match(Auth::UserRequest::Pointer, Ip::Address const &) STUB_RETVAL(0)
+int ACLMaxUserIP::match(ACLChecklist *) STUB_RETVAL(0)
+wordlist * ACLMaxUserIP::dump() const STUB_RETVAL(NULL)
+
+#include "auth/AclProxyAuth.h"
+ACLProxyAuth::~ACLProxyAuth() STUB
+ACLProxyAuth::ACLProxyAuth(ACLData<char const *> *, char const *) STUB
+ACLProxyAuth::ACLProxyAuth (ACLProxyAuth const &) STUB
+ACLProxyAuth & ACLProxyAuth::operator= (ACLProxyAuth const & a) STUB_RETVAL(const_cast<ACLProxyAuth &>(a))
+char const * ACLProxyAuth::typeString() const STUB_RETVAL(NULL)
+void ACLProxyAuth::parse() STUB
+int ACLProxyAuth::match(ACLChecklist *) STUB_RETVAL(0)
+wordlist * ACLProxyAuth::dump() const STUB_RETVAL(NULL)
+bool ACLProxyAuth::empty () const STUB_RETVAL(false)
+bool ACLProxyAuth::valid () const STUB_RETVAL(false)
+ProxyAuthLookup * ProxyAuthLookup::Instance() STUB_RETVAL(NULL)
+void ProxyAuthLookup::checkForAsync(ACLChecklist *) const STUB
+void ProxyAuthLookup::LookupDone(void *) STUB
+ACL * ACLProxyAuth::clone() const STUB_RETVAL(NULL)
+int ACLProxyAuth::matchForCache(ACLChecklist *) STUB_RETVAL(0)
+int ACLProxyAuth::matchProxyAuth(ACLChecklist *) STUB_RETVAL(0)
+
+#endif /* USE_AUTH */
index 9278c69930aa67acd0cdfa87dccea98a15f95a0f..ed2df05d4ef27545001f02db197a0e6acd384be7 100644 (file)
@@ -5,3 +5,6 @@
 #include "tests/STUB.h"
 
 void Format::Format::assemble(MemBuf &mb, const AccessLogEntryPointer &al, int logSequenceNumber) const STUB
+bool Format::Format::parse(char const*) STUB_RETVAL(false)
+Format::Format::Format(char const*) STUB
+Format::Format::~Format() STUB
index ab9727de18e06c80c4f9e6a38053da9db43df23f..5849fb2a3792ecf6b68a2e592db5ba893fb01ac2 100644 (file)
@@ -27,8 +27,8 @@ StoreEntry * Mgr::Action::createStoreEntry() const STUB_RETVAL(NULL)
 static Mgr::Action::Pointer dummyAction;
 
 #include "mgr/ActionParams.h"
-Mgr::ActionParams::ActionParams() STUB
-Mgr::ActionParams::ActionParams(const Ipc::TypedMsgHdr &msg) STUB
+Mgr::ActionParams::ActionParams() STUB_NOP
+Mgr::ActionParams::ActionParams(const Ipc::TypedMsgHdr &msg) STUB_NOP
 void Mgr::ActionParams::pack(Ipc::TypedMsgHdr &msg) const STUB
 std::ostream &operator <<(std::ostream &os, const Mgr::ActionParams &params) STUB_RETVAL(os)
 
@@ -174,8 +174,8 @@ Mgr::QueryParam::Pointer Mgr::QueryParams::CreateParam(QueryParam::Type aType) S
 bool Mgr::QueryParams::ParseParam(const String& paramStr, Param& param) STUB_RETVAL(false)
 
 #include "mgr/Registration.h"
-void Mgr::RegisterAction(char const * action, char const * desc, OBJH * handler, int pw_req_flag, int atomic);
-void Mgr::RegisterAction(char const * action, char const * desc, ClassActionCreationHandler *handler, int pw_req_flag, int atomic);
+//void Mgr::RegisterAction(char const * action, char const * desc, OBJH * handler, int pw_req_flag, int atomic);
+//void Mgr::RegisterAction(char const * action, char const * desc, ClassActionCreationHandler *handler, int pw_req_flag, int atomic);
 
 #include "mgr/Request.h"
 //Mgr::Request::Request(int aRequestorId, unsigned int aRequestId, int aFd, const Mgr::ActionParams &aParams) STUB
index 645b14a310fa5bd4a9fce2ca19d87acfdd1d4eb6..901a6e0a80114f0ce652972d340b317e1e2768f8 100644 (file)
@@ -5,8 +5,8 @@
 #include "squid.h"
 
 #define STUB_API "stub_mem.cc"
-#include "STUB.h"
 #include "Mem.h"
+#include "STUB.h"
 
 void
 memFreeString(size_t size, void *buf)
@@ -59,5 +59,16 @@ memFreeBufFunc(size_t size)
     return cxx_xfree;
 }
 
-void * memAllocate(mem_type type) STUB_RETVAL(NULL)
-void memFree(void *p, int type) STUB
+void * memAllocate(mem_type type)
+{
+    // let's waste plenty of memory. This should cover any possible need
+    return xmalloc(64*1024);
+}
+void memFree(void *p, int type)
+{
+    xfree(p);
+}
+void Mem::Init(void) STUB_NOP
+void memDataInit(mem_type, const char *, size_t, int, bool) STUB_NOP
+int memInUse(mem_type) STUB_RETVAL(0)
+void memConfigure(void) STUB_NOP
index 3a7fcd3d7287044f8fb3757f39753957377ee9c6..80e3db46fc4854a5323aa6f3b0c125f317edf705 100644 (file)
@@ -2,8 +2,8 @@
  * STUB file for the pconn.cc API
  */
 #include "squid.h"
-#include "pconn.h"
 #include "comm/Connection.h"
+#include "pconn.h"
 
 #define STUB_API "pconn.cc"
 #include "tests/STUB.h"
diff --git a/src/tests/stub_redirect.cc b/src/tests/stub_redirect.cc
new file mode 100644 (file)
index 0000000..847e55a
--- /dev/null
@@ -0,0 +1,10 @@
+#include "squid.h"
+#include "redirect.h"
+
+#define STUB_API "redirect.cc"
+#include "tests/STUB.h"
+
+void redirectInit(void) STUB
+void redirectShutdown(void) STUB
+void redirectStart(ClientHttpRequest *, HLPCB *, void *) STUB
+void storeIdStart(ClientHttpRequest *, HLPCB *, void *) STUB
index a93cc8d3bd5fef95fa4eeea2bb8b11701a997872..11790efb0ff12bf365b68321efb84d5e6b6289a1 100644 (file)
@@ -4,6 +4,11 @@
 #define STUB_API "store.cc"
 #include "tests/STUB.h"
 
+const char *storeStatusStr[] = { };
+const char *pingStatusStr[] = { };
+const char *memStatusStr[] = { };
+const char *swapStatusStr[] = { };
+
 /* and code defined in the wrong .cc file */
 #include "SwapDir.h"
 void StoreController::maintain() STUB
index c90f04277ca261969f0d9b509c32b5bca6affa7c..f8c06c21efba32ba9bec03981c11ebf485fa4815 100644 (file)
@@ -1,6 +1,6 @@
 #include "squid.h"
-#include "StoreClient.h"
 #include "Store.h"
+#include "StoreClient.h"
 
 #define STUB_API "store_client.cc"
 #include "tests/STUB.h"
diff --git a/src/tests/stub_store_digest.cc b/src/tests/stub_store_digest.cc
new file mode 100644 (file)
index 0000000..f054d83
--- /dev/null
@@ -0,0 +1,10 @@
+#include "squid.h"
+
+#define STUB_API "store_digets.cc"
+#include "tests/STUB.h"
+
+class StoreEntry;
+void storeDigestInit(void) STUB
+void storeDigestNoteStoreReady(void) STUB
+void storeDigestDel(const StoreEntry *) STUB
+void storeDigestReport(StoreEntry *) STUB
diff --git a/src/tests/stub_time.cc b/src/tests/stub_time.cc
new file mode 100644 (file)
index 0000000..648f42c
--- /dev/null
@@ -0,0 +1,18 @@
+#include "squid.h"
+#include "SquidTime.h"
+
+#define STUB_API "time.cc"
+#include "STUB.h"
+
+struct timeval current_time;
+double current_dtime;
+time_t squid_curtime = 0;
+
+time_t getCurrentTime(void) STUB_RETVAL(0)
+int tvSubMsec(struct timeval, struct timeval) STUB_RETVAL(0)
+const char * Time::FormatStrf(time_t ) STUB_RETVAL("")
+const char * Time::FormatHttpd(time_t ) STUB_RETVAL("")
+
+void TimeEngine::tick() STUB
+TimeEngine::~TimeEngine() STUB
+
diff --git a/src/tests/stub_tunnel.cc b/src/tests/stub_tunnel.cc
new file mode 100644 (file)
index 0000000..8a0a56e
--- /dev/null
@@ -0,0 +1,10 @@
+#include "squid.h"
+
+#define STUB_API "tunnel.cc"
+#include "tests/STUB.h"
+
+#include "FwdState.h"
+class ClientHttpRequest;
+
+void tunnelStart(ClientHttpRequest *, int64_t *, int *, const AccessLogEntryPointer &al) STUB
+
diff --git a/src/tests/stub_wccp2.cc b/src/tests/stub_wccp2.cc
new file mode 100644 (file)
index 0000000..9c087ec
--- /dev/null
@@ -0,0 +1,28 @@
+#include "squid.h"
+
+#if USE_WCCPv2
+
+#define STUB_API "wccp2.cc"
+#include "tests/STUB.h"
+
+class StoreEntry;
+
+void wccp2_add_service_list(int, int, int, int, int, int[], int, char *) STUB
+void wccp2Init(void) STUB
+void wccp2ConnectionOpen(void) STUB
+void wccp2ConnectionClose(void) STUB
+void dump_wccp2_method(StoreEntry *, const char *, int) STUB
+void free_wccp2_method(int *) STUB
+void parse_wccp2_amethod(int *) STUB
+void dump_wccp2_amethod(StoreEntry *, const char *, int) STUB
+void parse_wccp2_service(void *) STUB
+void dump_wccp2_service(StoreEntry *, const char *, void *) STUB
+void free_wccp2_service(void *) STUB
+int check_null_wccp2_service(void *) STUB_RETVAL(0)
+void parse_wccp2_service_info(void *) STUB
+void dump_wccp2_service_info(StoreEntry *, const char *, void *) STUB
+void free_wccp2_service_info(void *) STUB
+void free_wccp2_amethod(int *) STUB
+void parse_wccp2_method(int *) STUB
+
+#endif /* USE_WCCPv2 */
diff --git a/src/tests/stub_whois.cc b/src/tests/stub_whois.cc
new file mode 100644 (file)
index 0000000..b7414de
--- /dev/null
@@ -0,0 +1,9 @@
+#include "squid.h"
+
+#define STUB_API "whois.cc"
+#include "tests/STUB.h"
+
+class FwdState;
+
+void whoisStart(FwdState *) STUB
+
index c1e4fce924c3cfbb42737905c4f67153fffead43..d112b3f5b765d0282e5dde6b0e4901a03a9d2132 100644 (file)
@@ -4,9 +4,9 @@
 
 #if USE_AUTH
 
-#include "testACLMaxUserIP.h"
 #include "auth/AclMaxUserIp.h"
 #include "ConfigParser.h"
+#include "testACLMaxUserIP.h"
 
 #if HAVE_STDEXCEPT
 #include <stdexcept>
@@ -19,11 +19,11 @@ testACLMaxUserIP::testDefaults()
 {
     ACLMaxUserIP anACL("max_user_ip");
     /* 0 is not a valid maximum, so we start at 0 */
-    CPPUNIT_ASSERT(anACL.getMaximum() == 0);
+    CPPUNIT_ASSERT_EQUAL(0,anACL.getMaximum());
     /* and we have no option to turn strict OFF, so start ON. */
-    CPPUNIT_ASSERT(anACL.getStrict() == false);
+    CPPUNIT_ASSERT_EQUAL(0,anACL.getStrict());
     /* an unparsed acl must not be valid - there is no sane default */
-    CPPUNIT_ASSERT(!anACL.valid());
+    CPPUNIT_ASSERT_EQUAL(false,anACL.valid());
 }
 
 void
@@ -36,10 +36,10 @@ testACLMaxUserIP::testParseLine()
     ACLMaxUserIP anACL("max_user_ip");
     anACL.parse();
     /* we want a maximum of one, and strict to be true */
-    CPPUNIT_ASSERT(anACL.getMaximum() == 1);
-    CPPUNIT_ASSERT(anACL.getStrict() == true);
+    CPPUNIT_ASSERT_EQUAL(1,anACL.getMaximum());
+    CPPUNIT_ASSERT_EQUAL(1,anACL.getStrict());
     /* the acl must be vaid */
-    CPPUNIT_ASSERT(anACL.valid());
+    CPPUNIT_ASSERT_EQUAL(true,anACL.valid());
     xfree(line);
 }
 
index bb1cffc9eefa63cb5a1366aa04bf6f87f503a6f4..c7358fefaf6cb79e58181cf90aeeb4957028b130 100644 (file)
@@ -4,13 +4,13 @@
 
 #if USE_AUTH
 
-#include "testAuth.h"
+#include "auth/Config.h"
 #include "auth/Gadgets.h"
-#include "auth/UserRequest.h"
 #include "auth/Scheme.h"
-#include "auth/Config.h"
+#include "auth/UserRequest.h"
 #include "ConfigParser.h"
 #include "Mem.h"
+#include "testAuth.h"
 
 CPPUNIT_TEST_SUITE_REGISTRATION( testAuth );
 CPPUNIT_TEST_SUITE_REGISTRATION( testAuthConfig );
index 8e48ee87e11babedf380ecb09315efd4213e8074..dc9f45ef959407b4db4822cecf0c5c99840b0816 100644 (file)
@@ -12,5 +12,5 @@ CPPUNIT_TEST_SUITE_REGISTRATION( testBoilerplate );
 void
 testBoilerplate::testDemonstration()
 {
-    CPPUNIT_ASSERT(0 == 0);
+    CPPUNIT_ASSERT_EQUAL(0, 0);
 }
index 308ba3543194e07ff1975295b12ae056e3e4e618..7d6691eed34ec4b943624e7c95318d2e1912eac9 100644 (file)
@@ -1,11 +1,11 @@
 #define SQUID_UNIT_TEST 1
 
 #include "squid.h"
-#include "mgr/Action.h"
-#include "Mem.h"
-#include "testCacheManager.h"
 #include "CacheManager.h"
+#include "Mem.h"
+#include "mgr/Action.h"
 #include "Store.h"
+#include "testCacheManager.h"
 
 #include <cppunit/TestAssert.h>
 
index a7cd80dbcd8f7e63d27bf5826ed7e5474f5fc2c7..48c924b29c1a0b0deeae61ec66bf734e21366442 100644 (file)
@@ -1,10 +1,10 @@
 #define SQUID_UNIT_TEST 1
 #include "squid.h"
-#include "testConfigParser.h"
-#include "SquidString.h"
-#include "Mem.h"
-#include "event.h"
 #include "ConfigParser.h"
+#include "event.h"
+#include "Mem.h"
+#include "SquidString.h"
+#include "testConfigParser.h"
 
 CPPUNIT_TEST_SUITE_REGISTRATION( testConfigParser);
 
@@ -54,24 +54,24 @@ bool testConfigParser::doParseQuotedTest(const char *s, const char *expectInterp
 void testConfigParser::testParseQuoted()
 {
     // SingleToken
-    CPPUNIT_ASSERT(doParseQuotedTest("SingleToken", "SingleToken"));
+    CPPUNIT_ASSERT_EQUAL(true, doParseQuotedTest("SingleToken", "SingleToken"));
 
     // This is a quoted "string" by me
-    CPPUNIT_ASSERT(doParseQuotedTest("\"This is a quoted \\\"string\\\" by me\"",
-                                     "This is a quoted \"string\" by me"));
+    CPPUNIT_ASSERT_EQUAL(true, doParseQuotedTest("\"This is a quoted \\\"string\\\" by me\"",
+                         "This is a quoted \"string\" by me"));
 
     // escape sequence test: \\"\"\\"
-    CPPUNIT_ASSERT(doParseQuotedTest("\"escape sequence test: \\\\\\\\\\\"\\\\\\\"\\\\\\\\\\\"\"",
-                                     "escape sequence test: \\\\\"\\\"\\\\\""));
+    CPPUNIT_ASSERT_EQUAL(true, doParseQuotedTest("\"escape sequence test: \\\\\\\\\\\"\\\\\\\"\\\\\\\\\\\"\"",
+                         "escape sequence test: \\\\\"\\\"\\\\\""));
 
     // \beginning and end test"
-    CPPUNIT_ASSERT(doParseQuotedTest("\"\\\\beginning and end test\\\"\"",
-                                     "\\beginning and end test\""));
+    CPPUNIT_ASSERT_EQUAL(true, doParseQuotedTest("\"\\\\beginning and end test\\\"\"",
+                         "\\beginning and end test\""));
 
     // "
-    CPPUNIT_ASSERT(doParseQuotedTest("\"\\\"\"", "\""));
+    CPPUNIT_ASSERT_EQUAL(true, doParseQuotedTest("\"\\\"\"", "\""));
 
     /* \ */
-    CPPUNIT_ASSERT(doParseQuotedTest("\"\\\\\"", "\\"));
+    CPPUNIT_ASSERT_EQUAL(true, doParseQuotedTest("\"\\\\\"", "\\"));
 }
 
index 7ba797b177d155b4cb6d8fcd49786a4fa5e51429..2325937201e5e3ae7e0ab1c7b7a0888d689a62f6 100644 (file)
@@ -1,15 +1,15 @@
 #define SQUID_UNIT_TEST 1
 
 #include "squid.h"
-#include "testDiskIO.h"
-#include "Store.h"
-#include "SwapDir.h"
 #include "DiskIO/DiskIOModule.h"
-#include "Mem.h"
-#include "MemObject.h"
 #include "HttpHeader.h"
 #include "HttpReply.h"
+#include "Mem.h"
+#include "MemObject.h"
+#include "Store.h"
 #include "StoreFileSystem.h"
+#include "SwapDir.h"
+#include "testDiskIO.h"
 #include "testStoreSupport.h"
 
 #if HAVE_STDEXCEPT
index 6abcf9ace636e470719c6ca1786b1fa090fe4ded..b7b50925ee7794f71fcee8a0935ef0e08e782585 100644 (file)
@@ -3,12 +3,12 @@
 
 #include <cppunit/TestAssert.h>
 
-#include "testEventLoop.h"
 #include "AsyncEngine.h"
 #include "EventLoop.h"
 #include "Mem.h"
 #include "SquidTime.h"
 #include "stat.h"
+#include "testEventLoop.h"
 
 CPPUNIT_TEST_SUITE_REGISTRATION( testEventLoop );
 
index c2f4d940baea0d0eecf8f8e1e795bc0c27580053..da3ffde976085f87e015498b34103d7454a00dda 100644 (file)
@@ -11,6 +11,7 @@
 #include "Mem.h"
 #include "MemBuf.h"
 #include "SquidConfig.h"
+#include "testHttpParser.h"
 
 CPPUNIT_TEST_SUITE_REGISTRATION( testHttpParser );
 
@@ -39,297 +40,322 @@ testHttpParser::testParseRequestLineProtocols()
     // TEST: Do we comply with RFC 2616 section 5.1 ?
 
     // RFC 1945 : HTTP/0.9 simple-request
-    input.append("GET /\r\n", 7);
-    output.reset(input.content(), input.contentSize());
-    CPPUNIT_ASSERT_EQUAL(1, HttpParserParseReqLine(&output));
-    CPPUNIT_ASSERT_EQUAL(Http::scOkay, output.request_parse_status);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.start);
-    CPPUNIT_ASSERT_EQUAL((int)input.contentSize()-1, output.req.end);
-    CPPUNIT_ASSERT(memcmp("GET /\r\n", &output.buf[output.req.start],(output.req.end-output.req.start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.m_start);
-    CPPUNIT_ASSERT_EQUAL(2, output.req.m_end);
-    CPPUNIT_ASSERT(memcmp("GET", &output.buf[output.req.m_start], (output.req.m_end-output.req.m_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(4, output.req.u_start);
-    CPPUNIT_ASSERT_EQUAL(4, output.req.u_end);
-    CPPUNIT_ASSERT(memcmp("/", &output.buf[output.req.u_start], (output.req.u_end-output.req.u_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.v_start);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.v_end);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.v_maj);
-    CPPUNIT_ASSERT_EQUAL(9, output.req.v_min);
-    input.reset();
+    {
+        input.append("GET /\r\n", 7);
+        output.reset(input.content(), input.contentSize());
+        CPPUNIT_ASSERT_EQUAL(1, HttpParserParseReqLine(&output));
+        CPPUNIT_ASSERT_EQUAL(Http::scOkay, output.request_parse_status);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.start);
+        CPPUNIT_ASSERT_EQUAL((int)input.contentSize()-1, output.req.end);
+        CPPUNIT_ASSERT_EQUAL(0,memcmp("GET /\r\n", &output.buf[output.req.start],(output.req.end-output.req.start+1)));
+        CPPUNIT_ASSERT_EQUAL(0, output.req.m_start);
+        CPPUNIT_ASSERT_EQUAL(2, output.req.m_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("GET", &output.buf[output.req.m_start], (output.req.m_end-output.req.m_start+1)));
+        CPPUNIT_ASSERT_EQUAL(4, output.req.u_start);
+        CPPUNIT_ASSERT_EQUAL(4, output.req.u_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("/", &output.buf[output.req.u_start], (output.req.u_end-output.req.u_start+1)));
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.v_start);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.v_end);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.v_maj);
+        CPPUNIT_ASSERT_EQUAL(9, output.req.v_min);
+        input.reset();
+    }
 
     // RFC 1945 : invalid HTTP/0.9 simple-request (only GET is valid)
 #if 0
-    input.append("POST /\r\n", 7);
-    output.reset(input.content(), input.contentSize());
-    CPPUNIT_ASSERT_EQUAL(1, HttpParserParseReqLine(&output));
-    CPPUNIT_ASSERT_EQUAL(Http::scOkay, output.request_parse_status);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.start);
-    CPPUNIT_ASSERT_EQUAL((int)input.contentSize()-1, output.req.end);
-    CPPUNIT_ASSERT(memcmp("GET /\r\n", &output.buf[output.req.start],(output.req.end-output.req.start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.m_start);
-    CPPUNIT_ASSERT_EQUAL(2, output.req.m_end);
-    CPPUNIT_ASSERT(memcmp("GET", &output.buf[output.req.m_start], (output.req.m_end-output.req.m_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(4, output.req.u_start);
-    CPPUNIT_ASSERT_EQUAL(4, output.req.u_end);
-    CPPUNIT_ASSERT(memcmp("/", &output.buf[output.req.u_start], (output.req.u_end-output.req.u_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.v_start);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.v_end);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.v_maj);
-    CPPUNIT_ASSERT_EQUAL(9, output.req.v_min);
-    input.reset();
+    {
+        input.append("POST /\r\n", 7);
+        output.reset(input.content(), input.contentSize());
+        CPPUNIT_ASSERT_EQUAL(1, HttpParserParseReqLine(&output));
+        CPPUNIT_ASSERT_EQUAL(Http::scOkay, output.request_parse_status);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.start);
+        CPPUNIT_ASSERT_EQUAL((int)input.contentSize()-1, output.req.end);
+        CPPUNIT_ASSERT_EQUAL(0,memcmp("GET /\r\n", &output.buf[output.req.start],(output.req.end-output.req.start+1)));
+        CPPUNIT_ASSERT_EQUAL(0, output.req.m_start);
+        CPPUNIT_ASSERT_EQUAL(2, output.req.m_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("GET", &output.buf[output.req.m_start], (output.req.m_end-output.req.m_start+1)));
+        CPPUNIT_ASSERT_EQUAL(4, output.req.u_start);
+        CPPUNIT_ASSERT_EQUAL(4, output.req.u_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("/", &output.buf[output.req.u_start], (output.req.u_end-output.req.u_start+1)));
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.v_start);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.v_end);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.v_maj);
+        CPPUNIT_ASSERT_EQUAL(9, output.req.v_min);
+        input.reset();
+    }
 #endif
 
     // RFC 1945 and 2616 : HTTP/1.0 request
-    input.append("GET / HTTP/1.0\r\n", 16);
-    output.reset(input.content(), input.contentSize());
-    CPPUNIT_ASSERT_EQUAL(1, HttpParserParseReqLine(&output));
-    CPPUNIT_ASSERT_EQUAL(Http::scOkay, output.request_parse_status);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.start);
-    CPPUNIT_ASSERT_EQUAL((int)input.contentSize()-1, output.req.end);
-    CPPUNIT_ASSERT(memcmp("GET / HTTP/1.0\r\n", &output.buf[output.req.start],(output.req.end-output.req.start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.m_start);
-    CPPUNIT_ASSERT_EQUAL(2, output.req.m_end);
-    CPPUNIT_ASSERT(memcmp("GET", &output.buf[output.req.m_start],(output.req.m_end-output.req.m_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(4, output.req.u_start);
-    CPPUNIT_ASSERT_EQUAL(4, output.req.u_end);
-    CPPUNIT_ASSERT(memcmp("/", &output.buf[output.req.u_start],(output.req.u_end-output.req.u_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(6, output.req.v_start);
-    CPPUNIT_ASSERT_EQUAL(13, output.req.v_end);
-    CPPUNIT_ASSERT(memcmp("HTTP/1.0", &output.buf[output.req.v_start],(output.req.v_end-output.req.v_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(1, output.req.v_maj);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.v_min);
-    input.reset();
+    {
+        input.append("GET / HTTP/1.0\r\n", 16);
+        output.reset(input.content(), input.contentSize());
+        CPPUNIT_ASSERT_EQUAL(1, HttpParserParseReqLine(&output));
+        CPPUNIT_ASSERT_EQUAL(Http::scOkay, output.request_parse_status);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.start);
+        CPPUNIT_ASSERT_EQUAL((int)input.contentSize()-1, output.req.end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("GET / HTTP/1.0\r\n", &output.buf[output.req.start],(output.req.end-output.req.start+1)));
+        CPPUNIT_ASSERT_EQUAL(0, output.req.m_start);
+        CPPUNIT_ASSERT_EQUAL(2, output.req.m_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("GET", &output.buf[output.req.m_start],(output.req.m_end-output.req.m_start+1)));
+        CPPUNIT_ASSERT_EQUAL(4, output.req.u_start);
+        CPPUNIT_ASSERT_EQUAL(4, output.req.u_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("/", &output.buf[output.req.u_start],(output.req.u_end-output.req.u_start+1)));
+        CPPUNIT_ASSERT_EQUAL(6, output.req.v_start);
+        CPPUNIT_ASSERT_EQUAL(13, output.req.v_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("HTTP/1.0", &output.buf[output.req.v_start],(output.req.v_end-output.req.v_start+1)));
+        CPPUNIT_ASSERT_EQUAL(1, output.req.v_maj);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.v_min);
+        input.reset();
+    }
 
     // RFC 2616 : HTTP/1.1 request
-    input.append("GET / HTTP/1.1\r\n", 16);
-    output.reset(input.content(), input.contentSize());
-    CPPUNIT_ASSERT_EQUAL(1, HttpParserParseReqLine(&output));
-    CPPUNIT_ASSERT_EQUAL(Http::scOkay, output.request_parse_status);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.start);
-    CPPUNIT_ASSERT_EQUAL((int)input.contentSize()-1, output.req.end);
-    CPPUNIT_ASSERT(memcmp("GET / HTTP/1.1\r\n", &output.buf[output.req.start],(output.req.end-output.req.start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.m_start);
-    CPPUNIT_ASSERT_EQUAL(2, output.req.m_end);
-    CPPUNIT_ASSERT(memcmp("GET", &output.buf[output.req.m_start],(output.req.m_end-output.req.m_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(4, output.req.u_start);
-    CPPUNIT_ASSERT_EQUAL(4, output.req.u_end);
-    CPPUNIT_ASSERT(memcmp("/", &output.buf[output.req.u_start],(output.req.u_end-output.req.u_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(6, output.req.v_start);
-    CPPUNIT_ASSERT_EQUAL(13, output.req.v_end);
-    CPPUNIT_ASSERT(memcmp("HTTP/1.1", &output.buf[output.req.v_start],(output.req.v_end-output.req.v_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(1, output.req.v_maj);
-    CPPUNIT_ASSERT_EQUAL(1, output.req.v_min);
-    input.reset();
+    {
+        input.append("GET / HTTP/1.1\r\n", 16);
+        output.reset(input.content(), input.contentSize());
+        CPPUNIT_ASSERT_EQUAL(1, HttpParserParseReqLine(&output));
+        CPPUNIT_ASSERT_EQUAL(Http::scOkay, output.request_parse_status);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.start);
+        CPPUNIT_ASSERT_EQUAL((int)input.contentSize()-1, output.req.end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("GET / HTTP/1.1\r\n", &output.buf[output.req.start],(output.req.end-output.req.start+1)));
+        CPPUNIT_ASSERT_EQUAL(0, output.req.m_start);
+        CPPUNIT_ASSERT_EQUAL(2, output.req.m_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("GET", &output.buf[output.req.m_start],(output.req.m_end-output.req.m_start+1)));
+        CPPUNIT_ASSERT_EQUAL(4, output.req.u_start);
+        CPPUNIT_ASSERT_EQUAL(4, output.req.u_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("/", &output.buf[output.req.u_start],(output.req.u_end-output.req.u_start+1)));
+        CPPUNIT_ASSERT_EQUAL(6, output.req.v_start);
+        CPPUNIT_ASSERT_EQUAL(13, output.req.v_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("HTTP/1.1", &output.buf[output.req.v_start],(output.req.v_end-output.req.v_start+1)));
+        CPPUNIT_ASSERT_EQUAL(1, output.req.v_maj);
+        CPPUNIT_ASSERT_EQUAL(1, output.req.v_min);
+        input.reset();
+    }
 
     // RFC 2616 : future version full-request
-    input.append("GET / HTTP/1.2\r\n", 16);
-    //printf("TEST: '%s'\n",input.content());
-    output.reset(input.content(), input.contentSize());
-    CPPUNIT_ASSERT_EQUAL(1, HttpParserParseReqLine(&output));
-    CPPUNIT_ASSERT_EQUAL(Http::scOkay, output.request_parse_status);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.start);
-    CPPUNIT_ASSERT_EQUAL((int)input.contentSize()-1, output.req.end);
-    CPPUNIT_ASSERT(memcmp("GET / HTTP/1.2\r\n", &output.buf[output.req.start],(output.req.end-output.req.start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.m_start);
-    CPPUNIT_ASSERT_EQUAL(2, output.req.m_end);
-    CPPUNIT_ASSERT(memcmp("GET", &output.buf[output.req.m_start],(output.req.m_end-output.req.m_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(4, output.req.u_start);
-    CPPUNIT_ASSERT_EQUAL(4, output.req.u_end);
-    CPPUNIT_ASSERT(memcmp("/", &output.buf[output.req.u_start],(output.req.u_end-output.req.u_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(6, output.req.v_start);
-    CPPUNIT_ASSERT_EQUAL(13, output.req.v_end);
-    CPPUNIT_ASSERT(memcmp("HTTP/1.2", &output.buf[output.req.v_start],(output.req.v_end-output.req.v_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(1, output.req.v_maj);
-    CPPUNIT_ASSERT_EQUAL(2, output.req.v_min);
-    input.reset();
+    {    input.append("GET / HTTP/1.2\r\n", 16);
+        //printf("TEST: '%s'\n",input.content());
+        output.reset(input.content(), input.contentSize());
+        CPPUNIT_ASSERT_EQUAL(1, HttpParserParseReqLine(&output));
+        CPPUNIT_ASSERT_EQUAL(Http::scOkay, output.request_parse_status);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.start);
+        CPPUNIT_ASSERT_EQUAL((int)input.contentSize()-1, output.req.end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("GET / HTTP/1.2\r\n", &output.buf[output.req.start],(output.req.end-output.req.start+1)));
+        CPPUNIT_ASSERT_EQUAL(0, output.req.m_start);
+        CPPUNIT_ASSERT_EQUAL(2, output.req.m_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("GET", &output.buf[output.req.m_start],(output.req.m_end-output.req.m_start+1)));
+        CPPUNIT_ASSERT_EQUAL(4, output.req.u_start);
+        CPPUNIT_ASSERT_EQUAL(4, output.req.u_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("/", &output.buf[output.req.u_start],(output.req.u_end-output.req.u_start+1)));
+        CPPUNIT_ASSERT_EQUAL(6, output.req.v_start);
+        CPPUNIT_ASSERT_EQUAL(13, output.req.v_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("HTTP/1.2", &output.buf[output.req.v_start],(output.req.v_end-output.req.v_start+1)));
+        CPPUNIT_ASSERT_EQUAL(1, output.req.v_maj);
+        CPPUNIT_ASSERT_EQUAL(2, output.req.v_min);
+        input.reset();
+    }
 
     // RFC 2616 : future version full-request
-    // XXX: IETF HTTPbis WG has made this two-digits format invalid.
-    input.append("GET / HTTP/10.12\r\n", 18);
-    //printf("TEST: '%s'\n",input.content());
-    output.reset(input.content(), input.contentSize());
-    CPPUNIT_ASSERT_EQUAL(1, HttpParserParseReqLine(&output));
-    CPPUNIT_ASSERT_EQUAL(Http::scOkay, output.request_parse_status);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.start);
-    CPPUNIT_ASSERT_EQUAL((int)input.contentSize()-1, output.req.end);
-    CPPUNIT_ASSERT(memcmp("GET / HTTP/10.12\r\n", &output.buf[output.req.start],(output.req.end-output.req.start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.m_start);
-    CPPUNIT_ASSERT_EQUAL(2, output.req.m_end);
-    CPPUNIT_ASSERT(memcmp("GET", &output.buf[output.req.m_start],(output.req.m_end-output.req.m_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(4, output.req.u_start);
-    CPPUNIT_ASSERT_EQUAL(4, output.req.u_end);
-    CPPUNIT_ASSERT(memcmp("/", &output.buf[output.req.u_start],(output.req.u_end-output.req.u_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(6, output.req.v_start);
-    CPPUNIT_ASSERT_EQUAL(15, output.req.v_end);
-    CPPUNIT_ASSERT(memcmp("HTTP/10.12", &output.buf[output.req.v_start],(output.req.v_end-output.req.v_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(10, output.req.v_maj);
-    CPPUNIT_ASSERT_EQUAL(12, output.req.v_min);
-    input.reset();
+    {
+        // XXX: IETF HTTPbis WG has made this two-digits format invalid.
+        input.append("GET / HTTP/10.12\r\n", 18);
+        //printf("TEST: '%s'\n",input.content());
+        output.reset(input.content(), input.contentSize());
+        CPPUNIT_ASSERT_EQUAL(1, HttpParserParseReqLine(&output));
+        CPPUNIT_ASSERT_EQUAL(Http::scOkay, output.request_parse_status);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.start);
+        CPPUNIT_ASSERT_EQUAL((int)input.contentSize()-1, output.req.end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("GET / HTTP/10.12\r\n", &output.buf[output.req.start],(output.req.end-output.req.start+1)));
+        CPPUNIT_ASSERT_EQUAL(0, output.req.m_start);
+        CPPUNIT_ASSERT_EQUAL(2, output.req.m_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("GET", &output.buf[output.req.m_start],(output.req.m_end-output.req.m_start+1)));
+        CPPUNIT_ASSERT_EQUAL(4, output.req.u_start);
+        CPPUNIT_ASSERT_EQUAL(4, output.req.u_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("/", &output.buf[output.req.u_start],(output.req.u_end-output.req.u_start+1)));
+        CPPUNIT_ASSERT_EQUAL(6, output.req.v_start);
+        CPPUNIT_ASSERT_EQUAL(15, output.req.v_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("HTTP/10.12", &output.buf[output.req.v_start],(output.req.v_end-output.req.v_start+1)));
+        CPPUNIT_ASSERT_EQUAL(10, output.req.v_maj);
+        CPPUNIT_ASSERT_EQUAL(12, output.req.v_min);
+        input.reset();
+    }
 
     // This stage of the parser does not yet accept non-HTTP protocol names.
-    // violations mode treats them as HTTP/0.9 requests!
-    input.append("GET / FOO/1.0\n", 14);
-    //printf("TEST: '%s'\n",input.content());
-    output.reset(input.content(), input.contentSize());
+    {
+        // violations mode treats them as HTTP/0.9 requests!
+        input.append("GET / FOO/1.0\n", 14);
+        //printf("TEST: '%s'\n",input.content());
+        output.reset(input.content(), input.contentSize());
 #if USE_HTTP_VIOLATIONS
-    CPPUNIT_ASSERT_EQUAL(1, HttpParserParseReqLine(&output));
-    CPPUNIT_ASSERT_EQUAL(Http::scOkay, output.request_parse_status);
-    CPPUNIT_ASSERT_EQUAL(12, output.req.u_end);
-    CPPUNIT_ASSERT(memcmp("/ FOO/1.0", &output.buf[output.req.u_start],(output.req.u_end-output.req.u_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.v_maj);
-    CPPUNIT_ASSERT_EQUAL(9, output.req.v_min);
+        CPPUNIT_ASSERT_EQUAL(1, HttpParserParseReqLine(&output));
+        CPPUNIT_ASSERT_EQUAL(Http::scOkay, output.request_parse_status);
+        CPPUNIT_ASSERT_EQUAL(12, output.req.u_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("/ FOO/1.0", &output.buf[output.req.u_start],(output.req.u_end-output.req.u_start+1)));
+        CPPUNIT_ASSERT_EQUAL(0, output.req.v_maj);
+        CPPUNIT_ASSERT_EQUAL(9, output.req.v_min);
 #else
-    CPPUNIT_ASSERT_EQUAL(-1, HttpParserParseReqLine(&output));
-    CPPUNIT_ASSERT_EQUAL(Http::scHttpVersionNotSupported, output.request_parse_status);
-    CPPUNIT_ASSERT_EQUAL(4, output.req.u_end);
-    CPPUNIT_ASSERT(memcmp("/", &output.buf[output.req.u_start],(output.req.u_end-output.req.u_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.v_maj);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.v_min);
+        CPPUNIT_ASSERT_EQUAL(-1, HttpParserParseReqLine(&output));
+        CPPUNIT_ASSERT_EQUAL(Http::scHttpVersionNotSupported, output.request_parse_status);
+        CPPUNIT_ASSERT_EQUAL(4, output.req.u_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("/", &output.buf[output.req.u_start],(output.req.u_end-output.req.u_start+1)));
+        CPPUNIT_ASSERT_EQUAL(0, output.req.v_maj);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.v_min);
 #endif
-    CPPUNIT_ASSERT_EQUAL(0, output.req.start);
-    CPPUNIT_ASSERT_EQUAL((int)input.contentSize()-1, output.req.end);
-    CPPUNIT_ASSERT(memcmp("GET / FOO/1.0\n", &output.buf[output.req.start],(output.req.end-output.req.start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.m_start);
-    CPPUNIT_ASSERT_EQUAL(2, output.req.m_end);
-    CPPUNIT_ASSERT(memcmp("GET", &output.buf[output.req.m_start],(output.req.m_end-output.req.m_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(4, output.req.u_start);
-    CPPUNIT_ASSERT_EQUAL(6, output.req.v_start);
-    CPPUNIT_ASSERT_EQUAL(12, output.req.v_end);
-    CPPUNIT_ASSERT(memcmp("FOO/1.0", &output.buf[output.req.v_start],(output.req.v_end-output.req.v_start+1)) == 0);
-    input.reset();
+        CPPUNIT_ASSERT_EQUAL(0, output.req.start);
+        CPPUNIT_ASSERT_EQUAL((int)input.contentSize()-1, output.req.end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("GET / FOO/1.0\n", &output.buf[output.req.start],(output.req.end-output.req.start+1)));
+        CPPUNIT_ASSERT_EQUAL(0, output.req.m_start);
+        CPPUNIT_ASSERT_EQUAL(2, output.req.m_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("GET", &output.buf[output.req.m_start],(output.req.m_end-output.req.m_start+1)));
+        CPPUNIT_ASSERT_EQUAL(4, output.req.u_start);
+        CPPUNIT_ASSERT_EQUAL(6, output.req.v_start);
+        CPPUNIT_ASSERT_EQUAL(12, output.req.v_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("FOO/1.0", &output.buf[output.req.v_start],(output.req.v_end-output.req.v_start+1)));
+        input.reset();
+    }
 
     // no version
-    input.append("GET / HTTP/\n", 12);
-    //printf("TEST: '%s'\n",input.content());
-    output.reset(input.content(), input.contentSize());
-    CPPUNIT_ASSERT_EQUAL(-1, HttpParserParseReqLine(&output));
-    CPPUNIT_ASSERT_EQUAL(Http::scHttpVersionNotSupported, output.request_parse_status);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.start);
-    CPPUNIT_ASSERT_EQUAL((int)input.contentSize()-1, output.req.end);
-    CPPUNIT_ASSERT(memcmp("GET / HTTP/\n", &output.buf[output.req.start],(output.req.end-output.req.start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.m_start);
-    CPPUNIT_ASSERT_EQUAL(2, output.req.m_end);
-    CPPUNIT_ASSERT(memcmp("GET", &output.buf[output.req.m_start],(output.req.m_end-output.req.m_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(4, output.req.u_start);
-    CPPUNIT_ASSERT_EQUAL(4, output.req.u_end);
-    CPPUNIT_ASSERT(memcmp("/", &output.buf[output.req.u_start],(output.req.u_end-output.req.u_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(6, output.req.v_start);
-    CPPUNIT_ASSERT_EQUAL(10, output.req.v_end);
-    CPPUNIT_ASSERT(memcmp("HTTP/", &output.buf[output.req.v_start],(output.req.v_end-output.req.v_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.v_maj);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.v_min);
-    input.reset();
+    {
+        input.append("GET / HTTP/\n", 12);
+        //printf("TEST: '%s'\n",input.content());
+        output.reset(input.content(), input.contentSize());
+        CPPUNIT_ASSERT_EQUAL(-1, HttpParserParseReqLine(&output));
+        CPPUNIT_ASSERT_EQUAL(Http::scHttpVersionNotSupported, output.request_parse_status);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.start);
+        CPPUNIT_ASSERT_EQUAL((int)input.contentSize()-1, output.req.end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("GET / HTTP/\n", &output.buf[output.req.start],(output.req.end-output.req.start+1)));
+        CPPUNIT_ASSERT_EQUAL(0, output.req.m_start);
+        CPPUNIT_ASSERT_EQUAL(2, output.req.m_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("GET", &output.buf[output.req.m_start],(output.req.m_end-output.req.m_start+1)));
+        CPPUNIT_ASSERT_EQUAL(4, output.req.u_start);
+        CPPUNIT_ASSERT_EQUAL(4, output.req.u_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("/", &output.buf[output.req.u_start],(output.req.u_end-output.req.u_start+1)));
+        CPPUNIT_ASSERT_EQUAL(6, output.req.v_start);
+        CPPUNIT_ASSERT_EQUAL(10, output.req.v_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("HTTP/", &output.buf[output.req.v_start],(output.req.v_end-output.req.v_start+1)));
+        CPPUNIT_ASSERT_EQUAL(0, output.req.v_maj);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.v_min);
+        input.reset();
+    }
 
     // no major version
-    input.append("GET / HTTP/.1\n", 14);
-    //printf("TEST: '%s'\n",input.content());
-    output.reset(input.content(), input.contentSize());
-    CPPUNIT_ASSERT_EQUAL(-1, HttpParserParseReqLine(&output));
-    CPPUNIT_ASSERT_EQUAL(Http::scHttpVersionNotSupported, output.request_parse_status);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.start);
-    CPPUNIT_ASSERT_EQUAL((int)input.contentSize()-1, output.req.end);
-    CPPUNIT_ASSERT(memcmp("GET / HTTP/.1\n", &output.buf[output.req.start],(output.req.end-output.req.start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.m_start);
-    CPPUNIT_ASSERT_EQUAL(2, output.req.m_end);
-    CPPUNIT_ASSERT(memcmp("GET", &output.buf[output.req.m_start],(output.req.m_end-output.req.m_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(4, output.req.u_start);
-    CPPUNIT_ASSERT_EQUAL(4, output.req.u_end);
-    CPPUNIT_ASSERT(memcmp("/", &output.buf[output.req.u_start],(output.req.u_end-output.req.u_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(6, output.req.v_start);
-    CPPUNIT_ASSERT_EQUAL(12, output.req.v_end);
-    CPPUNIT_ASSERT(memcmp("HTTP/.1", &output.buf[output.req.v_start],(output.req.v_end-output.req.v_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.v_maj);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.v_min);
-    input.reset();
+    {
+        input.append("GET / HTTP/.1\n", 14);
+        //printf("TEST: '%s'\n",input.content());
+        output.reset(input.content(), input.contentSize());
+        CPPUNIT_ASSERT_EQUAL(-1, HttpParserParseReqLine(&output));
+        CPPUNIT_ASSERT_EQUAL(Http::scHttpVersionNotSupported, output.request_parse_status);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.start);
+        CPPUNIT_ASSERT_EQUAL((int)input.contentSize()-1, output.req.end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("GET / HTTP/.1\n", &output.buf[output.req.start],(output.req.end-output.req.start+1)));
+        CPPUNIT_ASSERT_EQUAL(0, output.req.m_start);
+        CPPUNIT_ASSERT_EQUAL(2, output.req.m_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("GET", &output.buf[output.req.m_start],(output.req.m_end-output.req.m_start+1)));
+        CPPUNIT_ASSERT_EQUAL(4, output.req.u_start);
+        CPPUNIT_ASSERT_EQUAL(4, output.req.u_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("/", &output.buf[output.req.u_start],(output.req.u_end-output.req.u_start+1)));
+        CPPUNIT_ASSERT_EQUAL(6, output.req.v_start);
+        CPPUNIT_ASSERT_EQUAL(12, output.req.v_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("HTTP/.1", &output.buf[output.req.v_start],(output.req.v_end-output.req.v_start+1)));
+        CPPUNIT_ASSERT_EQUAL(0, output.req.v_maj);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.v_min);
+        input.reset();
+    }
 
     // no version dot
-    input.append("GET / HTTP/11\n", 14);
-    //printf("TEST: '%s'\n",input.content());
-    output.reset(input.content(), input.contentSize());
-    CPPUNIT_ASSERT_EQUAL(-1, HttpParserParseReqLine(&output));
-    CPPUNIT_ASSERT_EQUAL(Http::scHttpVersionNotSupported, output.request_parse_status);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.start);
-    CPPUNIT_ASSERT_EQUAL((int)input.contentSize()-1, output.req.end);
-    CPPUNIT_ASSERT(memcmp("GET / HTTP/11\n", &output.buf[output.req.start],(output.req.end-output.req.start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.m_start);
-    CPPUNIT_ASSERT_EQUAL(2, output.req.m_end);
-    CPPUNIT_ASSERT(memcmp("GET", &output.buf[output.req.m_start],(output.req.m_end-output.req.m_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(4, output.req.u_start);
-    CPPUNIT_ASSERT_EQUAL(4, output.req.u_end);
-    CPPUNIT_ASSERT(memcmp("/", &output.buf[output.req.u_start],(output.req.u_end-output.req.u_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(6, output.req.v_start);
-    CPPUNIT_ASSERT_EQUAL(12, output.req.v_end);
-    CPPUNIT_ASSERT(memcmp("HTTP/11", &output.buf[output.req.v_start],(output.req.v_end-output.req.v_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.v_maj);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.v_min);
-    input.reset();
+    {
+        input.append("GET / HTTP/11\n", 14);
+        //printf("TEST: '%s'\n",input.content());
+        output.reset(input.content(), input.contentSize());
+        CPPUNIT_ASSERT_EQUAL(-1, HttpParserParseReqLine(&output));
+        CPPUNIT_ASSERT_EQUAL(Http::scHttpVersionNotSupported, output.request_parse_status);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.start);
+        CPPUNIT_ASSERT_EQUAL((int)input.contentSize()-1, output.req.end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("GET / HTTP/11\n", &output.buf[output.req.start],(output.req.end-output.req.start+1)));
+        CPPUNIT_ASSERT_EQUAL(0, output.req.m_start);
+        CPPUNIT_ASSERT_EQUAL(2, output.req.m_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("GET", &output.buf[output.req.m_start],(output.req.m_end-output.req.m_start+1)));
+        CPPUNIT_ASSERT_EQUAL(4, output.req.u_start);
+        CPPUNIT_ASSERT_EQUAL(4, output.req.u_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("/", &output.buf[output.req.u_start],(output.req.u_end-output.req.u_start+1)));
+        CPPUNIT_ASSERT_EQUAL(6, output.req.v_start);
+        CPPUNIT_ASSERT_EQUAL(12, output.req.v_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("HTTP/11", &output.buf[output.req.v_start],(output.req.v_end-output.req.v_start+1)));
+        CPPUNIT_ASSERT_EQUAL(0, output.req.v_maj);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.v_min);
+        input.reset();
+    }
 
     // negative major version (bug 3062)
-    input.append("GET / HTTP/-999999.1\n", 21);
-    //printf("TEST: '%s'\n",input.content());
-    output.reset(input.content(), input.contentSize());
-    CPPUNIT_ASSERT_EQUAL(-1, HttpParserParseReqLine(&output));
-    CPPUNIT_ASSERT_EQUAL(Http::scHttpVersionNotSupported, output.request_parse_status);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.start);
-    CPPUNIT_ASSERT_EQUAL((int)input.contentSize()-1, output.req.end);
-    CPPUNIT_ASSERT(memcmp("GET / HTTP/-999999.1\n", &output.buf[output.req.start],(output.req.end-output.req.start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.m_start);
-    CPPUNIT_ASSERT_EQUAL(2, output.req.m_end);
-    CPPUNIT_ASSERT(memcmp("GET", &output.buf[output.req.m_start],(output.req.m_end-output.req.m_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(4, output.req.u_start);
-    CPPUNIT_ASSERT_EQUAL(4, output.req.u_end);
-    CPPUNIT_ASSERT(memcmp("/", &output.buf[output.req.u_start],(output.req.u_end-output.req.u_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(6, output.req.v_start);
-    CPPUNIT_ASSERT_EQUAL(19, output.req.v_end);
-    CPPUNIT_ASSERT(memcmp("HTTP/-999999.1", &output.buf[output.req.v_start],(output.req.v_end-output.req.v_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.v_maj);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.v_min);
-    input.reset();
+    {
+        input.append("GET / HTTP/-999999.1\n", 21);
+        //printf("TEST: '%s'\n",input.content());
+        output.reset(input.content(), input.contentSize());
+        CPPUNIT_ASSERT_EQUAL(-1, HttpParserParseReqLine(&output));
+        CPPUNIT_ASSERT_EQUAL(Http::scHttpVersionNotSupported, output.request_parse_status);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.start);
+        CPPUNIT_ASSERT_EQUAL((int)input.contentSize()-1, output.req.end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("GET / HTTP/-999999.1\n", &output.buf[output.req.start],(output.req.end-output.req.start+1)));
+        CPPUNIT_ASSERT_EQUAL(0, output.req.m_start);
+        CPPUNIT_ASSERT_EQUAL(2, output.req.m_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("GET", &output.buf[output.req.m_start],(output.req.m_end-output.req.m_start+1)));
+        CPPUNIT_ASSERT_EQUAL(4, output.req.u_start);
+        CPPUNIT_ASSERT_EQUAL(4, output.req.u_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("/", &output.buf[output.req.u_start],(output.req.u_end-output.req.u_start+1)));
+        CPPUNIT_ASSERT_EQUAL(6, output.req.v_start);
+        CPPUNIT_ASSERT_EQUAL(19, output.req.v_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("HTTP/-999999.1", &output.buf[output.req.v_start],(output.req.v_end-output.req.v_start+1)));
+        CPPUNIT_ASSERT_EQUAL(0, output.req.v_maj);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.v_min);
+        input.reset();
+    }
 
     // no minor version
-    input.append("GET / HTTP/1.\n", 14);
-    //printf("TEST: '%s'\n",input.content());
-    output.reset(input.content(), input.contentSize());
-    CPPUNIT_ASSERT_EQUAL(-1, HttpParserParseReqLine(&output));
-    CPPUNIT_ASSERT_EQUAL(Http::scHttpVersionNotSupported, output.request_parse_status);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.start);
-    CPPUNIT_ASSERT_EQUAL((int)input.contentSize()-1, output.req.end);
-    CPPUNIT_ASSERT(memcmp("GET / HTTP/1.\n", &output.buf[output.req.start],(output.req.end-output.req.start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.m_start);
-    CPPUNIT_ASSERT_EQUAL(2, output.req.m_end);
-    CPPUNIT_ASSERT(memcmp("GET", &output.buf[output.req.m_start],(output.req.m_end-output.req.m_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(4, output.req.u_start);
-    CPPUNIT_ASSERT_EQUAL(4, output.req.u_end);
-    CPPUNIT_ASSERT(memcmp("/", &output.buf[output.req.u_start],(output.req.u_end-output.req.u_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(6, output.req.v_start);
-    CPPUNIT_ASSERT_EQUAL(12, output.req.v_end);
-    CPPUNIT_ASSERT(memcmp("HTTP/1.", &output.buf[output.req.v_start],(output.req.v_end-output.req.v_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(1, output.req.v_maj);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.v_min);
-    input.reset();
+    {
+        input.append("GET / HTTP/1.\n", 14);
+        //printf("TEST: '%s'\n",input.content());
+        output.reset(input.content(), input.contentSize());
+        CPPUNIT_ASSERT_EQUAL(-1, HttpParserParseReqLine(&output));
+        CPPUNIT_ASSERT_EQUAL(Http::scHttpVersionNotSupported, output.request_parse_status);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.start);
+        CPPUNIT_ASSERT_EQUAL((int)input.contentSize()-1, output.req.end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("GET / HTTP/1.\n", &output.buf[output.req.start],(output.req.end-output.req.start+1)));
+        CPPUNIT_ASSERT_EQUAL(0, output.req.m_start);
+        CPPUNIT_ASSERT_EQUAL(2, output.req.m_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("GET", &output.buf[output.req.m_start],(output.req.m_end-output.req.m_start+1)));
+        CPPUNIT_ASSERT_EQUAL(4, output.req.u_start);
+        CPPUNIT_ASSERT_EQUAL(4, output.req.u_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("/", &output.buf[output.req.u_start],(output.req.u_end-output.req.u_start+1)));
+        CPPUNIT_ASSERT_EQUAL(6, output.req.v_start);
+        CPPUNIT_ASSERT_EQUAL(12, output.req.v_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("HTTP/1.", &output.buf[output.req.v_start],(output.req.v_end-output.req.v_start+1)));
+        CPPUNIT_ASSERT_EQUAL(1, output.req.v_maj);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.v_min);
+        input.reset();
+    }
 
     // negative major version (bug 3062 corollary)
-    input.append("GET / HTTP/1.-999999\n", 21);
-    //printf("TEST: '%s'\n",input.content());
-    output.reset(input.content(), input.contentSize());
-    CPPUNIT_ASSERT_EQUAL(-1, HttpParserParseReqLine(&output));
-    CPPUNIT_ASSERT_EQUAL(Http::scHttpVersionNotSupported, output.request_parse_status);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.start);
-    CPPUNIT_ASSERT_EQUAL((int)input.contentSize()-1, output.req.end);
-    CPPUNIT_ASSERT(memcmp("GET / HTTP/1.-999999\n", &output.buf[output.req.start],(output.req.end-output.req.start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.m_start);
-    CPPUNIT_ASSERT_EQUAL(2, output.req.m_end);
-    CPPUNIT_ASSERT(memcmp("GET", &output.buf[output.req.m_start],(output.req.m_end-output.req.m_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(4, output.req.u_start);
-    CPPUNIT_ASSERT_EQUAL(4, output.req.u_end);
-    CPPUNIT_ASSERT(memcmp("/", &output.buf[output.req.u_start],(output.req.u_end-output.req.u_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(6, output.req.v_start);
-    CPPUNIT_ASSERT_EQUAL(19, output.req.v_end);
-    CPPUNIT_ASSERT(memcmp("HTTP/1.-999999", &output.buf[output.req.v_start],(output.req.v_end-output.req.v_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(1, output.req.v_maj);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.v_min);
-    input.reset();
+    {
+        input.append("GET / HTTP/1.-999999\n", 21);
+        //printf("TEST: '%s'\n",input.content());
+        output.reset(input.content(), input.contentSize());
+        CPPUNIT_ASSERT_EQUAL(-1, HttpParserParseReqLine(&output));
+        CPPUNIT_ASSERT_EQUAL(Http::scHttpVersionNotSupported, output.request_parse_status);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.start);
+        CPPUNIT_ASSERT_EQUAL((int)input.contentSize()-1, output.req.end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("GET / HTTP/1.-999999\n", &output.buf[output.req.start],(output.req.end-output.req.start+1)));
+        CPPUNIT_ASSERT_EQUAL(0, output.req.m_start);
+        CPPUNIT_ASSERT_EQUAL(2, output.req.m_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("GET", &output.buf[output.req.m_start],(output.req.m_end-output.req.m_start+1)));
+        CPPUNIT_ASSERT_EQUAL(4, output.req.u_start);
+        CPPUNIT_ASSERT_EQUAL(4, output.req.u_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("/", &output.buf[output.req.u_start],(output.req.u_end-output.req.u_start+1)));
+        CPPUNIT_ASSERT_EQUAL(6, output.req.v_start);
+        CPPUNIT_ASSERT_EQUAL(19, output.req.v_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("HTTP/1.-999999", &output.buf[output.req.v_start],(output.req.v_end-output.req.v_start+1)));
+        CPPUNIT_ASSERT_EQUAL(1, output.req.v_maj);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.v_min);
+        input.reset();
+    }
 }
 
 void
@@ -343,70 +369,76 @@ testHttpParser::testParseRequestLineStrange()
     input.init();
 
     // space padded URL
-    input.append("GET  /     HTTP/1.1\r\n", 21);
-    //printf("TEST: '%s'\n",input.content());
-    output.reset(input.content(), input.contentSize());
-    CPPUNIT_ASSERT_EQUAL(1, HttpParserParseReqLine(&output));
-    CPPUNIT_ASSERT_EQUAL(Http::scOkay, output.request_parse_status);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.start);
-    CPPUNIT_ASSERT_EQUAL((int)input.contentSize()-1, output.req.end);
-    CPPUNIT_ASSERT(memcmp("GET  /     HTTP/1.1\r\n", &output.buf[output.req.start],(output.req.end-output.req.start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.m_start);
-    CPPUNIT_ASSERT_EQUAL(2, output.req.m_end);
-    CPPUNIT_ASSERT(memcmp("GET", &output.buf[output.req.m_start],(output.req.m_end-output.req.m_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(5, output.req.u_start);
-    CPPUNIT_ASSERT_EQUAL(5, output.req.u_end);
-    CPPUNIT_ASSERT(memcmp("/", &output.buf[output.req.u_start],(output.req.u_end-output.req.u_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(11, output.req.v_start);
-    CPPUNIT_ASSERT_EQUAL(18, output.req.v_end);
-    CPPUNIT_ASSERT(memcmp("HTTP/1.1", &output.buf[output.req.v_start],(output.req.v_end-output.req.v_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(1, output.req.v_maj);
-    CPPUNIT_ASSERT_EQUAL(1, output.req.v_min);
-    input.reset();
+    {
+        input.append("GET  /     HTTP/1.1\r\n", 21);
+        //printf("TEST: '%s'\n",input.content());
+        output.reset(input.content(), input.contentSize());
+        CPPUNIT_ASSERT_EQUAL(1, HttpParserParseReqLine(&output));
+        CPPUNIT_ASSERT_EQUAL(Http::scOkay, output.request_parse_status);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.start);
+        CPPUNIT_ASSERT_EQUAL((int)input.contentSize()-1, output.req.end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("GET  /     HTTP/1.1\r\n", &output.buf[output.req.start],(output.req.end-output.req.start+1)));
+        CPPUNIT_ASSERT_EQUAL(0, output.req.m_start);
+        CPPUNIT_ASSERT_EQUAL(2, output.req.m_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("GET", &output.buf[output.req.m_start],(output.req.m_end-output.req.m_start+1)));
+        CPPUNIT_ASSERT_EQUAL(5, output.req.u_start);
+        CPPUNIT_ASSERT_EQUAL(5, output.req.u_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("/", &output.buf[output.req.u_start],(output.req.u_end-output.req.u_start+1)));
+        CPPUNIT_ASSERT_EQUAL(11, output.req.v_start);
+        CPPUNIT_ASSERT_EQUAL(18, output.req.v_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("HTTP/1.1", &output.buf[output.req.v_start],(output.req.v_end-output.req.v_start+1)));
+        CPPUNIT_ASSERT_EQUAL(1, output.req.v_maj);
+        CPPUNIT_ASSERT_EQUAL(1, output.req.v_min);
+        input.reset();
+    }
 
     // whitespace inside URI. (nasty but happens)
-    input.append("GET /fo o/ HTTP/1.1\n", 20);
-    //printf("TEST: '%s'\n",input.content());
-    output.reset(input.content(), input.contentSize());
-    CPPUNIT_ASSERT_EQUAL(1, HttpParserParseReqLine(&output));
-    CPPUNIT_ASSERT_EQUAL(Http::scOkay, output.request_parse_status);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.start);
-    CPPUNIT_ASSERT_EQUAL((int)input.contentSize()-1, output.req.end);
-    CPPUNIT_ASSERT(memcmp("GET /fo o/ HTTP/1.1\n", &output.buf[output.req.start],(output.req.end-output.req.start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.m_start);
-    CPPUNIT_ASSERT_EQUAL(2, output.req.m_end);
-    CPPUNIT_ASSERT(memcmp("GET", &output.buf[output.req.m_start],(output.req.m_end-output.req.m_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(4, output.req.u_start);
-    CPPUNIT_ASSERT_EQUAL(9, output.req.u_end);
-    CPPUNIT_ASSERT(memcmp("/fo o/", &output.buf[output.req.u_start],(output.req.u_end-output.req.u_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(11, output.req.v_start);
-    CPPUNIT_ASSERT_EQUAL(18, output.req.v_end);
-    CPPUNIT_ASSERT(memcmp("HTTP/1.1", &output.buf[output.req.v_start],(output.req.v_end-output.req.v_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(1, output.req.v_maj);
-    CPPUNIT_ASSERT_EQUAL(1, output.req.v_min);
-    input.reset();
+    {
+        input.append("GET /fo o/ HTTP/1.1\n", 20);
+        //printf("TEST: '%s'\n",input.content());
+        output.reset(input.content(), input.contentSize());
+        CPPUNIT_ASSERT_EQUAL(1, HttpParserParseReqLine(&output));
+        CPPUNIT_ASSERT_EQUAL(Http::scOkay, output.request_parse_status);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.start);
+        CPPUNIT_ASSERT_EQUAL((int)input.contentSize()-1, output.req.end);
+        CPPUNIT_ASSERT_EQUAL(0,memcmp("GET /fo o/ HTTP/1.1\n", &output.buf[output.req.start],(output.req.end-output.req.start+1)));
+        CPPUNIT_ASSERT_EQUAL(0, output.req.m_start);
+        CPPUNIT_ASSERT_EQUAL(2, output.req.m_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("GET", &output.buf[output.req.m_start],(output.req.m_end-output.req.m_start+1)));
+        CPPUNIT_ASSERT_EQUAL(4, output.req.u_start);
+        CPPUNIT_ASSERT_EQUAL(9, output.req.u_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("/fo o/", &output.buf[output.req.u_start],(output.req.u_end-output.req.u_start+1)));
+        CPPUNIT_ASSERT_EQUAL(11, output.req.v_start);
+        CPPUNIT_ASSERT_EQUAL(18, output.req.v_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("HTTP/1.1", &output.buf[output.req.v_start],(output.req.v_end-output.req.v_start+1)));
+        CPPUNIT_ASSERT_EQUAL(1, output.req.v_maj);
+        CPPUNIT_ASSERT_EQUAL(1, output.req.v_min);
+        input.reset();
+    }
 
     // additional data in buffer
-    input.append("GET /     HTTP/1.1\nboo!", 23);
-    //printf("TEST: '%s'\n",input.content());
-    output.reset(input.content(), input.contentSize());
-    CPPUNIT_ASSERT_EQUAL(1, HttpParserParseReqLine(&output));
-    CPPUNIT_ASSERT_EQUAL(Http::scOkay, output.request_parse_status);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.start);
-    CPPUNIT_ASSERT_EQUAL((int)input.contentSize()-5, output.req.end);
-    CPPUNIT_ASSERT(memcmp("GET /     HTTP/1.1\n", &output.buf[output.req.start],(output.req.end-output.req.start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.m_start);
-    CPPUNIT_ASSERT_EQUAL(2, output.req.m_end);
-    CPPUNIT_ASSERT(memcmp("GET", &output.buf[output.req.m_start],(output.req.m_end-output.req.m_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(4, output.req.u_start);
-    CPPUNIT_ASSERT_EQUAL(4, output.req.u_end); // strangeness generated by following RFC
-    CPPUNIT_ASSERT(memcmp("/", &output.buf[output.req.u_start],(output.req.u_end-output.req.u_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(10, output.req.v_start);
-    CPPUNIT_ASSERT_EQUAL(17, output.req.v_end);
-    CPPUNIT_ASSERT(memcmp("HTTP/1.1", &output.buf[output.req.v_start],(output.req.v_end-output.req.v_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(1, output.req.v_maj);
-    CPPUNIT_ASSERT_EQUAL(1, output.req.v_min);
-    input.reset();
+    {
+        input.append("GET /     HTTP/1.1\nboo!", 23);
+        //printf("TEST: '%s'\n",input.content());
+        output.reset(input.content(), input.contentSize());
+        CPPUNIT_ASSERT_EQUAL(1, HttpParserParseReqLine(&output));
+        CPPUNIT_ASSERT_EQUAL(Http::scOkay, output.request_parse_status);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.start);
+        CPPUNIT_ASSERT_EQUAL((int)input.contentSize()-5, output.req.end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("GET /     HTTP/1.1\n", &output.buf[output.req.start],(output.req.end-output.req.start+1)));
+        CPPUNIT_ASSERT_EQUAL(0, output.req.m_start);
+        CPPUNIT_ASSERT_EQUAL(2, output.req.m_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("GET", &output.buf[output.req.m_start],(output.req.m_end-output.req.m_start+1)));
+        CPPUNIT_ASSERT_EQUAL(4, output.req.u_start);
+        CPPUNIT_ASSERT_EQUAL(4, output.req.u_end); // strangeness generated by following RFC
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("/", &output.buf[output.req.u_start],(output.req.u_end-output.req.u_start+1)));
+        CPPUNIT_ASSERT_EQUAL(10, output.req.v_start);
+        CPPUNIT_ASSERT_EQUAL(17, output.req.v_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("HTTP/1.1", &output.buf[output.req.v_start],(output.req.v_end-output.req.v_start+1)));
+        CPPUNIT_ASSERT_EQUAL(1, output.req.v_maj);
+        CPPUNIT_ASSERT_EQUAL(1, output.req.v_min);
+        input.reset();
+    }
 }
 
 void
@@ -420,185 +452,196 @@ testHttpParser::testParseRequestLineTerminators()
     input.init();
 
     // alternative EOL sequence: NL-only
-    input.append("GET / HTTP/1.1\n", 15);
-    //printf("TEST: '%s'\n",input.content());
-    output.reset(input.content(), input.contentSize());
-    CPPUNIT_ASSERT_EQUAL(1, HttpParserParseReqLine(&output));
-    CPPUNIT_ASSERT_EQUAL(Http::scOkay, output.request_parse_status);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.start);
-    CPPUNIT_ASSERT_EQUAL((int)input.contentSize()-1, output.req.end);
-    CPPUNIT_ASSERT(memcmp("GET / HTTP/1.1\n", &output.buf[output.req.start],(output.req.end-output.req.start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.m_start);
-    CPPUNIT_ASSERT_EQUAL(2, output.req.m_end);
-    CPPUNIT_ASSERT(memcmp("GET", &output.buf[output.req.m_start],(output.req.m_end-output.req.m_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(4, output.req.u_start);
-    CPPUNIT_ASSERT_EQUAL(4, output.req.u_end);
-    CPPUNIT_ASSERT(memcmp("/", &output.buf[output.req.u_start],(output.req.u_end-output.req.u_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(6, output.req.v_start);
-    CPPUNIT_ASSERT_EQUAL(13, output.req.v_end);
-    CPPUNIT_ASSERT(memcmp("HTTP/1.1", &output.buf[output.req.v_start],(output.req.v_end-output.req.v_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(1, output.req.v_maj);
-    CPPUNIT_ASSERT_EQUAL(1, output.req.v_min);
-    input.reset();
+    {
+        input.append("GET / HTTP/1.1\n", 15);
+        //printf("TEST: '%s'\n",input.content());
+        output.reset(input.content(), input.contentSize());
+        CPPUNIT_ASSERT_EQUAL(1, HttpParserParseReqLine(&output));
+        CPPUNIT_ASSERT_EQUAL(Http::scOkay, output.request_parse_status);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.start);
+        CPPUNIT_ASSERT_EQUAL((int)input.contentSize()-1, output.req.end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("GET / HTTP/1.1\n", &output.buf[output.req.start],(output.req.end-output.req.start+1)));
+        CPPUNIT_ASSERT_EQUAL(0, output.req.m_start);
+        CPPUNIT_ASSERT_EQUAL(2, output.req.m_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("GET", &output.buf[output.req.m_start],(output.req.m_end-output.req.m_start+1)));
+        CPPUNIT_ASSERT_EQUAL(4, output.req.u_start);
+        CPPUNIT_ASSERT_EQUAL(4, output.req.u_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("/", &output.buf[output.req.u_start],(output.req.u_end-output.req.u_start+1)));
+        CPPUNIT_ASSERT_EQUAL(6, output.req.v_start);
+        CPPUNIT_ASSERT_EQUAL(13, output.req.v_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("HTTP/1.1", &output.buf[output.req.v_start],(output.req.v_end-output.req.v_start+1)));
+        CPPUNIT_ASSERT_EQUAL(1, output.req.v_maj);
+        CPPUNIT_ASSERT_EQUAL(1, output.req.v_min);
+        input.reset();
+    }
 
     // alternative EOL sequence: double-NL-only
-    input.append("GET / HTTP/1.1\n\n", 16);
-    //printf("TEST: '%s'\n",input.content());
-    output.reset(input.content(), input.contentSize());
-    CPPUNIT_ASSERT_EQUAL(1, HttpParserParseReqLine(&output));
-    CPPUNIT_ASSERT_EQUAL(Http::scOkay, output.request_parse_status);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.start);
-    CPPUNIT_ASSERT_EQUAL((int)input.contentSize()-2, output.req.end);
-    CPPUNIT_ASSERT(memcmp("GET / HTTP/1.1\n", &output.buf[output.req.start],(output.req.end-output.req.start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.m_start);
-    CPPUNIT_ASSERT_EQUAL(2, output.req.m_end);
-    CPPUNIT_ASSERT(memcmp("GET", &output.buf[output.req.m_start],(output.req.m_end-output.req.m_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(4, output.req.u_start);
-    CPPUNIT_ASSERT_EQUAL(4, output.req.u_end);
-    CPPUNIT_ASSERT(memcmp("/", &output.buf[output.req.u_start],(output.req.u_end-output.req.u_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(6, output.req.v_start);
-    CPPUNIT_ASSERT_EQUAL(13, output.req.v_end);
-    CPPUNIT_ASSERT(memcmp("HTTP/1.1", &output.buf[output.req.v_start],(output.req.v_end-output.req.v_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(1, output.req.v_maj);
-    CPPUNIT_ASSERT_EQUAL(1, output.req.v_min);
-    input.reset();
+    {
+        input.append("GET / HTTP/1.1\n\n", 16);
+        //printf("TEST: '%s'\n",input.content());
+        output.reset(input.content(), input.contentSize());
+        CPPUNIT_ASSERT_EQUAL(1, HttpParserParseReqLine(&output));
+        CPPUNIT_ASSERT_EQUAL(Http::scOkay, output.request_parse_status);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.start);
+        CPPUNIT_ASSERT_EQUAL((int)input.contentSize()-2, output.req.end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("GET / HTTP/1.1\n", &output.buf[output.req.start],(output.req.end-output.req.start+1)));
+        CPPUNIT_ASSERT_EQUAL(0, output.req.m_start);
+        CPPUNIT_ASSERT_EQUAL(2, output.req.m_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("GET", &output.buf[output.req.m_start],(output.req.m_end-output.req.m_start+1)));
+        CPPUNIT_ASSERT_EQUAL(4, output.req.u_start);
+        CPPUNIT_ASSERT_EQUAL(4, output.req.u_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("/", &output.buf[output.req.u_start],(output.req.u_end-output.req.u_start+1)));
+        CPPUNIT_ASSERT_EQUAL(6, output.req.v_start);
+        CPPUNIT_ASSERT_EQUAL(13, output.req.v_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("HTTP/1.1", &output.buf[output.req.v_start],(output.req.v_end-output.req.v_start+1)));
+        CPPUNIT_ASSERT_EQUAL(1, output.req.v_maj);
+        CPPUNIT_ASSERT_EQUAL(1, output.req.v_min);
+        input.reset();
+    }
 
     // RELAXED alternative EOL sequence: multi-CR-NL
-    input.append("GET / HTTP/1.1\r\r\r\n", 18);
-    //printf("TEST: '%s'\n",input.content());
-    output.reset(input.content(), input.contentSize());
-    Config.onoff.relaxed_header_parser = 1;
-    // Being tolerant we can ignore and elide these apparently benign CR
-    CPPUNIT_ASSERT_EQUAL(1, HttpParserParseReqLine(&output));
-    CPPUNIT_ASSERT_EQUAL(Http::scOkay, output.request_parse_status);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.start);
-    CPPUNIT_ASSERT_EQUAL((int)input.contentSize()-1, output.req.end);
-    CPPUNIT_ASSERT(memcmp("GET / HTTP/1.1\r\r\r\n", &output.buf[output.req.start],(output.req.end-output.req.start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.m_start);
-    CPPUNIT_ASSERT_EQUAL(2, output.req.m_end);
-    CPPUNIT_ASSERT(memcmp("GET", &output.buf[output.req.m_start],(output.req.m_end-output.req.m_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(4, output.req.u_start);
-    CPPUNIT_ASSERT_EQUAL(4, output.req.u_end);
-    CPPUNIT_ASSERT(memcmp("/", &output.buf[output.req.u_start],(output.req.u_end-output.req.u_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(6, output.req.v_start);
-    CPPUNIT_ASSERT_EQUAL(13, output.req.v_end);
-    CPPUNIT_ASSERT(memcmp("HTTP/1.1", &output.buf[output.req.v_start],(output.req.v_end-output.req.v_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(1, output.req.v_maj);
-    CPPUNIT_ASSERT_EQUAL(1, output.req.v_min);
-    input.reset();
+    {
+        input.append("GET / HTTP/1.1\r\r\r\n", 18);
+        //printf("TEST: '%s'\n",input.content());
+        output.reset(input.content(), input.contentSize());
+        Config.onoff.relaxed_header_parser = 1;
+        // Being tolerant we can ignore and elide these apparently benign CR
+        CPPUNIT_ASSERT_EQUAL(1, HttpParserParseReqLine(&output));
+        CPPUNIT_ASSERT_EQUAL(Http::scOkay, output.request_parse_status);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.start);
+        CPPUNIT_ASSERT_EQUAL((int)input.contentSize()-1, output.req.end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("GET / HTTP/1.1\r\r\r\n", &output.buf[output.req.start],(output.req.end-output.req.start+1)));
+        CPPUNIT_ASSERT_EQUAL(0, output.req.m_start);
+        CPPUNIT_ASSERT_EQUAL(2, output.req.m_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("GET", &output.buf[output.req.m_start],(output.req.m_end-output.req.m_start+1)));
+        CPPUNIT_ASSERT_EQUAL(4, output.req.u_start);
+        CPPUNIT_ASSERT_EQUAL(4, output.req.u_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("/", &output.buf[output.req.u_start],(output.req.u_end-output.req.u_start+1)));
+        CPPUNIT_ASSERT_EQUAL(6, output.req.v_start);
+        CPPUNIT_ASSERT_EQUAL(13, output.req.v_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("HTTP/1.1", &output.buf[output.req.v_start],(output.req.v_end-output.req.v_start+1)));
+        CPPUNIT_ASSERT_EQUAL(1, output.req.v_maj);
+        CPPUNIT_ASSERT_EQUAL(1, output.req.v_min);
+        input.reset();
+    }
 
     // STRICT alternative EOL sequence: multi-CR-NL
-    input.append("GET / HTTP/1.1\r\r\r\n", 18);
-    //printf("TEST: '%s'\n",input.content());
-    output.reset(input.content(), input.contentSize());
-    // strict mode treats these as several bare-CR in the request line which is explicitly invalid.
-    Config.onoff.relaxed_header_parser = 0;
-    CPPUNIT_ASSERT_EQUAL(-1, HttpParserParseReqLine(&output));
-    CPPUNIT_ASSERT_EQUAL(Http::scBadRequest, output.request_parse_status);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.start);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.end);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.m_start);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.m_end);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.u_start);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.u_end);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.v_start);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.v_end);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.v_maj);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.v_min);
-    input.reset();
+    {
+        input.append("GET / HTTP/1.1\r\r\r\n", 18);
+        //printf("TEST: '%s'\n",input.content());
+        output.reset(input.content(), input.contentSize());
+        // strict mode treats these as several bare-CR in the request line which is explicitly invalid.
+        Config.onoff.relaxed_header_parser = 0;
+        CPPUNIT_ASSERT_EQUAL(-1, HttpParserParseReqLine(&output));
+        CPPUNIT_ASSERT_EQUAL(Http::scBadRequest, output.request_parse_status);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.start);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.end);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.m_start);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.m_end);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.u_start);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.u_end);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.v_start);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.v_end);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.v_maj);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.v_min);
+        input.reset();
+    }
 
     // space padded version
-    // RFC 1945 and 2616 specify version is followed by CRLF. No intermediary bytes.
-    // NP: the terminal whitespace is a special case: invalid for even HTTP/0.9 with no version tag
-    input.append("GET / HTTP/1.1 \n", 16);
-    //printf("TEST: '%s'\n",input.content());
-    output.reset(input.content(), input.contentSize());
-    CPPUNIT_ASSERT_EQUAL(-1, HttpParserParseReqLine(&output));
-    CPPUNIT_ASSERT_EQUAL(Http::scBadRequest, output.request_parse_status);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.start);
-    CPPUNIT_ASSERT_EQUAL((int)input.contentSize()-1, output.req.end);
-    CPPUNIT_ASSERT(memcmp("GET / HTTP/1.1 \n", &output.buf[output.req.start],(output.req.end-output.req.start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.m_start);
-    CPPUNIT_ASSERT_EQUAL(2, output.req.m_end);
-    CPPUNIT_ASSERT(memcmp("GET", &output.buf[output.req.m_start],(output.req.m_end-output.req.m_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(4, output.req.u_start);
-    CPPUNIT_ASSERT_EQUAL(13, output.req.u_end);
-    CPPUNIT_ASSERT(memcmp("/ HTTP/1.1", &output.buf[output.req.u_start],(output.req.u_end-output.req.u_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.v_start);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.v_end);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.v_maj);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.v_min);
-    input.reset();
+    {
+        // RFC 1945 and 2616 specify version is followed by CRLF. No intermediary bytes.
+        // NP: the terminal whitespace is a special case: invalid for even HTTP/0.9 with no version tag
+        input.append("GET / HTTP/1.1 \n", 16);
+        //printf("TEST: '%s'\n",input.content());
+        output.reset(input.content(), input.contentSize());
+        CPPUNIT_ASSERT_EQUAL(-1, HttpParserParseReqLine(&output));
+        CPPUNIT_ASSERT_EQUAL(Http::scBadRequest, output.request_parse_status);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.start);
+        CPPUNIT_ASSERT_EQUAL((int)input.contentSize()-1, output.req.end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("GET / HTTP/1.1 \n", &output.buf[output.req.start],(output.req.end-output.req.start+1)));
+        CPPUNIT_ASSERT_EQUAL(0, output.req.m_start);
+        CPPUNIT_ASSERT_EQUAL(2, output.req.m_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("GET", &output.buf[output.req.m_start],(output.req.m_end-output.req.m_start+1)));
+        CPPUNIT_ASSERT_EQUAL(4, output.req.u_start);
+        CPPUNIT_ASSERT_EQUAL(13, output.req.u_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("/ HTTP/1.1", &output.buf[output.req.u_start],(output.req.u_end-output.req.u_start+1)));
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.v_start);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.v_end);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.v_maj);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.v_min);
+        input.reset();
+    }
 
     // incomplete line at various positions
-
-    input.append("GET", 3);
-    //printf("TEST: '%s'\n",input.content());
-    output.reset(input.content(), input.contentSize());
-    CPPUNIT_ASSERT_EQUAL(0, HttpParserParseReqLine(&output));
-    CPPUNIT_ASSERT_EQUAL(Http::scNone, output.request_parse_status);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.start);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.end);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.m_start);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.m_end);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.u_start);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.u_end);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.v_start);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.v_end);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.v_maj);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.v_min);
-    input.reset();
-
-    input.append("GET ", 4);
-    //printf("TEST: '%s'\n",input.content());
-    output.reset(input.content(), input.contentSize());
-    CPPUNIT_ASSERT_EQUAL(0, HttpParserParseReqLine(&output));
-    CPPUNIT_ASSERT_EQUAL(Http::scNone, output.request_parse_status);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.start);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.end);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.m_start);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.m_end);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.u_start);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.u_end);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.v_start);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.v_end);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.v_maj);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.v_min);
-    input.reset();
-
-    input.append("GET / HT", 8);
-    //printf("TEST: '%s'\n",input.content());
-    output.reset(input.content(), input.contentSize());
-    CPPUNIT_ASSERT_EQUAL(0, HttpParserParseReqLine(&output));
-    CPPUNIT_ASSERT_EQUAL(Http::scNone, output.request_parse_status);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.start);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.end);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.m_start);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.m_end);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.u_start);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.u_end);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.v_start);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.v_end);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.v_maj);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.v_min);
-    input.reset();
-
-    input.append("GET / HTTP/1.1", 14);
-    //printf("TEST: '%s'\n",input.content());
-    output.reset(input.content(), input.contentSize());
-    CPPUNIT_ASSERT_EQUAL(0, HttpParserParseReqLine(&output));
-    CPPUNIT_ASSERT_EQUAL(Http::scNone, output.request_parse_status);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.start);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.end);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.m_start);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.m_end);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.u_start);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.u_end);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.v_start);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.v_end);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.v_maj);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.v_min);
-    input.reset();
+    {
+        input.append("GET", 3);
+        //printf("TEST: '%s'\n",input.content());
+        output.reset(input.content(), input.contentSize());
+        CPPUNIT_ASSERT_EQUAL(0, HttpParserParseReqLine(&output));
+        CPPUNIT_ASSERT_EQUAL(Http::scNone, output.request_parse_status);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.start);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.end);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.m_start);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.m_end);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.u_start);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.u_end);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.v_start);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.v_end);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.v_maj);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.v_min);
+        input.reset();
+
+        input.append("GET ", 4);
+        //printf("TEST: '%s'\n",input.content());
+        output.reset(input.content(), input.contentSize());
+        CPPUNIT_ASSERT_EQUAL(0, HttpParserParseReqLine(&output));
+        CPPUNIT_ASSERT_EQUAL(Http::scNone, output.request_parse_status);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.start);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.end);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.m_start);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.m_end);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.u_start);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.u_end);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.v_start);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.v_end);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.v_maj);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.v_min);
+        input.reset();
+
+        input.append("GET / HT", 8);
+        //printf("TEST: '%s'\n",input.content());
+        output.reset(input.content(), input.contentSize());
+        CPPUNIT_ASSERT_EQUAL(0, HttpParserParseReqLine(&output));
+        CPPUNIT_ASSERT_EQUAL(Http::scNone, output.request_parse_status);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.start);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.end);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.m_start);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.m_end);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.u_start);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.u_end);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.v_start);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.v_end);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.v_maj);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.v_min);
+        input.reset();
+
+        input.append("GET / HTTP/1.1", 14);
+        //printf("TEST: '%s'\n",input.content());
+        output.reset(input.content(), input.contentSize());
+        CPPUNIT_ASSERT_EQUAL(0, HttpParserParseReqLine(&output));
+        CPPUNIT_ASSERT_EQUAL(Http::scNone, output.request_parse_status);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.start);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.end);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.m_start);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.m_end);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.u_start);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.u_end);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.v_start);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.v_end);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.v_maj);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.v_min);
+        input.reset();
+    }
 }
 
 void
@@ -612,172 +655,188 @@ testHttpParser::testParseRequestLineMethods()
     input.init();
 
     // RFC 2616 : . method
-    input.append(". / HTTP/1.1\n", 13);
-    //printf("TEST: '%s'\n",input.content());
-    output.reset(input.content(), input.contentSize());
-    CPPUNIT_ASSERT_EQUAL(1, HttpParserParseReqLine(&output));
-    CPPUNIT_ASSERT_EQUAL(Http::scOkay, output.request_parse_status);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.start);
-    CPPUNIT_ASSERT_EQUAL((int)input.contentSize()-1, output.req.end);
-    CPPUNIT_ASSERT(memcmp(". / HTTP/1.1\n", &output.buf[output.req.start],(output.req.end-output.req.start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.m_start);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.m_end);
-    CPPUNIT_ASSERT(memcmp(".", &output.buf[output.req.m_start],(output.req.m_end-output.req.m_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(2, output.req.u_start);
-    CPPUNIT_ASSERT_EQUAL(2, output.req.u_end);
-    CPPUNIT_ASSERT(memcmp("/", &output.buf[output.req.u_start],(output.req.u_end-output.req.u_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(4, output.req.v_start);
-    CPPUNIT_ASSERT_EQUAL(11, output.req.v_end);
-    CPPUNIT_ASSERT(memcmp("HTTP/1.1", &output.buf[output.req.v_start],(output.req.v_end-output.req.v_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(1, output.req.v_maj);
-    CPPUNIT_ASSERT_EQUAL(1, output.req.v_min);
-    input.reset();
+    {
+        input.append(". / HTTP/1.1\n", 13);
+        //printf("TEST: '%s'\n",input.content());
+        output.reset(input.content(), input.contentSize());
+        CPPUNIT_ASSERT_EQUAL(1, HttpParserParseReqLine(&output));
+        CPPUNIT_ASSERT_EQUAL(Http::scOkay, output.request_parse_status);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.start);
+        CPPUNIT_ASSERT_EQUAL((int)input.contentSize()-1, output.req.end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp(". / HTTP/1.1\n", &output.buf[output.req.start],(output.req.end-output.req.start+1)));
+        CPPUNIT_ASSERT_EQUAL(0, output.req.m_start);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.m_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp(".", &output.buf[output.req.m_start],(output.req.m_end-output.req.m_start+1)));
+        CPPUNIT_ASSERT_EQUAL(2, output.req.u_start);
+        CPPUNIT_ASSERT_EQUAL(2, output.req.u_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("/", &output.buf[output.req.u_start],(output.req.u_end-output.req.u_start+1)));
+        CPPUNIT_ASSERT_EQUAL(4, output.req.v_start);
+        CPPUNIT_ASSERT_EQUAL(11, output.req.v_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("HTTP/1.1", &output.buf[output.req.v_start],(output.req.v_end-output.req.v_start+1)));
+        CPPUNIT_ASSERT_EQUAL(1, output.req.v_maj);
+        CPPUNIT_ASSERT_EQUAL(1, output.req.v_min);
+        input.reset();
+    }
 
     // OPTIONS with * URL
-    input.append("OPTIONS * HTTP/1.1\n", 19);
-    //printf("TEST: '%s'\n",input.content());
-    output.reset(input.content(), input.contentSize());
-    CPPUNIT_ASSERT_EQUAL(1, HttpParserParseReqLine(&output));
-    CPPUNIT_ASSERT_EQUAL(Http::scOkay, output.request_parse_status);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.start);
-    CPPUNIT_ASSERT_EQUAL((int)input.contentSize()-1, output.req.end);
-    CPPUNIT_ASSERT(memcmp("OPTIONS * HTTP/1.1\n", &output.buf[output.req.start],(output.req.end-output.req.start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.m_start);
-    CPPUNIT_ASSERT_EQUAL(6, output.req.m_end);
-    CPPUNIT_ASSERT(memcmp("OPTIONS", &output.buf[output.req.m_start],(output.req.m_end-output.req.m_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(8, output.req.u_start);
-    CPPUNIT_ASSERT_EQUAL(8, output.req.u_end);
-    CPPUNIT_ASSERT(memcmp("*", &output.buf[output.req.u_start],(output.req.u_end-output.req.u_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(10, output.req.v_start);
-    CPPUNIT_ASSERT_EQUAL(17, output.req.v_end);
-    CPPUNIT_ASSERT(memcmp("HTTP/1.1", &output.buf[output.req.v_start],(output.req.v_end-output.req.v_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(1, output.req.v_maj);
-    CPPUNIT_ASSERT_EQUAL(1, output.req.v_min);
-    input.reset();
+    {
+        input.append("OPTIONS * HTTP/1.1\n", 19);
+        //printf("TEST: '%s'\n",input.content());
+        output.reset(input.content(), input.contentSize());
+        CPPUNIT_ASSERT_EQUAL(1, HttpParserParseReqLine(&output));
+        CPPUNIT_ASSERT_EQUAL(Http::scOkay, output.request_parse_status);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.start);
+        CPPUNIT_ASSERT_EQUAL((int)input.contentSize()-1, output.req.end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("OPTIONS * HTTP/1.1\n", &output.buf[output.req.start],(output.req.end-output.req.start+1)));
+        CPPUNIT_ASSERT_EQUAL(0, output.req.m_start);
+        CPPUNIT_ASSERT_EQUAL(6, output.req.m_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("OPTIONS", &output.buf[output.req.m_start],(output.req.m_end-output.req.m_start+1)));
+        CPPUNIT_ASSERT_EQUAL(8, output.req.u_start);
+        CPPUNIT_ASSERT_EQUAL(8, output.req.u_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("*", &output.buf[output.req.u_start],(output.req.u_end-output.req.u_start+1)));
+        CPPUNIT_ASSERT_EQUAL(10, output.req.v_start);
+        CPPUNIT_ASSERT_EQUAL(17, output.req.v_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("HTTP/1.1", &output.buf[output.req.v_start],(output.req.v_end-output.req.v_start+1)));
+        CPPUNIT_ASSERT_EQUAL(1, output.req.v_maj);
+        CPPUNIT_ASSERT_EQUAL(1, output.req.v_min);
+        input.reset();
+    }
 
     // unknown method
-    input.append("HELLOWORLD / HTTP/1.1\n", 22);
-    //printf("TEST: '%s'\n",input.content());
-    output.reset(input.content(), input.contentSize());
-    CPPUNIT_ASSERT_EQUAL(1, HttpParserParseReqLine(&output));
-    CPPUNIT_ASSERT_EQUAL(Http::scOkay, output.request_parse_status);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.start);
-    CPPUNIT_ASSERT_EQUAL((int)input.contentSize()-1, output.req.end);
-    CPPUNIT_ASSERT(memcmp("HELLOWORLD / HTTP/1.1\n", &output.buf[output.req.start],(output.req.end-output.req.start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.m_start);
-    CPPUNIT_ASSERT_EQUAL(9, output.req.m_end);
-    CPPUNIT_ASSERT(memcmp("HELLOWORLD", &output.buf[output.req.m_start],(output.req.m_end-output.req.m_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(11, output.req.u_start);
-    CPPUNIT_ASSERT_EQUAL(11, output.req.u_end);
-    CPPUNIT_ASSERT(memcmp("/", &output.buf[output.req.u_start],(output.req.u_end-output.req.u_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(13, output.req.v_start);
-    CPPUNIT_ASSERT_EQUAL(20, output.req.v_end);
-    CPPUNIT_ASSERT(memcmp("HTTP/1.1", &output.buf[output.req.v_start],(output.req.v_end-output.req.v_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(1, output.req.v_maj);
-    CPPUNIT_ASSERT_EQUAL(1, output.req.v_min);
-    input.reset();
+    {
+        input.append("HELLOWORLD / HTTP/1.1\n", 22);
+        //printf("TEST: '%s'\n",input.content());
+        output.reset(input.content(), input.contentSize());
+        CPPUNIT_ASSERT_EQUAL(1, HttpParserParseReqLine(&output));
+        CPPUNIT_ASSERT_EQUAL(Http::scOkay, output.request_parse_status);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.start);
+        CPPUNIT_ASSERT_EQUAL((int)input.contentSize()-1, output.req.end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("HELLOWORLD / HTTP/1.1\n", &output.buf[output.req.start],(output.req.end-output.req.start+1)));
+        CPPUNIT_ASSERT_EQUAL(0, output.req.m_start);
+        CPPUNIT_ASSERT_EQUAL(9, output.req.m_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("HELLOWORLD", &output.buf[output.req.m_start],(output.req.m_end-output.req.m_start+1)));
+        CPPUNIT_ASSERT_EQUAL(11, output.req.u_start);
+        CPPUNIT_ASSERT_EQUAL(11, output.req.u_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("/", &output.buf[output.req.u_start],(output.req.u_end-output.req.u_start+1)));
+        CPPUNIT_ASSERT_EQUAL(13, output.req.v_start);
+        CPPUNIT_ASSERT_EQUAL(20, output.req.v_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("HTTP/1.1", &output.buf[output.req.v_start],(output.req.v_end-output.req.v_start+1)));
+        CPPUNIT_ASSERT_EQUAL(1, output.req.v_maj);
+        CPPUNIT_ASSERT_EQUAL(1, output.req.v_min);
+        input.reset();
+    }
 
     // method-only
-    input.append("A\n", 2);
-    //printf("TEST: '%s'\n",input.content());
-    output.reset(input.content(), input.contentSize());
-    CPPUNIT_ASSERT_EQUAL(-1, HttpParserParseReqLine(&output));
-    CPPUNIT_ASSERT_EQUAL(Http::scBadRequest, output.request_parse_status);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.start);
-    CPPUNIT_ASSERT_EQUAL((int)input.contentSize()-1, output.req.end);
-    CPPUNIT_ASSERT(memcmp("A\n", &output.buf[output.req.start],(output.req.end-output.req.start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.m_start);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.m_end);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.u_start);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.u_end);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.v_start);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.v_end);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.v_maj);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.v_min);
-    input.reset();
+    {
+        input.append("A\n", 2);
+        //printf("TEST: '%s'\n",input.content());
+        output.reset(input.content(), input.contentSize());
+        CPPUNIT_ASSERT_EQUAL(-1, HttpParserParseReqLine(&output));
+        CPPUNIT_ASSERT_EQUAL(Http::scBadRequest, output.request_parse_status);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.start);
+        CPPUNIT_ASSERT_EQUAL((int)input.contentSize()-1, output.req.end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("A\n", &output.buf[output.req.start],(output.req.end-output.req.start+1)));
+        CPPUNIT_ASSERT_EQUAL(0, output.req.m_start);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.m_end);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.u_start);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.u_end);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.v_start);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.v_end);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.v_maj);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.v_min);
+        input.reset();
+    }
 
     input.append("GET\n", 4);
-    //printf("TEST: '%s'\n",input.content());
-    output.reset(input.content(), input.contentSize());
-    CPPUNIT_ASSERT_EQUAL(-1, HttpParserParseReqLine(&output));
-    CPPUNIT_ASSERT_EQUAL(Http::scBadRequest, output.request_parse_status);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.start);
-    CPPUNIT_ASSERT_EQUAL((int)input.contentSize()-1, output.req.end);
-    CPPUNIT_ASSERT(memcmp("GET\n", &output.buf[output.req.start],(output.req.end-output.req.start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.m_start);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.m_end);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.u_start);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.u_end);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.v_start);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.v_end);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.v_maj);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.v_min);
-    input.reset();
+    {
+        //printf("TEST: '%s'\n",input.content());
+        output.reset(input.content(), input.contentSize());
+        CPPUNIT_ASSERT_EQUAL(-1, HttpParserParseReqLine(&output));
+        CPPUNIT_ASSERT_EQUAL(Http::scBadRequest, output.request_parse_status);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.start);
+        CPPUNIT_ASSERT_EQUAL((int)input.contentSize()-1, output.req.end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("GET\n", &output.buf[output.req.start],(output.req.end-output.req.start+1)));
+        CPPUNIT_ASSERT_EQUAL(0, output.req.m_start);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.m_end);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.u_start);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.u_end);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.v_start);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.v_end);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.v_maj);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.v_min);
+        input.reset();
+    }
 
     // RELAXED space padded method (in strict mode SP is reserved so invalid as a method byte)
-    input.append(" GET / HTTP/1.1\n", 16);
-    //printf("TEST: '%s'\n",input.content());
-    output.reset(input.content(), input.contentSize());
-    Config.onoff.relaxed_header_parser = 1;
-    CPPUNIT_ASSERT_EQUAL(1, HttpParserParseReqLine(&output));
-    CPPUNIT_ASSERT_EQUAL(Http::scOkay, output.request_parse_status);
-    CPPUNIT_ASSERT_EQUAL(1, output.req.start);
-    CPPUNIT_ASSERT_EQUAL((int)input.contentSize()-1, output.req.end);
-    CPPUNIT_ASSERT(memcmp("GET / HTTP/1.1\n", &output.buf[output.req.start],(output.req.end-output.req.start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(1, output.req.m_start);
-    CPPUNIT_ASSERT_EQUAL(3, output.req.m_end);
-    CPPUNIT_ASSERT(memcmp("GET", &output.buf[output.req.m_start],(output.req.m_end-output.req.m_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(5, output.req.u_start);
-    CPPUNIT_ASSERT_EQUAL(5, output.req.u_end);
-    CPPUNIT_ASSERT(memcmp("/", &output.buf[output.req.u_start],(output.req.u_end-output.req.u_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(7, output.req.v_start);
-    CPPUNIT_ASSERT_EQUAL(14, output.req.v_end);
-    CPPUNIT_ASSERT(memcmp("HTTP/1.1", &output.buf[output.req.v_start],(output.req.v_end-output.req.v_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(1, output.req.v_maj);
-    CPPUNIT_ASSERT_EQUAL(1, output.req.v_min);
-    input.reset();
+    {
+        input.append(" GET / HTTP/1.1\n", 16);
+        //printf("TEST: '%s'\n",input.content());
+        output.reset(input.content(), input.contentSize());
+        Config.onoff.relaxed_header_parser = 1;
+        CPPUNIT_ASSERT_EQUAL(1, HttpParserParseReqLine(&output));
+        CPPUNIT_ASSERT_EQUAL(Http::scOkay, output.request_parse_status);
+        CPPUNIT_ASSERT_EQUAL(1, output.req.start);
+        CPPUNIT_ASSERT_EQUAL((int)input.contentSize()-1, output.req.end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("GET / HTTP/1.1\n", &output.buf[output.req.start],(output.req.end-output.req.start+1)));
+        CPPUNIT_ASSERT_EQUAL(1, output.req.m_start);
+        CPPUNIT_ASSERT_EQUAL(3, output.req.m_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("GET", &output.buf[output.req.m_start],(output.req.m_end-output.req.m_start+1)));
+        CPPUNIT_ASSERT_EQUAL(5, output.req.u_start);
+        CPPUNIT_ASSERT_EQUAL(5, output.req.u_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("/", &output.buf[output.req.u_start],(output.req.u_end-output.req.u_start+1)));
+        CPPUNIT_ASSERT_EQUAL(7, output.req.v_start);
+        CPPUNIT_ASSERT_EQUAL(14, output.req.v_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("HTTP/1.1", &output.buf[output.req.v_start],(output.req.v_end-output.req.v_start+1)));
+        CPPUNIT_ASSERT_EQUAL(1, output.req.v_maj);
+        CPPUNIT_ASSERT_EQUAL(1, output.req.v_min);
+        input.reset();
+    }
 
     // STRICT space padded method (in strict mode SP is reserved so invalid as a method byte)
-    input.append(" GET / HTTP/1.1\n", 16);
-    //printf("TEST: '%s'\n",input.content());
-    output.reset(input.content(), input.contentSize());
-    Config.onoff.relaxed_header_parser = 0;
-    CPPUNIT_ASSERT_EQUAL(-1, HttpParserParseReqLine(&output));
-    CPPUNIT_ASSERT_EQUAL(Http::scBadRequest, output.request_parse_status);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.start);
-    CPPUNIT_ASSERT_EQUAL((int)input.contentSize()-1, output.req.end);
-    CPPUNIT_ASSERT(memcmp(" GET / HTTP/1.1\n", &output.buf[output.req.start],(output.req.end-output.req.start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.m_start);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.m_end);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.u_start);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.u_end);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.v_start);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.v_end);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.v_maj);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.v_min);
-    input.reset();
+    {
+        input.append(" GET / HTTP/1.1\n", 16);
+        //printf("TEST: '%s'\n",input.content());
+        output.reset(input.content(), input.contentSize());
+        Config.onoff.relaxed_header_parser = 0;
+        CPPUNIT_ASSERT_EQUAL(-1, HttpParserParseReqLine(&output));
+        CPPUNIT_ASSERT_EQUAL(Http::scBadRequest, output.request_parse_status);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.start);
+        CPPUNIT_ASSERT_EQUAL((int)input.contentSize()-1, output.req.end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp(" GET / HTTP/1.1\n", &output.buf[output.req.start],(output.req.end-output.req.start+1)));
+        CPPUNIT_ASSERT_EQUAL(0, output.req.m_start);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.m_end);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.u_start);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.u_end);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.v_start);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.v_end);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.v_maj);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.v_min);
+        input.reset();
+    }
 
     // tab padded method (NP: tab is not SP so treated as any other binary)
-    input.append("\tGET / HTTP/1.1\n", 16);
-    //printf("TEST: '%s'\n",input.content());
-    output.reset(input.content(), input.contentSize());
-    CPPUNIT_ASSERT_EQUAL(1, HttpParserParseReqLine(&output));
-    CPPUNIT_ASSERT_EQUAL(Http::scOkay, output.request_parse_status);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.start);
-    CPPUNIT_ASSERT_EQUAL((int)input.contentSize()-1, output.req.end);
-    CPPUNIT_ASSERT(memcmp("\tGET / HTTP/1.1\n", &output.buf[output.req.start],(output.req.end-output.req.start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.m_start);
-    CPPUNIT_ASSERT_EQUAL(3, output.req.m_end);
-    CPPUNIT_ASSERT(memcmp("\tGET", &output.buf[output.req.m_start],(output.req.m_end-output.req.m_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(5, output.req.u_start);
-    CPPUNIT_ASSERT_EQUAL(5, output.req.u_end);
-    CPPUNIT_ASSERT(memcmp("/", &output.buf[output.req.u_start],(output.req.u_end-output.req.u_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(7, output.req.v_start);
-    CPPUNIT_ASSERT_EQUAL(14, output.req.v_end);
-    CPPUNIT_ASSERT(memcmp("HTTP/1.1", &output.buf[output.req.v_start],(output.req.v_end-output.req.v_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(1, output.req.v_maj);
-    CPPUNIT_ASSERT_EQUAL(1, output.req.v_min);
-    input.reset();
+    {
+        input.append("\tGET / HTTP/1.1\n", 16);
+        //printf("TEST: '%s'\n",input.content());
+        output.reset(input.content(), input.contentSize());
+        CPPUNIT_ASSERT_EQUAL(1, HttpParserParseReqLine(&output));
+        CPPUNIT_ASSERT_EQUAL(Http::scOkay, output.request_parse_status);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.start);
+        CPPUNIT_ASSERT_EQUAL((int)input.contentSize()-1, output.req.end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("\tGET / HTTP/1.1\n", &output.buf[output.req.start],(output.req.end-output.req.start+1)));
+        CPPUNIT_ASSERT_EQUAL(0, output.req.m_start);
+        CPPUNIT_ASSERT_EQUAL(3, output.req.m_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("\tGET", &output.buf[output.req.m_start],(output.req.m_end-output.req.m_start+1)));
+        CPPUNIT_ASSERT_EQUAL(5, output.req.u_start);
+        CPPUNIT_ASSERT_EQUAL(5, output.req.u_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("/", &output.buf[output.req.u_start],(output.req.u_end-output.req.u_start+1)));
+        CPPUNIT_ASSERT_EQUAL(7, output.req.v_start);
+        CPPUNIT_ASSERT_EQUAL(14, output.req.v_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("HTTP/1.1", &output.buf[output.req.v_start],(output.req.v_end-output.req.v_start+1)));
+        CPPUNIT_ASSERT_EQUAL(1, output.req.v_maj);
+        CPPUNIT_ASSERT_EQUAL(1, output.req.v_min);
+        input.reset();
+    }
 }
 
 void
@@ -791,236 +850,258 @@ testHttpParser::testParseRequestLineInvalid()
     input.init();
 
     // no method (but in a form which is ambiguous with HTTP/0.9 simple-request)
-    // XXX: Bug: HTTP/0.9 requires method to be "GET"
-    input.append("/ HTTP/1.0\n", 11);
-    //printf("TEST: '%s'\n",input.content());
-    output.reset(input.content(), input.contentSize());
-    CPPUNIT_ASSERT_EQUAL(1, HttpParserParseReqLine(&output));
-    CPPUNIT_ASSERT_EQUAL(Http::scOkay, output.request_parse_status);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.start);
-    CPPUNIT_ASSERT_EQUAL((int)input.contentSize()-1, output.req.end);
-    CPPUNIT_ASSERT(memcmp("/ HTTP/1.0\n", &output.buf[output.req.start],(output.req.end-output.req.start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.m_start);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.m_end);
-    CPPUNIT_ASSERT(memcmp("/", &output.buf[output.req.m_start],(output.req.m_end-output.req.m_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(2, output.req.u_start);
-    CPPUNIT_ASSERT_EQUAL(9, output.req.u_end);
-    CPPUNIT_ASSERT(memcmp("HTTP/1.0", &output.buf[output.req.u_start],(output.req.u_end-output.req.u_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.v_start);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.v_end);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.v_maj);
-    CPPUNIT_ASSERT_EQUAL(9, output.req.v_min);
-    input.reset();
+    {
+        // XXX: Bug: HTTP/0.9 requires method to be "GET"
+        input.append("/ HTTP/1.0\n", 11);
+        //printf("TEST: '%s'\n",input.content());
+        output.reset(input.content(), input.contentSize());
+        CPPUNIT_ASSERT_EQUAL(1, HttpParserParseReqLine(&output));
+        CPPUNIT_ASSERT_EQUAL(Http::scOkay, output.request_parse_status);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.start);
+        CPPUNIT_ASSERT_EQUAL((int)input.contentSize()-1, output.req.end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("/ HTTP/1.0\n", &output.buf[output.req.start],(output.req.end-output.req.start+1)));
+        CPPUNIT_ASSERT_EQUAL(0, output.req.m_start);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.m_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("/", &output.buf[output.req.m_start],(output.req.m_end-output.req.m_start+1)));
+        CPPUNIT_ASSERT_EQUAL(2, output.req.u_start);
+        CPPUNIT_ASSERT_EQUAL(9, output.req.u_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("HTTP/1.0", &output.buf[output.req.u_start],(output.req.u_end-output.req.u_start+1)));
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.v_start);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.v_end);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.v_maj);
+        CPPUNIT_ASSERT_EQUAL(9, output.req.v_min);
+        input.reset();
+    }
 
     // RELAXED no method (an invalid format)
-    input.append(" / HTTP/1.0\n", 12);
-    //printf("TEST: '%s'\n",input.content());
-    output.reset(input.content(), input.contentSize());
-    // When tolerantly ignoring SP prefix this case becomes ambiguous with HTTP/0.9 simple-request)
-    Config.onoff.relaxed_header_parser = 1;
-    CPPUNIT_ASSERT_EQUAL(1, HttpParserParseReqLine(&output));
-    CPPUNIT_ASSERT_EQUAL(Http::scOkay, output.request_parse_status);
-    CPPUNIT_ASSERT_EQUAL(1, output.req.start);
-    CPPUNIT_ASSERT_EQUAL((int)input.contentSize()-1, output.req.end);
-    CPPUNIT_ASSERT(memcmp("/ HTTP/1.0\n", &output.buf[output.req.start],(output.req.end-output.req.start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(1, output.req.m_start);
-    CPPUNIT_ASSERT_EQUAL(1, output.req.m_end);
-    CPPUNIT_ASSERT(memcmp("/", &output.buf[output.req.m_start],(output.req.m_end-output.req.m_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(3, output.req.u_start);
-    CPPUNIT_ASSERT_EQUAL(10, output.req.u_end);
-    CPPUNIT_ASSERT(memcmp("HTTP/1.0", &output.buf[output.req.u_start],(output.req.u_end-output.req.u_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.v_start);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.v_end);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.v_maj);
-    CPPUNIT_ASSERT_EQUAL(9, output.req.v_min);
-    input.reset();
+    {
+        input.append(" / HTTP/1.0\n", 12);
+        //printf("TEST: '%s'\n",input.content());
+        output.reset(input.content(), input.contentSize());
+        // When tolerantly ignoring SP prefix this case becomes ambiguous with HTTP/0.9 simple-request)
+        Config.onoff.relaxed_header_parser = 1;
+        CPPUNIT_ASSERT_EQUAL(1, HttpParserParseReqLine(&output));
+        CPPUNIT_ASSERT_EQUAL(Http::scOkay, output.request_parse_status);
+        CPPUNIT_ASSERT_EQUAL(1, output.req.start);
+        CPPUNIT_ASSERT_EQUAL((int)input.contentSize()-1, output.req.end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("/ HTTP/1.0\n", &output.buf[output.req.start],(output.req.end-output.req.start+1)));
+        CPPUNIT_ASSERT_EQUAL(1, output.req.m_start);
+        CPPUNIT_ASSERT_EQUAL(1, output.req.m_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("/", &output.buf[output.req.m_start],(output.req.m_end-output.req.m_start+1)));
+        CPPUNIT_ASSERT_EQUAL(3, output.req.u_start);
+        CPPUNIT_ASSERT_EQUAL(10, output.req.u_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("HTTP/1.0", &output.buf[output.req.u_start],(output.req.u_end-output.req.u_start+1)));
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.v_start);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.v_end);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.v_maj);
+        CPPUNIT_ASSERT_EQUAL(9, output.req.v_min);
+        input.reset();
+    }
 
     // STRICT no method (an invalid format)
-    input.append(" / HTTP/1.0\n", 12);
-    //printf("TEST: '%s'\n",input.content());
-    output.reset(input.content(), input.contentSize());
-    // When tolerantly ignoring SP prefix this case becomes ambiguous with HTTP/0.9 simple-request)
-    Config.onoff.relaxed_header_parser = 0;
-    CPPUNIT_ASSERT_EQUAL(-1, HttpParserParseReqLine(&output));
-    CPPUNIT_ASSERT_EQUAL(Http::scBadRequest, output.request_parse_status);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.start);
-    CPPUNIT_ASSERT_EQUAL((int)input.contentSize()-1, output.req.end);
-    CPPUNIT_ASSERT(memcmp(" / HTTP/1.0\n", &output.buf[output.req.start],(output.req.end-output.req.start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.m_start);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.m_end);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.u_start);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.u_end);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.v_start);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.v_end);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.v_maj);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.v_min);
-    input.reset();
+    {
+        input.append(" / HTTP/1.0\n", 12);
+        //printf("TEST: '%s'\n",input.content());
+        output.reset(input.content(), input.contentSize());
+        // When tolerantly ignoring SP prefix this case becomes ambiguous with HTTP/0.9 simple-request)
+        Config.onoff.relaxed_header_parser = 0;
+        CPPUNIT_ASSERT_EQUAL(-1, HttpParserParseReqLine(&output));
+        CPPUNIT_ASSERT_EQUAL(Http::scBadRequest, output.request_parse_status);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.start);
+        CPPUNIT_ASSERT_EQUAL((int)input.contentSize()-1, output.req.end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp(" / HTTP/1.0\n", &output.buf[output.req.start],(output.req.end-output.req.start+1)));
+        CPPUNIT_ASSERT_EQUAL(0, output.req.m_start);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.m_end);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.u_start);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.u_end);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.v_start);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.v_end);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.v_maj);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.v_min);
+        input.reset();
+    }
 
     // binary code in method (strange but ...)
-    input.append("GET\x0B / HTTP/1.1\n", 16);
-    //printf("TEST: %d-%d/%d '%.*s'\n", output.req.start, output.req.end, input.contentSize(), 16, input.content());
-    output.reset(input.content(), input.contentSize());
-    CPPUNIT_ASSERT_EQUAL(1, HttpParserParseReqLine(&output));
-    CPPUNIT_ASSERT_EQUAL(Http::scOkay, output.request_parse_status);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.start);
-    CPPUNIT_ASSERT_EQUAL((int)input.contentSize()-1, output.req.end);
-    CPPUNIT_ASSERT(memcmp("GET\x0B / HTTP/1.1\n", &output.buf[output.req.start],(output.req.end-output.req.start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.m_start);
-    CPPUNIT_ASSERT_EQUAL(3, output.req.m_end);
-    CPPUNIT_ASSERT(memcmp("GET\x0B", &output.buf[output.req.m_start],(output.req.m_end-output.req.m_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(5, output.req.u_start);
-    CPPUNIT_ASSERT_EQUAL(5, output.req.u_end);
-    CPPUNIT_ASSERT(memcmp("/", &output.buf[output.req.u_start],(output.req.u_end-output.req.u_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(7, output.req.v_start);
-    CPPUNIT_ASSERT_EQUAL(14, output.req.v_end);
-    CPPUNIT_ASSERT(memcmp("HTTP/1.1", &output.buf[output.req.v_start],(output.req.v_end-output.req.v_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(1, output.req.v_maj);
-    CPPUNIT_ASSERT_EQUAL(1, output.req.v_min);
-    input.reset();
+    {
+        input.append("GET\x0B / HTTP/1.1\n", 16);
+        //printf("TEST: %d-%d/%d '%.*s'\n", output.req.start, output.req.end, input.contentSize(), 16, input.content());
+        output.reset(input.content(), input.contentSize());
+        CPPUNIT_ASSERT_EQUAL(1, HttpParserParseReqLine(&output));
+        CPPUNIT_ASSERT_EQUAL(Http::scOkay, output.request_parse_status);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.start);
+        CPPUNIT_ASSERT_EQUAL((int)input.contentSize()-1, output.req.end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("GET\x0B / HTTP/1.1\n", &output.buf[output.req.start],(output.req.end-output.req.start+1)));
+        CPPUNIT_ASSERT_EQUAL(0, output.req.m_start);
+        CPPUNIT_ASSERT_EQUAL(3, output.req.m_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("GET\x0B", &output.buf[output.req.m_start],(output.req.m_end-output.req.m_start+1)));
+        CPPUNIT_ASSERT_EQUAL(5, output.req.u_start);
+        CPPUNIT_ASSERT_EQUAL(5, output.req.u_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("/", &output.buf[output.req.u_start],(output.req.u_end-output.req.u_start+1)));
+        CPPUNIT_ASSERT_EQUAL(7, output.req.v_start);
+        CPPUNIT_ASSERT_EQUAL(14, output.req.v_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("HTTP/1.1", &output.buf[output.req.v_start],(output.req.v_end-output.req.v_start+1)));
+        CPPUNIT_ASSERT_EQUAL(1, output.req.v_maj);
+        CPPUNIT_ASSERT_EQUAL(1, output.req.v_min);
+        input.reset();
+    }
 
     // CR in method
-    // RFC 2616 sec 5.1 prohibits CR other than in terminator.
-    input.append("GET\r / HTTP/1.1\r\n", 16);
-    //printf("TEST: '%s'\n",input.content());
-    output.reset(input.content(), input.contentSize());
-    CPPUNIT_ASSERT_EQUAL(-1, HttpParserParseReqLine(&output));
-    CPPUNIT_ASSERT_EQUAL(Http::scBadRequest, output.request_parse_status);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.start);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.end);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.m_start);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.m_end);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.u_start);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.u_end);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.v_start);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.v_end);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.v_maj);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.v_min);
-    input.reset();
+    {
+        // RFC 2616 sec 5.1 prohibits CR other than in terminator.
+        input.append("GET\r / HTTP/1.1\r\n", 16);
+        //printf("TEST: '%s'\n",input.content());
+        output.reset(input.content(), input.contentSize());
+        CPPUNIT_ASSERT_EQUAL(-1, HttpParserParseReqLine(&output));
+        CPPUNIT_ASSERT_EQUAL(Http::scBadRequest, output.request_parse_status);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.start);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.end);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.m_start);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.m_end);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.u_start);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.u_end);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.v_start);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.v_end);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.v_maj);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.v_min);
+        input.reset();
+    }
 
     // binary code NUL! in method (strange but ...)
-    input.append("GET\0 / HTTP/1.1\n", 16);
-    //printf("TEST: %d-%d/%d '%.*s'\n", output.req.start, output.req.end, input.contentSize(), 16, input.content());
-    output.reset(input.content(), input.contentSize());
-    CPPUNIT_ASSERT_EQUAL(1, HttpParserParseReqLine(&output));
-    CPPUNIT_ASSERT_EQUAL(Http::scOkay, output.request_parse_status);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.start);
-    CPPUNIT_ASSERT_EQUAL((int)input.contentSize()-1, output.req.end);
-    CPPUNIT_ASSERT(memcmp("GET\0 / HTTP/1.1\n", &output.buf[output.req.start],(output.req.end-output.req.start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.m_start);
-    CPPUNIT_ASSERT_EQUAL(3, output.req.m_end);
-    CPPUNIT_ASSERT(memcmp("GET\0", &output.buf[output.req.m_start],(output.req.m_end-output.req.m_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(5, output.req.u_start);
-    CPPUNIT_ASSERT_EQUAL(5, output.req.u_end);
-    CPPUNIT_ASSERT(memcmp("/", &output.buf[output.req.u_start],(output.req.u_end-output.req.u_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(7, output.req.v_start);
-    CPPUNIT_ASSERT_EQUAL(14, output.req.v_end);
-    CPPUNIT_ASSERT(memcmp("HTTP/1.1", &output.buf[output.req.v_start],(output.req.v_end-output.req.v_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(1, output.req.v_maj);
-    CPPUNIT_ASSERT_EQUAL(1, output.req.v_min);
-    input.reset();
+    {
+        input.append("GET\0 / HTTP/1.1\n", 16);
+        //printf("TEST: %d-%d/%d '%.*s'\n", output.req.start, output.req.end, input.contentSize(), 16, input.content());
+        output.reset(input.content(), input.contentSize());
+        CPPUNIT_ASSERT_EQUAL(1, HttpParserParseReqLine(&output));
+        CPPUNIT_ASSERT_EQUAL(Http::scOkay, output.request_parse_status);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.start);
+        CPPUNIT_ASSERT_EQUAL((int)input.contentSize()-1, output.req.end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("GET\0 / HTTP/1.1\n", &output.buf[output.req.start],(output.req.end-output.req.start+1)));
+        CPPUNIT_ASSERT_EQUAL(0, output.req.m_start);
+        CPPUNIT_ASSERT_EQUAL(3, output.req.m_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("GET\0", &output.buf[output.req.m_start],(output.req.m_end-output.req.m_start+1)));
+        CPPUNIT_ASSERT_EQUAL(5, output.req.u_start);
+        CPPUNIT_ASSERT_EQUAL(5, output.req.u_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("/", &output.buf[output.req.u_start],(output.req.u_end-output.req.u_start+1)));
+        CPPUNIT_ASSERT_EQUAL(7, output.req.v_start);
+        CPPUNIT_ASSERT_EQUAL(14, output.req.v_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("HTTP/1.1", &output.buf[output.req.v_start],(output.req.v_end-output.req.v_start+1)));
+        CPPUNIT_ASSERT_EQUAL(1, output.req.v_maj);
+        CPPUNIT_ASSERT_EQUAL(1, output.req.v_min);
+        input.reset();
+    }
 
     // no URL (grammer otherwise correct)
-    input.append("GET  HTTP/1.1\n", 14);
-    //printf("TEST: '%s'\n",input.content());
-    output.reset(input.content(), input.contentSize());
-    CPPUNIT_ASSERT_EQUAL(1, HttpParserParseReqLine(&output));
-    CPPUNIT_ASSERT_EQUAL(Http::scOkay, output.request_parse_status);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.start);
-    CPPUNIT_ASSERT_EQUAL((int)input.contentSize()-1, output.req.end);
-    CPPUNIT_ASSERT(memcmp("GET  HTTP/1.1\n", &output.buf[output.req.start],(output.req.end-output.req.start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.m_start);
-    CPPUNIT_ASSERT_EQUAL(2, output.req.m_end);
-    CPPUNIT_ASSERT(memcmp("GET", &output.buf[output.req.m_start],(output.req.m_end-output.req.m_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(5, output.req.u_start);
-    CPPUNIT_ASSERT_EQUAL(12, output.req.u_end);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.v_start);
-    CPPUNIT_ASSERT(memcmp("HTTP/1.1", &output.buf[output.req.u_start],(output.req.u_end-output.req.u_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.v_end);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.v_maj);
-    CPPUNIT_ASSERT_EQUAL(9, output.req.v_min);
-    input.reset();
+    {
+        input.append("GET  HTTP/1.1\n", 14);
+        //printf("TEST: '%s'\n",input.content());
+        output.reset(input.content(), input.contentSize());
+        CPPUNIT_ASSERT_EQUAL(1, HttpParserParseReqLine(&output));
+        CPPUNIT_ASSERT_EQUAL(Http::scOkay, output.request_parse_status);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.start);
+        CPPUNIT_ASSERT_EQUAL((int)input.contentSize()-1, output.req.end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("GET  HTTP/1.1\n", &output.buf[output.req.start],(output.req.end-output.req.start+1)));
+        CPPUNIT_ASSERT_EQUAL(0, output.req.m_start);
+        CPPUNIT_ASSERT_EQUAL(2, output.req.m_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("GET", &output.buf[output.req.m_start],(output.req.m_end-output.req.m_start+1)));
+        CPPUNIT_ASSERT_EQUAL(5, output.req.u_start);
+        CPPUNIT_ASSERT_EQUAL(12, output.req.u_end);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.v_start);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("HTTP/1.1", &output.buf[output.req.u_start],(output.req.u_end-output.req.u_start+1)));
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.v_end);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.v_maj);
+        CPPUNIT_ASSERT_EQUAL(9, output.req.v_min);
+        input.reset();
+    }
 
     // no URL (grammer invalid, ambiguous with RFC 1945 HTTP/0.9 simple-request)
-    input.append("GET HTTP/1.1\n", 13);
-    //printf("TEST: '%s'\n",input.content());
-    output.reset(input.content(), input.contentSize());
-    CPPUNIT_ASSERT_EQUAL(1, HttpParserParseReqLine(&output));
-    CPPUNIT_ASSERT_EQUAL(Http::scOkay, output.request_parse_status);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.start);
-    CPPUNIT_ASSERT_EQUAL((int)input.contentSize()-1, output.req.end);
-    CPPUNIT_ASSERT(memcmp("GET HTTP/1.1\n", &output.buf[output.req.start],(output.req.end-output.req.start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.m_start);
-    CPPUNIT_ASSERT_EQUAL(2, output.req.m_end);
-    CPPUNIT_ASSERT(memcmp("GET", &output.buf[output.req.m_start],(output.req.m_end-output.req.m_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(4, output.req.u_start);
-    CPPUNIT_ASSERT_EQUAL(11, output.req.u_end);
-    CPPUNIT_ASSERT(memcmp("HTTP/1.1", &output.buf[output.req.u_start],(output.req.u_end-output.req.u_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.v_start);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.v_end);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.v_maj);
-    CPPUNIT_ASSERT_EQUAL(9, output.req.v_min);
-    input.reset();
+    {
+        input.append("GET HTTP/1.1\n", 13);
+        //printf("TEST: '%s'\n",input.content());
+        output.reset(input.content(), input.contentSize());
+        CPPUNIT_ASSERT_EQUAL(1, HttpParserParseReqLine(&output));
+        CPPUNIT_ASSERT_EQUAL(Http::scOkay, output.request_parse_status);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.start);
+        CPPUNIT_ASSERT_EQUAL((int)input.contentSize()-1, output.req.end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("GET HTTP/1.1\n", &output.buf[output.req.start],(output.req.end-output.req.start+1)));
+        CPPUNIT_ASSERT_EQUAL(0, output.req.m_start);
+        CPPUNIT_ASSERT_EQUAL(2, output.req.m_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("GET", &output.buf[output.req.m_start],(output.req.m_end-output.req.m_start+1)));
+        CPPUNIT_ASSERT_EQUAL(4, output.req.u_start);
+        CPPUNIT_ASSERT_EQUAL(11, output.req.u_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("HTTP/1.1", &output.buf[output.req.u_start],(output.req.u_end-output.req.u_start+1)));
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.v_start);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.v_end);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.v_maj);
+        CPPUNIT_ASSERT_EQUAL(9, output.req.v_min);
+        input.reset();
+    }
 
     // binary line
-    input.append("\xB\xC\xE\xF\n", 5);
-    //printf("TEST: binary-line\n");
-    output.reset(input.content(), input.contentSize());
-    CPPUNIT_ASSERT_EQUAL(-1, HttpParserParseReqLine(&output));
-    CPPUNIT_ASSERT_EQUAL(Http::scBadRequest, output.request_parse_status);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.start);
-    CPPUNIT_ASSERT_EQUAL((int)input.contentSize()-1, output.req.end);
-    CPPUNIT_ASSERT(memcmp("\xB\xC\xE\xF\n", &output.buf[output.req.start],(output.req.end-output.req.start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.m_start);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.m_end);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.u_start);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.u_end);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.v_start);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.v_end);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.v_maj);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.v_min);
-    input.reset();
+    {
+        input.append("\xB\xC\xE\xF\n", 5);
+        //printf("TEST: binary-line\n");
+        output.reset(input.content(), input.contentSize());
+        CPPUNIT_ASSERT_EQUAL(-1, HttpParserParseReqLine(&output));
+        CPPUNIT_ASSERT_EQUAL(Http::scBadRequest, output.request_parse_status);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.start);
+        CPPUNIT_ASSERT_EQUAL((int)input.contentSize()-1, output.req.end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("\xB\xC\xE\xF\n", &output.buf[output.req.start],(output.req.end-output.req.start+1)));
+        CPPUNIT_ASSERT_EQUAL(0, output.req.m_start);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.m_end);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.u_start);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.u_end);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.v_start);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.v_end);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.v_maj);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.v_min);
+        input.reset();
+    }
 
     // mixed whitespace line
-    // We accept non-space binary bytes for method so first \t shows up as that
-    // but remaining space and tabs are skipped searching for URI-start
-    input.append("\t \t \t\n", 6);
-    //printf("TEST: mixed whitespace\n");
-    output.reset(input.content(), input.contentSize());
-    CPPUNIT_ASSERT_EQUAL(-1, HttpParserParseReqLine(&output));
-    CPPUNIT_ASSERT_EQUAL(Http::scBadRequest, output.request_parse_status);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.start);
-    CPPUNIT_ASSERT_EQUAL((int)input.contentSize()-1, output.req.end);
-    CPPUNIT_ASSERT(memcmp("\t \t \t\n", &output.buf[output.req.start],(output.req.end-output.req.start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.m_start);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.m_end);
-    CPPUNIT_ASSERT(memcmp("\t", &output.buf[output.req.m_start],(output.req.m_end-output.req.m_start+1)) == 0);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.u_start);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.u_end);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.v_start);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.v_end);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.v_maj);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.v_min);
-    input.reset();
+    {
+        // We accept non-space binary bytes for method so first \t shows up as that
+        // but remaining space and tabs are skipped searching for URI-start
+        input.append("\t \t \t\n", 6);
+        //printf("TEST: mixed whitespace\n");
+        output.reset(input.content(), input.contentSize());
+        CPPUNIT_ASSERT_EQUAL(-1, HttpParserParseReqLine(&output));
+        CPPUNIT_ASSERT_EQUAL(Http::scBadRequest, output.request_parse_status);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.start);
+        CPPUNIT_ASSERT_EQUAL((int)input.contentSize()-1, output.req.end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("\t \t \t\n", &output.buf[output.req.start],(output.req.end-output.req.start+1)));
+        CPPUNIT_ASSERT_EQUAL(0, output.req.m_start);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.m_end);
+        CPPUNIT_ASSERT_EQUAL(0, memcmp("\t", &output.buf[output.req.m_start],(output.req.m_end-output.req.m_start+1)));
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.u_start);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.u_end);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.v_start);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.v_end);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.v_maj);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.v_min);
+        input.reset();
+    }
 
     // mixed whitespace line with CR middle
-    // CR aborts on sight, so even initial \t method is not marked as above
-    // (not when parsing clean with whole line available anyway)
-    input.append("\t  \r \n", 6);
-    //printf("TEST: mixed whitespace with CR\n");
-    output.reset(input.content(), input.contentSize());
-    CPPUNIT_ASSERT_EQUAL(-1, HttpParserParseReqLine(&output));
-    CPPUNIT_ASSERT_EQUAL(Http::scBadRequest, output.request_parse_status);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.start);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.end);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.m_start);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.m_end);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.u_start);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.u_end);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.v_start);
-    CPPUNIT_ASSERT_EQUAL(-1, output.req.v_end);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.v_maj);
-    CPPUNIT_ASSERT_EQUAL(0, output.req.v_min);
-    input.reset();
+    {
+        // CR aborts on sight, so even initial \t method is not marked as above
+        // (not when parsing clean with whole line available anyway)
+        input.append("\t  \r \n", 6);
+        //printf("TEST: mixed whitespace with CR\n");
+        output.reset(input.content(), input.contentSize());
+        CPPUNIT_ASSERT_EQUAL(-1, HttpParserParseReqLine(&output));
+        CPPUNIT_ASSERT_EQUAL(Http::scBadRequest, output.request_parse_status);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.start);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.end);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.m_start);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.m_end);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.u_start);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.u_end);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.v_start);
+        CPPUNIT_ASSERT_EQUAL(-1, output.req.v_end);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.v_maj);
+        CPPUNIT_ASSERT_EQUAL(0, output.req.v_min);
+        input.reset();
+    }
 }
 
 void
index 04aa5ab9a84da4a74b90e64e489fe62083f3f9c3..d3c378b957fe2c3e5554c9197e11c7bd8fcabdc1 100644 (file)
@@ -2,12 +2,12 @@
 #include "squid.h"
 #include <cppunit/TestAssert.h>
 
-#include "testHttpReply.h"
 #include "HttpHeader.h"
 #include "HttpReply.h"
 #include "Mem.h"
 #include "mime_header.h"
 #include "SquidConfig.h"
+#include "testHttpReply.h"
 
 CPPUNIT_TEST_SUITE_REGISTRATION( testHttpReply );
 
index 1f1ce12faf8e5525e6a8c7b3783cd0947adcac74..a44fc213f2109738be35f3a7a8e710c3708c0dbc 100644 (file)
@@ -3,11 +3,11 @@
 
 #include <cppunit/TestAssert.h>
 
-#include "testHttpRequest.h"
 #include "HttpHeader.h"
 #include "HttpRequest.h"
 #include "Mem.h"
 #include "mime_header.h"
+#include "testHttpRequest.h"
 
 CPPUNIT_TEST_SUITE_REGISTRATION( testHttpRequest );
 
index 3855514c22626057211d5e4bad7bf24fe9a85d33..1e83ed1ce3c402e504107e4cbcbcd163cdffecb9 100644 (file)
@@ -3,9 +3,9 @@
 #include "squid.h"
 #include <cppunit/TestAssert.h>
 
+#include "HttpRequestMethod.h"
 #include "Mem.h"
 #include "testHttpRequestMethod.h"
-#include "HttpRequestMethod.h"
 
 #if HAVE_SSTREAM
 #include <sstream>
index f1d7e3b1b3399000bccf7f41984d3651a6160d64..3f209553b712e0999d14f0d9576350a87658ece4 100644 (file)
@@ -222,7 +222,7 @@ testRock::testRockCreate()
 {
     struct stat sb;
 
-    CPPUNIT_ASSERT(::stat(TESTDIR, &sb) == 0);
+    CPPUNIT_ASSERT_EQUAL(0, ::stat(TESTDIR, &sb));
 
     /* TODO: check the size */
 
@@ -240,8 +240,8 @@ testRock::testRockSwapOut()
 
         StoreEntry *const pe = addEntry(i);
 
-        CPPUNIT_ASSERT(pe->swap_status == SWAPOUT_WRITING);
-        CPPUNIT_ASSERT(pe->swap_dirn == 0);
+        CPPUNIT_ASSERT_EQUAL(SWAPOUT_WRITING, pe->swap_status);
+        CPPUNIT_ASSERT_EQUAL(0, pe->swap_dirn);
         CPPUNIT_ASSERT(pe->swap_filen >= 0);
 
         // Rock::IoState::finishedWriting() schedules an AsyncCall
@@ -249,7 +249,7 @@ testRock::testRockSwapOut()
         StockEventLoop loop;
         loop.run();
 
-        CPPUNIT_ASSERT(pe->swap_status == SWAPOUT_DONE);
+        CPPUNIT_ASSERT_EQUAL(SWAPOUT_DONE, pe->swap_status);
 
         pe->unlock();
     }
@@ -260,31 +260,30 @@ testRock::testRockSwapOut()
     {
         StoreEntry *const pe = addEntry(4);
 
-        CPPUNIT_ASSERT(pe->swap_status == SWAPOUT_WRITING);
-        CPPUNIT_ASSERT(pe->swap_dirn == 0);
+        CPPUNIT_ASSERT_EQUAL(SWAPOUT_WRITING, pe->swap_status);
+        CPPUNIT_ASSERT_EQUAL(0, pe->swap_dirn);
         CPPUNIT_ASSERT(pe->swap_filen >= 0);
 
         StockEventLoop loop;
         loop.run();
 
-        CPPUNIT_ASSERT(pe->swap_status == SWAPOUT_DONE);
+        CPPUNIT_ASSERT_EQUAL(SWAPOUT_DONE, pe->swap_status);
     }
 
     // try to swap out entry to a used locked slot
     {
         StoreEntry *const pe = addEntry(5);
 
-        CPPUNIT_ASSERT(pe->swap_status == SWAPOUT_WRITING);
-        CPPUNIT_ASSERT(pe->swap_dirn == 0);
+        CPPUNIT_ASSERT_EQUAL(SWAPOUT_WRITING, pe->swap_status);
+        CPPUNIT_ASSERT_EQUAL(0, pe->swap_dirn);
         CPPUNIT_ASSERT(pe->swap_filen >= 0);
 
         // the slot is locked here because the async calls have not run yet
         StoreEntry *const pe2 = addEntry(5);
-        CPPUNIT_ASSERT(pe2->swap_status == SWAPOUT_NONE);
-        CPPUNIT_ASSERT(pe2->mem_obj->swapout.decision ==
-                       MemObject::SwapOut::swImpossible);
-        CPPUNIT_ASSERT(pe2->swap_dirn == -1);
-        CPPUNIT_ASSERT(pe2->swap_filen == -1);
+        CPPUNIT_ASSERT_EQUAL(SWAPOUT_NONE, pe2->swap_status);
+        CPPUNIT_ASSERT_EQUAL(MemObject::SwapOut::swImpossible, pe2->mem_obj->swapout.decision);
+        CPPUNIT_ASSERT_EQUAL(-1, pe2->swap_dirn);
+        CPPUNIT_ASSERT_EQUAL(-1, pe2->swap_filen);
 
         StockEventLoop loop;
         loop.run();
@@ -300,6 +299,6 @@ testRock::testRockSwapOut()
         pe->unlink();
 
         StoreEntry *const pe2 = getEntry(i);
-        CPPUNIT_ASSERT(pe2 == NULL);
+        CPPUNIT_ASSERT_EQUAL(static_cast<StoreEntry *>(NULL), pe2);
     }
 }
index 49561b453a2af7c0bab89d417e34f6c3578c4c9e..b424444eb213cbe45dd3c329f08c2dedf06c691b 100644 (file)
@@ -1,10 +1,10 @@
 #include "squid.h"
 #include "Mem.h"
 #include "SBuf.h"
+#include "SBufFindTest.h"
 #include "SBufStream.h"
 #include "SquidString.h"
 #include "testSBuf.h"
-#include "SBufFindTest.h"
 
 #include <iostream>
 #include <stdexcept>
@@ -674,7 +674,8 @@ testSBuf::testScanf()
     CPPUNIT_ASSERT_EQUAL(static_cast<float>(123.5),f);
 }
 
-void testSBuf::testCopy()
+void
+testSBuf::testCopy()
 {
     char buf[40]; //shorter than literal()
     SBuf s(fox1),s2;
@@ -687,7 +688,8 @@ void testSBuf::testCopy()
     CPPUNIT_ASSERT_EQUAL(s2,s);
 }
 
-void testSBuf::testStringOps()
+void
+testSBuf::testStringOps()
 {
     SBuf sng(literal.toLower()),
     ref("the quick brown fox jumped over the lazy dog");
@@ -700,7 +702,8 @@ void testSBuf::testStringOps()
     CPPUNIT_ASSERT_EQUAL(0,SBuf("the").compare(SBuf("THE"),caseInsensitive,6));
 }
 
-void testSBuf::testGrow()
+void
+testSBuf::testGrow()
 {
     SBuf t;
     t.assign("foo");
@@ -714,7 +717,8 @@ void testSBuf::testGrow()
     CPPUNIT_ASSERT_EQUAL(ref,match);
 }
 
-void testSBuf::testStartsWith()
+void
+testSBuf::testStartsWith()
 {
     static SBuf casebuf("THE QUICK");
     CPPUNIT_ASSERT(literal.startsWith(SBuf(fox1)));
@@ -730,7 +734,8 @@ void testSBuf::testStartsWith()
     CPPUNIT_ASSERT_EQUAL(false,literal.startsWith(casebuf,caseInsensitive));
 }
 
-void testSBuf::testSBufStream()
+void
+testSBuf::testSBufStream()
 {
     SBuf b("const.string, int 10 and a float 10.5");
     SBufStream ss;
@@ -747,7 +752,8 @@ void testSBuf::testSBufStream()
     CPPUNIT_ASSERT_EQUAL(f1,SBuf(fox1));
 }
 
-void testSBuf::testFindFirstOf()
+void
+testSBuf::testFindFirstOf()
 {
     SBuf haystack(literal);
     SBuf::size_type idx;
@@ -769,13 +775,15 @@ void testSBuf::testFindFirstOf()
     CPPUNIT_ASSERT_EQUAL(4U,idx);
 }
 
-void testSBuf::testAutoFind()
+void
+testSBuf::testAutoFind()
 {
     SBufFindTest test;
     test.run();
 }
 
-void testSBuf::testStdStringOps()
+void
+testSBuf::testStdStringOps()
 {
     const char *alphabet="abcdefghijklmnopqrstuvwxyz";
     std::string astr(alphabet);
index c6254c071a98ec28a98963afdb5ae61e5116b55a..1bb824f175ae6e536ba408700a9f0ce6eaf78105 100644 (file)
@@ -1,7 +1,7 @@
 #define SQUID_UNIT_TEST 1
 #include "squid.h"
-#include "testStatHist.h"
 #include "StatHist.h"
+#include "testStatHist.h"
 
 CPPUNIT_TEST_SUITE_REGISTRATION(testStatHist);
 
@@ -73,3 +73,25 @@ testStatHist::testStatHistLog()
     test.count(max);
     //CPPUNIT_ASSERT(test.val(capacity-1)==1); //FIXME: val() returns a density
 }
+
+void
+testStatHist::testStatHistSum()
+{
+    InspectingStatHist s1, s2;
+    s1.logInit(30,1.0,100.0);
+    s2.logInit(30,1.0,100.0);
+    s1.count(3);
+    s2.count(30);
+    InspectingStatHist ts1, ts2;
+    ts1=s1;
+    ts1+=s2;
+    ts2=s2;
+    ts2+=s1;
+    CPPUNIT_ASSERT(ts1 == ts2);
+    InspectingStatHist ts3;
+    ts3.logInit(30,1.0,100.0);
+    ts3.count(3);
+    ts3.count(30);
+    CPPUNIT_ASSERT(ts3 == ts1);
+
+}
index 9572c8dd316aa832398d06207844057c8e5cb217..c76c0c54b8b30ad0465472db290d5082e9f9511b 100644 (file)
@@ -13,6 +13,7 @@ class testStatHist : public CPPUNIT_NS::TestFixture
     CPPUNIT_TEST( testStatHistBaseEquality );
     CPPUNIT_TEST( testStatHistBaseAssignment );
     CPPUNIT_TEST( testStatHistLog );
+    CPPUNIT_TEST( testStatHistSum );
     CPPUNIT_TEST_SUITE_END();
 
 public:
@@ -21,6 +22,7 @@ protected:
     void testStatHistBaseEquality();
     void testStatHistBaseAssignment();
     void testStatHistLog();
+    void testStatHistSum();
 };
 
 #endif /* TESTSTATHIST_H_ */
index 0c4989d25a814a669fb015108e6a2955c27aac80..ab2b01c157854b8f006ee7d7bb330030424902cd 100644 (file)
@@ -1,8 +1,8 @@
 #define SQUID_UNIT_TEST 1
 
 #include "squid.h"
-#include "testStore.h"
 #include "Store.h"
+#include "testStore.h"
 
 CPPUNIT_TEST_SUITE_REGISTRATION( testStore );
 
@@ -79,7 +79,7 @@ testStore::testSetRoot()
     StorePointer aStore(new TestStore);
     Store::Root(aStore);
 
-    CPPUNIT_ASSERT(&Store::Root() == aStore.getRaw());
+    CPPUNIT_ASSERT_EQUAL(&Store::Root(),aStore.getRaw());
     Store::Root(NULL);
 }
 
@@ -90,7 +90,7 @@ testStore::testUnsetRoot()
     StorePointer aStore2(new TestStore);
     Store::Root(aStore);
     Store::Root(aStore2);
-    CPPUNIT_ASSERT(&Store::Root() == aStore2.getRaw());
+    CPPUNIT_ASSERT_EQUAL(&Store::Root(),aStore2.getRaw());
     Store::Root(NULL);
 }
 
@@ -99,9 +99,9 @@ testStore::testStats()
 {
     TestStorePointer aStore(new TestStore);
     Store::Root(aStore.getRaw());
-    CPPUNIT_ASSERT(aStore->statsCalled == false);
+    CPPUNIT_ASSERT_EQUAL(false, aStore->statsCalled);
     Store::Stats(NullStoreEntry::getInstance());
-    CPPUNIT_ASSERT(aStore->statsCalled == true);
+    CPPUNIT_ASSERT_EQUAL(true, aStore->statsCalled);
     Store::Root(NULL);
 }
 
@@ -110,6 +110,6 @@ testStore::testMaxSize()
 {
     StorePointer aStore(new TestStore);
     Store::Root(aStore.getRaw());
-    CPPUNIT_ASSERT(aStore->maxSize() == 3);
+    CPPUNIT_ASSERT_EQUAL(static_cast<uint64_t>(3), aStore->maxSize());
     Store::Root(NULL);
 }
index 21e62cece9800005121764d5ab18c0c171c413c5..ccf3e46856b1790160841860f9eb38e34b4088c5 100644 (file)
@@ -1,14 +1,14 @@
 #define SQUID_UNIT_TEST 1
 
 #include "squid.h"
-#include "testStoreController.h"
-#include "Store.h"
-#include "SwapDir.h"
-#include "TestSwapDir.h"
 #include "Mem.h"
 #include "SquidConfig.h"
 #include "SquidTime.h"
+#include "Store.h"
 #include "StoreSearch.h"
+#include "SwapDir.h"
+#include "testStoreController.h"
+#include "TestSwapDir.h"
 
 CPPUNIT_TEST_SUITE_REGISTRATION( testStoreController );
 
@@ -31,12 +31,12 @@ testStoreController::testStats()
     TestSwapDirPointer aStore2 (new TestSwapDir);
     addSwapDir(aStore);
     addSwapDir(aStore2);
-    CPPUNIT_ASSERT(aStore->statsCalled == false);
-    CPPUNIT_ASSERT(aStore2->statsCalled == false);
+    CPPUNIT_ASSERT_EQUAL(false, aStore->statsCalled);
+    CPPUNIT_ASSERT_EQUAL(false, aStore2->statsCalled);
     Store::Stats(logEntry);
     free_cachedir(&Config.cacheSwap);
-    CPPUNIT_ASSERT(aStore->statsCalled == true);
-    CPPUNIT_ASSERT(aStore2->statsCalled == true);
+    CPPUNIT_ASSERT_EQUAL(true, aStore->statsCalled);
+    CPPUNIT_ASSERT_EQUAL(true, aStore2->statsCalled);
     Store::Root(NULL);
 }
 
@@ -71,7 +71,7 @@ testStoreController::testMaxSize()
     TestSwapDirPointer aStore2 (new TestSwapDir);
     addSwapDir(aStore);
     addSwapDir(aStore2);
-    CPPUNIT_ASSERT(Store::Root().maxSize() == 6);
+    CPPUNIT_ASSERT_EQUAL(static_cast<uint64_t>(6), Store::Root().maxSize());
     free_cachedir(&Config.cacheSwap);
     Store::Root(NULL);
 }
@@ -140,47 +140,47 @@ testStoreController::testSearch()
     StoreSearchPointer search = aRoot->search (NULL, NULL); /* search for everything in the store */
 
     /* nothing should be immediately available */
-    CPPUNIT_ASSERT(search->error() == false);
-    CPPUNIT_ASSERT(search->isDone() == false);
-    CPPUNIT_ASSERT(search->currentItem() == NULL);
+    CPPUNIT_ASSERT_EQUAL(false, search->error());
+    CPPUNIT_ASSERT_EQUAL(false, search->isDone());
+    CPPUNIT_ASSERT_EQUAL(static_cast<StoreEntry *>(NULL), search->currentItem());
 #if 0
 
-    CPPUNIT_ASSERT(search->next() == false);
+    CPPUNIT_ASSERT_EQUAL(false, search->next());
 #endif
 
     /* trigger a callback */
     cbcalled = false;
     search->next(searchCallback, NULL);
-    CPPUNIT_ASSERT(cbcalled == true);
+    CPPUNIT_ASSERT_EQUAL(true, cbcalled);
 
     /* we should have access to a entry now, that matches the entry we had before */
-    CPPUNIT_ASSERT(search->error() == false);
-    CPPUNIT_ASSERT(search->isDone() == false);
+    CPPUNIT_ASSERT_EQUAL(false, search->error());
+    CPPUNIT_ASSERT_EQUAL(false, search->isDone());
     /* note the hash order is random - the test happens to be in a nice order */
-    CPPUNIT_ASSERT(search->currentItem() == entry1);
-    //CPPUNIT_ASSERT(search->next() == false);
+    CPPUNIT_ASSERT_EQUAL(entry1, search->currentItem());
+    //CPPUNIT_ASSERT_EQUAL(false, search->next());
 
     /* trigger another callback */
     cbcalled = false;
     search->next(searchCallback, NULL);
-    CPPUNIT_ASSERT(cbcalled == true);
+    CPPUNIT_ASSERT_EQUAL(true, cbcalled);
 
     /* we should have access to a entry now, that matches the entry we had before */
-    CPPUNIT_ASSERT(search->error() == false);
-    CPPUNIT_ASSERT(search->isDone() == false);
-    CPPUNIT_ASSERT(search->currentItem() == entry2);
-    //CPPUNIT_ASSERT(search->next() == false);
+    CPPUNIT_ASSERT_EQUAL(false, search->error());
+    CPPUNIT_ASSERT_EQUAL(false, search->isDone());
+    CPPUNIT_ASSERT_EQUAL(entry2, search->currentItem());
+    //CPPUNIT_ASSERT_EQUAL(false, search->next());
 
     /* trigger another callback */
     cbcalled = false;
     search->next(searchCallback, NULL);
-    CPPUNIT_ASSERT(cbcalled == true);
+    CPPUNIT_ASSERT_EQUAL(true, cbcalled);
 
     /* now we should have no error, we should have finished and have no current item */
-    CPPUNIT_ASSERT(search->error() == false);
-    CPPUNIT_ASSERT(search->isDone() == true);
-    CPPUNIT_ASSERT(search->currentItem() == NULL);
-    //CPPUNIT_ASSERT(search->next() == false);
+    CPPUNIT_ASSERT_EQUAL(false, search->error());
+    CPPUNIT_ASSERT_EQUAL(true, search->isDone());
+    CPPUNIT_ASSERT_EQUAL(static_cast<StoreEntry *>(NULL), search->currentItem());
+    //CPPUNIT_ASSERT_EQUAL(false, search->next());
 
     Store::Root(NULL);
 }
index 4b0abdc4b23495b8e426ed3484c5bc3217fcaed8..28e0818a8de9c49db9f079340b8b4a184c425799 100644 (file)
@@ -1,12 +1,12 @@
 #define SQUID_UNIT_TEST 1
 
 #include "squid.h"
-#include "Mem.h"
-#include "testStore.h"
-#include "testStoreEntryStream.h"
 #include "CapturingStoreEntry.h"
+#include "Mem.h"
 #include "Store.h"
 #include "StoreEntryStream.h"
+#include "testStore.h"
+#include "testStoreEntryStream.h"
 
 #if HAVE_IOMANIP
 #include <iomanip>
index 9d320794f4f83f2f7c217f9f6027b63fe669d5be..8473f05da1f5f820fed198ad431b9bc0fe6d3443 100644 (file)
@@ -1,15 +1,15 @@
 #define SQUID_UNIT_TEST 1
 
 #include "squid.h"
-#include "testStoreHashIndex.h"
-#include "Store.h"
-#include "SwapDir.h"
-#include "TestSwapDir.h"
-#include "StoreHashIndex.h"
 #include "Mem.h"
-#include "StoreSearch.h"
 #include "SquidConfig.h"
 #include "SquidTime.h"
+#include "Store.h"
+#include "StoreHashIndex.h"
+#include "StoreSearch.h"
+#include "SwapDir.h"
+#include "testStoreHashIndex.h"
+#include "TestSwapDir.h"
 
 CPPUNIT_TEST_SUITE_REGISTRATION( testStoreHashIndex );
 
@@ -32,12 +32,12 @@ testStoreHashIndex::testStats()
     TestSwapDirPointer aStore2 (new TestSwapDir);
     addSwapDir(aStore);
     addSwapDir(aStore2);
-    CPPUNIT_ASSERT(aStore->statsCalled == false);
-    CPPUNIT_ASSERT(aStore2->statsCalled == false);
+    CPPUNIT_ASSERT_EQUAL(false, aStore->statsCalled);
+    CPPUNIT_ASSERT_EQUAL(false, aStore2->statsCalled);
     Store::Stats(logEntry);
     free_cachedir(&Config.cacheSwap);
-    CPPUNIT_ASSERT(aStore->statsCalled == true);
-    CPPUNIT_ASSERT(aStore2->statsCalled == true);
+    CPPUNIT_ASSERT_EQUAL(true, aStore->statsCalled);
+    CPPUNIT_ASSERT_EQUAL(true, aStore2->statsCalled);
     Store::Root(NULL);
 }
 
@@ -52,7 +52,7 @@ testStoreHashIndex::testMaxSize()
     TestSwapDirPointer aStore2 (new TestSwapDir);
     addSwapDir(aStore);
     addSwapDir(aStore2);
-    CPPUNIT_ASSERT(Store::Root().maxSize() == 6);
+    CPPUNIT_ASSERT_EQUAL(static_cast<uint64_t>(6), Store::Root().maxSize());
     free_cachedir(&Config.cacheSwap);
     Store::Root(NULL);
 }
@@ -137,47 +137,47 @@ testStoreHashIndex::testSearch()
     StoreSearchPointer search = aRoot->search (NULL, NULL); /* search for everything in the store */
 
     /* nothing should be immediately available */
-    CPPUNIT_ASSERT(search->error() == false);
-    CPPUNIT_ASSERT(search->isDone() == false);
-    CPPUNIT_ASSERT(search->currentItem() == NULL);
+    CPPUNIT_ASSERT_EQUAL(false, search->error());
+    CPPUNIT_ASSERT_EQUAL(false, search->isDone());
+    CPPUNIT_ASSERT_EQUAL(static_cast<StoreEntry *>(NULL), search->currentItem());
 #if 0
 
-    CPPUNIT_ASSERT(search->next() == false);
+    CPPUNIT_ASSERT_EQUAL(false, search->next());
 #endif
 
     /* trigger a callback */
     cbcalled = false;
     search->next(searchCallback, NULL);
-    CPPUNIT_ASSERT(cbcalled == true);
+    CPPUNIT_ASSERT_EQUAL(true, cbcalled);
 
     /* we should have access to a entry now, that matches the entry we had before */
-    CPPUNIT_ASSERT(search->error() == false);
-    CPPUNIT_ASSERT(search->isDone() == false);
+    CPPUNIT_ASSERT_EQUAL(false, search->error());
+    CPPUNIT_ASSERT_EQUAL(false, search->isDone());
     /* note the hash order is random - the test happens to be in a nice order */
-    CPPUNIT_ASSERT(search->currentItem() == entry1);
-    //CPPUNIT_ASSERT(search->next() == false);
+    CPPUNIT_ASSERT_EQUAL(entry1, search->currentItem());
+    //CPPUNIT_ASSERT_EQUAL(false, search->next());
 
     /* trigger another callback */
     cbcalled = false;
     search->next(searchCallback, NULL);
-    CPPUNIT_ASSERT(cbcalled == true);
+    CPPUNIT_ASSERT_EQUAL(true, cbcalled);
 
     /* we should have access to a entry now, that matches the entry we had before */
-    CPPUNIT_ASSERT(search->error() == false);
-    CPPUNIT_ASSERT(search->isDone() == false);
-    CPPUNIT_ASSERT(search->currentItem() == entry2);
-    //CPPUNIT_ASSERT(search->next() == false);
+    CPPUNIT_ASSERT_EQUAL(false, search->error());
+    CPPUNIT_ASSERT_EQUAL(false, search->isDone());
+    CPPUNIT_ASSERT_EQUAL(entry2, search->currentItem());
+    //CPPUNIT_ASSERT_EQUAL(false, search->next());
 
     /* trigger another callback */
     cbcalled = false;
     search->next(searchCallback, NULL);
-    CPPUNIT_ASSERT(cbcalled == true);
+    CPPUNIT_ASSERT_EQUAL(true, cbcalled);
 
     /* now we should have no error, we should have finished and have no current item */
-    CPPUNIT_ASSERT(search->error() == false);
-    CPPUNIT_ASSERT(search->isDone() == true);
-    CPPUNIT_ASSERT(search->currentItem() == NULL);
-    //CPPUNIT_ASSERT(search->next() == false);
+    CPPUNIT_ASSERT_EQUAL(false, search->error());
+    CPPUNIT_ASSERT_EQUAL(true, search->isDone());
+    CPPUNIT_ASSERT_EQUAL(static_cast<StoreEntry *>(NULL), search->currentItem());
+    //CPPUNIT_ASSERT_EQUAL(false, search->next());
 
     Store::Root(NULL);
 }
index 89664c54936b771dd28cd65e32c1b900246df12d..2db03c4f42b6380cefd80548b309f7db37ef5c63 100644 (file)
 
 #define SQUID_UNIT_TEST 1
 #include "squid.h"
-#include "testStoreSupport.h"
 #include "event.h"
 #include "EventLoop.h"
 #include "SquidTime.h"
+#include "testStoreSupport.h"
 
 /* construct a stock loop with event dispatching, a time service that advances
  * 1 second a tick
index 0ca8cb01b475e4cf684a84dce58441a582c3a2a6..090d426ee4ed5d5abe49f1ebb087ee8138ad8a47 100644 (file)
@@ -1,10 +1,10 @@
 #define SQUID_UNIT_TEST 1
 
 #include "squid.h"
-#include "testString.h"
-#include "SquidString.h"
-#include "Mem.h"
 #include "event.h"
+#include "Mem.h"
+#include "SquidString.h"
+#include "testString.h"
 
 CPPUNIT_TEST_SUITE_REGISTRATION( testString );
 
index 89997eac765d03a1e813f7763495215a6306298d..379d431e9d25aec330078506b9f2d644b8c63d6b 100644 (file)
@@ -3,9 +3,9 @@
 
 #include <cppunit/TestAssert.h>
 
+#include "Mem.h"
 #include "testURL.h"
 #include "URL.h"
-#include "Mem.h"
 
 #if HAVE_SSTREAM
 #include <sstream>
index 92c89c60975a2b0f334f9cf3de39bb9c27e9450e..ca53aa9660a5076f83d3f42dbe0445189a73c4b5 100644 (file)
@@ -163,8 +163,8 @@ testUfs::testUfsSearch()
         pe->timestampsSet();
         pe->complete();
         pe->swapOut();
-        CPPUNIT_ASSERT(pe->swap_dirn == 0);
-        CPPUNIT_ASSERT(pe->swap_filen == 0);
+        CPPUNIT_ASSERT_EQUAL(0, pe->swap_dirn);
+        CPPUNIT_ASSERT_EQUAL(0, pe->swap_filen);
         pe->unlock();
     }
 
@@ -178,34 +178,34 @@ testUfs::testUfsSearch()
     /* nothing should be immediately available */
 #if 0
 
-    CPPUNIT_ASSERT(search->next() == false);
+    CPPUNIT_ASSERT_EQUAL(false, search->next());
 #endif
 
-    CPPUNIT_ASSERT(search->error() == false);
-    CPPUNIT_ASSERT(search->isDone() == false);
-    CPPUNIT_ASSERT(search->currentItem() == NULL);
+    CPPUNIT_ASSERT_EQUAL(false, search->error());
+    CPPUNIT_ASSERT_EQUAL(false, search->isDone());
+    CPPUNIT_ASSERT_EQUAL(static_cast<StoreEntry *>(NULL), search->currentItem());
 
     /* trigger a callback */
     cbcalled = false;
     search->next(searchCallback, NULL);
-    CPPUNIT_ASSERT(cbcalled == true);
+    CPPUNIT_ASSERT_EQUAL(true, cbcalled);
 
     /* we should have access to a entry now, that matches the entry we had before */
-    //CPPUNIT_ASSERT(search->next() == false);
-    CPPUNIT_ASSERT(search->error() == false);
-    CPPUNIT_ASSERT(search->isDone() == false);
+    //CPPUNIT_ASSERT_EQUAL(false, search->next());
+    CPPUNIT_ASSERT_EQUAL(false, search->error());
+    CPPUNIT_ASSERT_EQUAL(false, search->isDone());
     CPPUNIT_ASSERT(search->currentItem() != NULL);
 
     /* trigger another callback */
     cbcalled = false;
     search->next(searchCallback, NULL);
-    CPPUNIT_ASSERT(cbcalled == true);
+    CPPUNIT_ASSERT_EQUAL(true, cbcalled);
 
     /* now we should have no error, we should have finished and have no current item */
-    //CPPUNIT_ASSERT(search->next() == false);
-    CPPUNIT_ASSERT(search->error() == false);
-    CPPUNIT_ASSERT(search->isDone() == true);
-    CPPUNIT_ASSERT(search->currentItem() == NULL);
+    //CPPUNIT_ASSERT_EQUAL(false, search->next());
+    CPPUNIT_ASSERT_EQUAL(false, search->error());
+    CPPUNIT_ASSERT_EQUAL(true, search->isDone());
+    CPPUNIT_ASSERT_EQUAL(static_cast<StoreEntry *>(NULL), search->currentItem());
 
     Store::Root(NULL);
 
index 430f04190ff8fd84bd0ec1a868b329b9d5098888..725700777d9b1d3a2c73bfe737e1e18455b7ecf3 100644 (file)
@@ -9,11 +9,11 @@ CPPUNIT_TEST_SUITE_REGISTRATION( testVector );
 
 void testVector::all()
 {
-    CPPUNIT_ASSERT( 1 == 1 );
+    CPPUNIT_ASSERT_EQUAL(1 ,  1);
     Vector<int> aArray;
-    CPPUNIT_ASSERT(aArray.size() == 0);
+    CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(0), aArray.size());
     aArray.push_back(2);
-    CPPUNIT_ASSERT(aArray.size() == 1);
-    CPPUNIT_ASSERT(aArray.back() == 2);
-    CPPUNIT_ASSERT(aArray.size() == 1);
+    CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), aArray.size());
+    CPPUNIT_ASSERT_EQUAL(2, aArray.back());
+    CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), aArray.size());
 }
index 03d513972a9b709418ee5d2568dee77f8c8a7573..bbf05445121f4df5e8e9abc07cf01e2a83ded17b 100644 (file)
@@ -39,8 +39,8 @@
 
 /** \todo CLEANUP: This file shoudl be called something_stub.cc */
 
-#include "HttpHeaderRange.h"
 #include "HttpHeader.h"
+#include "HttpHeaderRange.h"
 #include "Mem.h"
 
 #if 0
index a57af62dbc9f8993b16123e87f9d1965758d4a91..d4b75da3d3116dd80d3571deed13395367846fbe 100644 (file)
@@ -31,6 +31,7 @@
  */
 
 #include "squid.h"
+#include "anyp/PortCfg.h"
 #include "base/Subscription.h"
 #include "client_side.h"
 #include "disk.h"
 #include "ICP.h"
 #include "ip/Intercept.h"
 #include "ip/QosConfig.h"
+#include "ipc/Coordinator.h"
+#include "ipc/Kids.h"
+#include "ipcache.h"
 #include "MemBuf.h"
-#include "anyp/PortCfg.h"
 #include "SquidConfig.h"
 #include "SquidMath.h"
 #include "SquidTime.h"
-#include "ipc/Kids.h"
-#include "ipc/Coordinator.h"
-#include "ipcache.h"
-#include "tools.h"
 #include "SwapDir.h"
+#include "tools.h"
 #include "wordlist.h"
 
 #if HAVE_SYS_PRCTL_H
index 37cc5f700b4cdccbe73fbd4a7e60d933f501a159..66c6b08b8cf89bc700aaa5b86080bb298ed33eca 100644 (file)
@@ -35,8 +35,8 @@
 #include "acl/FilledChecklist.h"
 #include "base/Vector.h"
 #include "CachePeer.h"
-#include "client_side_request.h"
 #include "client_side.h"
+#include "client_side_request.h"
 #include "comm.h"
 #include "comm/Connection.h"
 #include "comm/ConnOpener.h"
@@ -901,7 +901,7 @@ tunnelStart(ClientHttpRequest * http, int64_t * size_ptr, int *status_ptr, const
                                      CommTimeoutCbPtrFun(tunnelTimeout, tunnelState));
     commSetConnTimeout(tunnelState->client.conn, Config.Timeout.lifetime, timeoutCall);
 
-    peerSelect(&(tunnelState->serverDestinations), request,
+    peerSelect(&(tunnelState->serverDestinations), request, al,
                NULL,
                tunnelPeerSelectComplete,
                tunnelState);
index c5fd2a1e213d694476555664c583488d0e4b89b7..b9f0276db95bd704435e1258662e1048f17b4f07 100644 (file)
  */
 
 #include "squid.h"
-#include "StoreMeta.h"
-#include "StoreMetaUnpacker.h"
-#include "Store.h"
-#include "store_key_md5.h"
 #include "Generic.h"
 #include "mgr/Registration.h"
+#include "Store.h"
+#include "store_key_md5.h"
+#include "StoreMeta.h"
+#include "StoreMetaUnpacker.h"
 
 #undef malloc
 #undef free
index 38d066f85095552bf03e5421c0a878edee784582..1a140485cef7e9653d5bb4d4d76ac06eae9643db 100644 (file)
 #include "fd.h"
 #include "fde.h"
 #include "globals.h"
-#include "xusleep.h"
 #include "SquidIpc.h"
 #include "SquidTime.h"
 #include "StatCounters.h"
 #include "SwapDir.h"
 #include "tools.h"
+#include "xusleep.h"
 
 /* This code gets linked to Squid */
 
index da1a4dbaf56fc7e0322d1921754ef2de301d8753..2d98a334381112ab21d88c6a38d692db91fedd64 100644 (file)
@@ -38,7 +38,6 @@
 #include "FwdState.h"
 #include "HttpReply.h"
 #include "HttpRequest.h"
-#include "HttpRequest.h"
 #include "SquidConfig.h"
 #include "StatCounters.h"
 #include "Store.h"
 
 class WhoisState
 {
-
 public:
-    ~WhoisState();
     void readReply(const Comm::ConnectionPointer &, char *aBuffer, size_t aBufferLength, comm_err_t flag, int xerrno);
     void setReplyToOK(StoreEntry *sentry);
     StoreEntry *entry;
-    HttpRequest *request;
+    HttpRequest::Pointer request;
     FwdState::Pointer fwd;
     char buf[BUFSIZ+1];                /* readReply adds terminating NULL */
     bool dataWritten;
+
+private:
+    CBDATA_CLASS2(WhoisState);
 };
 
+CBDATA_CLASS_INIT(WhoisState);
+
 static CLCB whoisClose;
 static CTCB whoisTimeout;
 static IOCB whoisReadReply;
 
 /* PUBLIC */
 
-CBDATA_TYPE(WhoisState);
-
-WhoisState::~WhoisState()
-{
-    fwd = NULL;        // refcounted
-}
-
 static void
 whoisWriteComplete(const Comm::ConnectionPointer &, char *buf, size_t size, comm_err_t flag, int xerrno, void *data)
 {
@@ -86,11 +81,9 @@ whoisWriteComplete(const Comm::ConnectionPointer &, char *buf, size_t size, comm
 void
 whoisStart(FwdState * fwd)
 {
-    WhoisState *p;
     char *buf;
     size_t l;
-    CBDATA_INIT_TYPE(WhoisState);
-    p = cbdataAlloc(WhoisState);
+    WhoisState *p = new WhoisState;
     p->request = fwd->request;
     p->entry = fwd->entry;
     p->fwd = fwd;
@@ -206,5 +199,5 @@ whoisClose(const CommCloseCbParams &params)
     WhoisState *p = (WhoisState *)params.data;
     debugs(75, 3, "whoisClose: FD " << params.fd);
     p->entry->unlock();
-    cbdataFree(p);
+    delete p;
 }
index 21076ed0cc043c900713560a32dd9d23f0155262..8a9bdc09d7cb0b0292fed8b242708eceabe268c2 100644 (file)
@@ -32,8 +32,8 @@
  */
 
 #include "squid.h"
-#include "wordlist.h"
 #include "MemBuf.h"
+#include "wordlist.h"
 
 void
 wordlistDestroy(wordlist ** list)
index a79ea2b2e83dc1a7d8d0140ea52121a02970f7ac..4b5bc367381a5493f3b182415744b42cc72c1b81 100644 (file)
  */
 
 #include "squid.h"
-#include "stmem.h"
-#include "mem_node.h"
-#include "Generic.h"
 #include "base/TextException.h"
+#include "Generic.h"
+#include "mem_node.h"
+#include "stmem.h"
 
 #if HAVE_IOSTREAM
 #include <iostream>
index 663890f073cb5883bffb1b64d65157d5cced1973..f6f06ba783489ecd949f6dfced706ce21f15ff75 100644 (file)
@@ -32,8 +32,8 @@
  */
 
 #include "squid.h"
-#include "stmem.h"
 #include "mem_node.h"
+#include "stmem.h"
 
 #if HAVE_IOSTREAM
 #include <iostream>
index 81baffeb388806d93f814d0a09c9453c2ab53a6d..558379e1ba9a46bcddf929956e40faa6532356db 100644 (file)
 #include <arpa/inet.h>
 #include <netdb.h>
 
+#include "conffile.hh"
 #include "convert.hh"
-#include "socket.hh"
+#include "copyout.hh"
 #include "signal.hh"
+#include "socket.hh"
 #include "squid-tlv.hh"
-#include "copyout.hh"
-#include "conffile.hh"
 
 #ifndef DEFAULTHOST
 #define DEFAULTHOST "localhost"