==============================================================================
-snmplib/*:
+lib/snmplib/*:
include/{asn1.h,parse.h,snmp*}:
The SNMP library code is developed by Carnegie Mellon University.
+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
- ... 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
#
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
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
/* 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"
* 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.
#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>
"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")
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
[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])
;;
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,,
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)
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)
])
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])
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
])
"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
#: 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
#. 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
#. 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
#. 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
#. 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
"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
#: 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
#: 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
#: 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
"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"
"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
"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 "
#. 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
"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."
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
"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
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
"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
"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
"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
"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
#. 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
"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
"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
"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
-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)
<!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>
<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">.
<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.
<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>
<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
<!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>
<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">.
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&product=Squid&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&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.
<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
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.
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>
<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>
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:
<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
<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
--- /dev/null
+<!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&product=Squid&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&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>
"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
#: 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
#: 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
#: 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 ""
#: 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
#: 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
#: 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"
#: 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."
#: 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"
#: 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."
#: 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 ""
#: 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"
#: 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"
#: 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:"
#: 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>"
#: 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
#: 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 ""
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
"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
#: 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
#: 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 ""
"<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 ""
#: 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 ""
#: 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
#: 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
#: 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"
#: 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."
#: 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"
#: 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)."
#: 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 ""
#: 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"
#: 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"
#: 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:"
#: 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>"
#: 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
#: 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 ""
"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"
#: 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
#: 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
#: 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 ""
#: 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
#: 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
#: 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"
#: 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."
#: 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
#: 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)."
#: 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
#: 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"
#: 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
#: 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:"
#: 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>"
#: 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
#: 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 ""
"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"
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
#: 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>)"
"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"
#: 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 ""
"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"
#: 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
"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 ""
#: 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
"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
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 ""
#: 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."
#: 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"
"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"
#: 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"
#: 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
#: 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 ""
#: 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"
#: 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 ""
#: 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>"
#: 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 ""
#: 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
#: 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
#: 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 ""
#: 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"
"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"
#: 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 ""
#: 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 ""
#: 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
#: 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"
"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
#: 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"
#: 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>)"
#: 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"
"\"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."
#: 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:"
"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
"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
"<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
#: 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 ""
"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
#: 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
#: 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
#: 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>)"
#: 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."
#: 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
"\">%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."
"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 ""
#: 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
#: 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."
#: 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
#: 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
#: 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"
#: 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
#: 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."
#: 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
#: 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 ""
#: 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 :)"
#: 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"
#: 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)."
#: 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."
#: 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
#: 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 ""
"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."
#: 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"
#: 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"
#: 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
#: 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:"
"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>"
"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 ""
"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."
"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 ""
"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 "
+"è terminato. Verrà 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
#: 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>"
#: 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
#: 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 ""
"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"
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
"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 ""
"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."
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."
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"
#: 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"
#: 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:"
#: 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
#: 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"
#: 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"
#: 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"
#: 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."
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
#: 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"
#: 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
#: 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"
#: 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
#: 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
#: 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 ""
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
#: 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
#: 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
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
"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
"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
#: 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
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 ""
"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 ""
"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 ""
#: templates/ERR_AGENT_WPAD+html.body.div.div.ul.li:37
msgid ""
"Tools -> Internet Options -> Connection -> LAN Settings ->Proxy"
-msgstr ""
+msgstr "ツール -> インターネット オプション -> 接続 -> LAN の設定 -> プロキシ サーバー"
#: templates/ERR_AGENT_CONFIGURE+html.body.div.div.ul.li:29
#: templates/ERR_AGENT_WPAD+html.body.div.div.ul.li:29
msgid ""
"Tools -> Options -> Advanced -> Network -> Connection Settings"
-msgstr ""
+msgstr "ツール -> オプション -> 詳細 -> ネットワーク -> 接続設定"
#: templates/ERR_AGENT_CONFIGURE+html.body.div.div.ul.li:45
#: templates/ERR_AGENT_WPAD+html.body.div.div.ul.li:45
msgid ""
"Tools -> Preferences -> Advanced -> Network -> Proxy Servers"
-msgstr ""
+msgstr "ツール -> 設定 -> 詳細 -> ネットワーク -> プロキシサーバー"
#: templates/ERR_CONFLICT_HOST+html.body.div.blockquote.pre:23
msgid "URI Host Conflict"
#: 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"
#: 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"
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 ""
#: 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からデータを取り出せませんでした。"
"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>"
"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
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
#: 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:"
"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"
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."
#: 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"
"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"
#: 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
"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."
#: 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 ""
#: 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."
#: 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"
#: 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
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"
#: 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."
#: 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
#: 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"
#: 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 ""
#: 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
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"
#: 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"
#: 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"
#: 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"
"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"
"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."
#: 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 ""
"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"
#: 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 ""
#: 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"
#: 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."
"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"
"\">%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."
"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"
#: 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"
#: 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>)"
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."
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."
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."
#: 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"
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."
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
#: 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"
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."
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."
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
#: 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 ""
msgid ""
"Tools -> Internet Options -> Connection -> LAN Settings ->Proxy"
msgstr ""
+"Інструменти -> Властивості браузера -> З'єднання -> Налаштування "
+"LAN -> Проксі"
#: templates/ERR_AGENT_CONFIGURE+html.body.div.div.ul.li:29
#: templates/ERR_AGENT_WPAD+html.body.div.div.ul.li:29
msgid ""
"Tools -> Options -> Advanced -> Network -> Connection Settings"
msgstr ""
+"Інструменти -> Опції -> Додатково -> Мережа -> Параметри "
+"з'єднання"
#: templates/ERR_AGENT_CONFIGURE+html.body.div.div.ul.li:45
#: templates/ERR_AGENT_WPAD+html.body.div.div.ul.li:45
msgid ""
"Tools -> Preferences -> Advanced -> Network -> Proxy Servers"
msgstr ""
+"Інструменти -> Налаштування -> Додатково -> Мережа -> Проксі "
+"сервера"
#: templates/ERR_CONFLICT_HOST+html.body.div.blockquote.pre:23
msgid "URI Host Conflict"
#: 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"
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
#~ 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 "
"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>"
#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;
#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;
#include <stdio.h>
#endif
-#include "md5.h"
#include "crypt_md5.h"
+#include "md5.h"
static unsigned char itoa64[] = /* 0 ... 63 => ascii - 64 */
"./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
* 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"
-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
+]))
#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>
#include <crypt.h>
#endif
-#include "util.h"
#include "hash.h"
#include "rfc2617.h"
+#include "util.h"
typedef struct _request_data {
char *user;
#include <crypt.h>
#endif
-#include "util.h"
#include "hash.h"
#include "rfc2617.h"
+#include "util.h"
typedef struct _request_data {
char *user;
*/
#include "squid.h"
#include "helpers/defines.h"
-#include "util.h"
#include "rfc1738.h"
+#include "util.h"
#ifdef HAVE_LDAP
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;
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;
#include <time.h>
#endif
-#include "util.h"
#include "base64.h"
+#include "util.h"
#if HAVE_KRB5_H
#if HAVE_BROKEN_SOLARIS_KRB5_H
* 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
*/
#include "squid.h"
-#include "rfc1738.h"
#include "compat/getaddrinfo.h"
#include "compat/getnameinfo.h"
+#include "rfc1738.h"
#include "negotiate_kerberos.h"
#endif
#include "snmp.h"
-#include "snmp_impl.h"
#include "snmp_api.h"
+#include "snmp_impl.h"
/* MIB definitions
* SQUID-MIB
#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 */
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
int n;
{
for (; n--; pc++, a++)
- *a = e[*pc];
+ *a = e[(int)*pc];
}
static void
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;
e = PERM;
for (i = 0; i < BS2; i++)
- *nachr_l++ ^= tmp[*e++];
+ *nachr_l++ ^= tmp[(int)*e++];
}
void
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
-#include "TrieNode.h"
#include "TrieCharTransform.h"
+#include "TrieNode.h"
#if !_USE_INLINE_
#include "Trie.cci"
*/
#include "squid.h"
-#include "TrieNode.h"
#include "TrieCharTransform.h"
+#include "TrieNode.h"
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
*/
#ifdef __cplusplus
-#include "TrieNode.h"
#include "TrieCharTransform.h"
+#include "TrieNode.h"
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#include "squid.h"
#include <string.h>
-#include "rfc2617.h"
#include "md5.h"
+#include "rfc2617.h"
void
CvtHex(const HASH Bin, HASHHEX Hex)
#include "squid.h"
-#include "rfc2671.h"
#include "rfc1035.h"
+#include "rfc2671.h"
int
rfc2671RROptPack(char *buf, size_t sz, ssize_t edns_sz)
#include <strings.h>
#endif
-#include "rfc3596.h"
#include "rfc2671.h"
+#include "rfc3596.h"
#ifndef SQUID_RFC1035_H
#error RFC3596 Library depends on RFC1035
#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>
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
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
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>
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>
#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>
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>
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
#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" {
#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"
#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"
#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"
#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
#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"
#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"
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
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
#
#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"
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;
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
public:
CacheDetails() : caddr(),
- requestSize(0),
- replySize(0),
- requestHeadersSize(0),
- replyHeadersSize(0),
highOffset(0),
objectSize(0),
code (LOG_TAG_NONE),
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;
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
#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"
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
#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;
#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;
#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
#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.
#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
{
#define COMMONPOOL_H
#if USE_DELAY_POOLS
-#include "SquidString.h"
#include "CompositePoolNode.h"
+#include "SquidString.h"
/*
\ingroup DelayPoolsAPI
#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)
#define DELAYPOOL_H
#if USE_DELAY_POOLS
-#include "CompositePoolNode.h"
#include "acl/forward.h"
+#include "CompositePoolNode.h"
class StoreEntry;
#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
#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
* 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),
#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
#if USE_DISKIO_AIO
-#include "DiskIO/DiskFile.h"
#include "async_io.h"
#include "cbdata.h"
+#include "DiskIO/DiskFile.h"
#include "SquidString.h"
class AIODiskIOStrategy;
*/
#include "squid.h"
-#include "AIODiskIOStrategy.h"
#include "AIODiskFile.h"
+#include "AIODiskIOStrategy.h"
#include "DiskIO/IORequestor.h"
#include "DiskIO/ReadRequest.h"
#include "DiskIO/WriteRequest.h"
#if USE_DISKIO_AIO
-#include "DiskIO/DiskIOStrategy.h"
#include "async_io.h"
+#include "DiskIO/DiskIOStrategy.h"
class AIODiskIOStrategy : public DiskIOStrategy
{
*/
#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"
#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>
*/
#include "squid.h"
-#include "BlockingIOStrategy.h"
#include "BlockingFile.h"
+#include "BlockingIOStrategy.h"
#include "unlinkd.h"
bool
#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
*/
#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"
#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
#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
#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"
#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;
#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"
#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>
#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
#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),
{
prepareToRun();
+ assert(!Running);
+ Running = this;
+
while (!runOnce());
+
+ Running = NULL;
}
bool
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();
CBDATA_CLASS_INIT(ExternalACLEntry);
-ExternalACLEntry::ExternalACLEntry()
+ExternalACLEntry::ExternalACLEntry() :
+ notes()
{
lru.next = lru.prev = NULL;
result = ACCESS_DENIED;
{
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;
#include "acl/Acl.h"
#include "cbdata.h"
#include "hash.h"
+#include "Notes.h"
#include "SquidString.h"
class external_acl;
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;
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;
#include "squid.h"
#include "base/TextException.h"
-#include "SquidTime.h"
#include "FadingCounter.h"
+#include "SquidTime.h"
#if HAVE_MATH_H
#include <math.h>
#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>
#endif
// do full route options selection
- peerSelect(&serverDestinations, request, entry, fwdPeerSelectionCompleteWrapper, this);
+ peerSelect(&serverDestinations, request, al, entry, fwdPeerSelectionCompleteWrapper, this);
}
#if STRICT_ORIGINAL_DST
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);
+ }
}
}
}
// 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);
#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"
#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>
*/
#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),
#include "hier_code.h"
#include "http/StatusCode.h"
#include "lookup_t.h"
-#include "rfc2181.h"
#include "PingData.h"
+#include "rfc2181.h"
class HierarchyLogEntry
{
#ifndef SQUID_HTTP_CONTROL_MSG_H
#define SQUID_HTTP_CONTROL_MSG_H
-#include "HttpReply.h"
#include "base/AsyncCall.h"
+#include "HttpReply.h"
class HttpControlMsg;
*/
#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"
};
/// 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
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;
}
}
}
/* 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
*
*/
-#include "defines.h"
#include "Debug.h"
+#include "defines.h"
bool
HttpHdrCc::isSet(http_hdr_cc_type id) const
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);
}
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);
}
*/
#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"
/*
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;
#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"
#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"
/*
{
const char *field_ptr = header_start;
HttpHeaderEntry *e, *e2;
+ bool warnOnError = (Config.onoff.relaxed_header_parser <= 0 ? DBG_IMPORTANT : 2);
PROF_start(HttpHeaderParse);
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>.
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;
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) {
*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)) {
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();
}
}
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 */
*
*/
-#include "SquidString.h"
#include "HttpHeaderFieldStat.h"
+#include "SquidString.h"
/// compiled version of HttpHeaderFieldAttrs plus stats. Currently a POD.
class HttpHeaderFieldInfo
*/
#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"
return 0;
}
/* Make sure it's defined even if empty "" */
- if (!val->defined())
+ if (!val->termedBuf())
val->limitInit("", 0);
return 1;
}
#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
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;
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;
#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);
#include "comm/forward.h"
#include "icp_opcode.h"
#include "ip/Address.h"
-#include "StoreClient.h"
#include "LogTags.h"
+#include "StoreClient.h"
class HttpRequest;
#if USE_LEAKFINDER
#include "LeakFinder.h"
-#include "Store.h"
#include "SquidTime.h"
+#include "Store.h"
/* ========================================================================= */
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 \
MemBuf.cc \
MemObject.cc \
MemObject.h \
+ MessageSizes.h \
mime.h \
mime.cc \
mime_header.h \
multicast.cc \
neighbors.h \
neighbors.cc \
- Notes.cc \
Notes.h \
+ Notes.cc \
Packer.cc \
Packer.h \
Parsing.cc \
send-announce.h \
send-announce.cc \
$(SBUF_SOURCE) \
+ SBufDetailedStats.h \
+ SBufDetailedStats.cc \
SBufStatsAction.h \
SBufStatsAction.cc \
$(SNMP_SOURCE) \
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 \
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 \
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 \
$(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 \
# 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)
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)
cbdata.cc \
cbdata.h \
ConfigParser.cc \
- ETag.cc \
+ tests/stub_ETag.cc \
fatal.h \
tests/stub_fatal.cc \
HttpBody.h \
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 \
tests/stub_errorpage.cc \
tests/stub_HelperChildConfig.cc \
tests/stub_libformat.cc \
+ tests/stub_libauth.cc \
StatCounters.h \
StatCounters.cc \
StatHist.h \
tests/testHttpReply.cc \
tests/testHttpReply.h \
tests/testMain.cc \
- time.cc \
+ tests/stub_time.cc \
url.cc \
URLScheme.cc \
wordlist.h \
acl/libacls.la \
acl/libapi.la \
acl/libstate.la \
- $(AUTH_LIBS) \
anyp/libanyp.la \
ip/libip.la \
base/libbase.la \
ConfigParser.cc \
DiskIO/ReadRequest.cc \
DiskIO/WriteRequest.cc \
- ETag.cc \
+ tests/stub_ETag.cc \
event.cc \
fatal.h \
tests/stub_fatal.cc \
int.cc \
MasterXaction.cc \
MasterXaction.h \
+ Notes.cc \
+ Notes.h \
SquidList.h \
SquidList.cc \
mem_node.cc \
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 \
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 \
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
acl/libacls.la \
eui/libeui.la \
acl/libstate.la \
- $(AUTH_LIBS) \
acl/libapi.la \
anyp/libanyp.la \
base/libbase.la \
tests/testBoilerplate.cc \
tests/testMain.cc \
tests/testBoilerplate.h \
- time.cc
+ tests/stub_time.cc
nodist_tests_testBoilerplate_SOURCES = \
$(TESTSOURCES)
tests_testBoilerplate_LDADD= \
## Tests of the CacheManager module.
tests_testCacheManager_SOURCES = \
AccessLogEntry.cc \
- $(ACL_REGISTRATION_SOURCES) \
debug.cc \
HttpParser.cc \
HttpParser.h \
HttpRequest.cc \
HttpRequestMethod.cc \
Mem.h \
- mem.cc \
+ tests/stub_mem.cc \
String.cc \
tests/testCacheManager.cc \
tests/testCacheManager.h \
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 \
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 \
dlink.cc \
$(DNSSOURCE) \
errorpage.cc \
- ETag.cc \
+ tests/stub_ETag.cc \
event.cc \
external_acl.cc \
ExternalACLEntry.cc \
multicast.h \
multicast.cc \
mem_node.cc \
- MemBlob.cc \
MemBuf.cc \
MemObject.cc \
mime.h \
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 \
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 \
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 \
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 \
# 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 \
tests_testDiskIO_SOURCES = \
CacheDigest.h \
- CacheDigest.cc \
+ tests/stub_CacheDigest.cc \
cbdata.cc \
client_db.h \
ClientInfo.h \
$(DISKIO_SOURCE) \
disk.h \
disk.cc \
- ETag.cc \
+ tests/stub_ETag.cc \
EventLoop.cc \
event.cc \
fatal.h \
MemObject.cc \
mem_node.cc \
Mem.h \
- mem.cc \
+ tests/stub_mem.cc \
+ Notes.h \
+ Notes.cc \
Packer.cc \
Parsing.cc \
refresh.h \
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 \
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 \
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 \
tests/testMain.cc \
tests/testStoreSupport.cc \
tests/testStoreSupport.h \
- time.cc \
+ tests/stub_time.cc \
$(UNLINKDSOURCE) \
url.cc \
URLScheme.cc \
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 \
## 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 \
cache_cf.cc \
cache_manager.cc \
carp.h \
- carp.cc \
+ tests/stub_carp.cc \
cbdata.cc \
ChunkedCodingParser.cc \
client_db.h \
dlink.cc \
$(DNSSOURCE) \
errorpage.cc \
- ETag.cc \
+ tests/stub_ETag.cc \
event.cc \
EventLoop.h \
EventLoop.cc \
MasterXaction.cc \
MasterXaction.h \
Mem.h \
- mem.cc \
+ tests/stub_mem.cc \
mem_node.cc \
- MemBlob.cc \
MemBuf.cc \
MemObject.cc \
mime.h \
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 \
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 \
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 \
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
$(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 \
## 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 \
RefreshPattern.h \
cache_cf.cc \
carp.h \
- carp.cc \
+ tests/stub_carp.cc \
cbdata.cc \
ChunkedCodingParser.cc \
client_db.h \
dlink.cc \
$(DNSSOURCE) \
errorpage.cc \
- ETag.cc \
+ tests/stub_ETag.cc \
EventLoop.h \
EventLoop.cc \
event.cc \
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 \
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 \
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 \
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 \
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
$(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 \
tests_test_http_range_SOURCES = \
AccessLogEntry.cc \
- $(ACL_REGISTRATION_SOURCES) \
BodyPipe.cc \
cache_cf.h \
AuthReg.h \
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 \
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 \
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 \
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 \
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 \
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
$(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 \
MemBuf.cc \
MemBuf.h \
Mem.h \
- mem.cc \
+ tests/stub_mem.cc \
String.cc \
cache_cf.h \
YesNoNone.h \
tests/testHttpParser.cc \
tests/testHttpParser.h \
tests/testMain.cc \
- time.cc \
+ tests/stub_time.cc \
wordlist.h \
wordlist.cc
nodist_tests_testHttpParser_SOURCES = \
## Tests of the HttpRequest module.
tests_testHttpRequest_SOURCES = \
AccessLogEntry.cc \
- $(ACL_REGISTRATION_SOURCES) \
HttpParser.cc \
HttpParser.h \
RequestFlags.h \
HttpRequest.cc \
HttpRequestMethod.cc \
Mem.h \
- mem.cc \
+ tests/stub_mem.cc \
String.cc \
tests/testHttpRequest.h \
tests/testHttpRequest.cc \
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 \
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 \
dlink.cc \
$(DNSSOURCE) \
errorpage.cc \
- ETag.cc \
+ tests/stub_ETag.cc \
external_acl.cc \
ExternalACLEntry.cc \
fatal.h \
multicast.h \
multicast.cc \
mem_node.cc \
- MemBlob.cc \
MemBuf.cc \
MemObject.cc \
mime.h \
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 \
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 \
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 \
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 \
## first line - what we are testing.
tests_testStore_SOURCES= \
CacheDigest.h \
- CacheDigest.cc \
+ tests/stub_CacheDigest.cc \
cbdata.cc \
ClientInfo.h \
ConfigOption.cc \
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 \
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 \
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 \
tests/testStoreSupport.h \
tests/TestSwapDir.cc \
tests/TestSwapDir.h \
- time.cc \
+ tests/stub_time.cc \
url.cc \
URLScheme.cc \
wordlist.h \
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 \
tests_testString_SOURCES = \
ClientInfo.h \
Mem.h \
- mem.cc \
+ tests/stub_mem.cc \
MemBuf.cc \
String.cc \
tests/testMain.cc \
tests/stub_HelperChildConfig.cc \
tools.h \
tests/stub_tools.cc \
- time.cc \
+ tests/stub_time.cc \
wordlist.h \
wordlist.cc
nodist_tests_testString_SOURCES = \
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 \
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 \
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 \
event.cc \
$(DELAY_POOL_SOURCE) \
CacheDigest.h \
- CacheDigest.cc \
+ tests/stub_CacheDigest.cc \
ConfigParser.cc \
EventLoop.cc \
HttpMsg.cc \
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 \
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 \
tests_testRock_SOURCES = \
cbdata.cc \
CacheDigest.h \
- CacheDigest.cc \
+ tests/stub_CacheDigest.cc \
ConfigOption.cc \
ConfigParser.cc \
disk.h \
MemBuf.cc \
MemObject.cc \
mem_node.cc \
+ Notes.h \
+ Notes.cc \
Packer.cc \
Parsing.cc \
RemovalPolicy.cc \
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 \
store_key_md5.cc \
store_swapmeta.cc \
store_swapout.cc \
+ $(SBUF_SOURCE) \
+ SBufDetailedStats.h \
+ tests/stub_SBufDetailedStats.cc \
String.cc \
StrList.h \
StrList.cc \
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 \
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 \
anyp/libanyp.la \
ip/libip.la \
fs/libfs.la \
- $(AUTH_LIBS) \
$(COMMON_LIBS) \
$(REPL_OBJS) \
$(DISK_LIBS) \
acl/libapi.la \
acl/libstate.la \
ipc/libipc.la \
- mgr/libmgr.la \
base/libbase.la \
$(SSL_LIBS) \
$(top_builddir)/lib/libmisccontainers.la \
## TODO: Trim this down once the insanity is over.
tests_testURL_SOURCES = \
AccessLogEntry.cc \
- $(ACL_REGISTRATION_SOURCES) \
BodyPipe.cc \
cache_cf.h \
AuthReg.h \
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 \
multicast.h \
multicast.cc \
Mem.h \
- mem.cc \
+ tests/stub_mem.cc \
mem_node.cc \
- MemBlob.cc \
MemBuf.cc \
MemObject.cc \
mime.h \
mime_header.cc \
neighbors.h \
neighbors.cc \
- Notes.cc \
Notes.h \
+ Notes.cc \
Packer.cc \
Parsing.cc \
pconn.cc \
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 \
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 \
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 \
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 \
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 \
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 \
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=\
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 \
tests/stub_HelperChildConfig.cc \
tools.h \
tests/stub_tools.cc \
- time.cc \
wordlist.h \
wordlist.cc
nodist_tests_testConfigParser_SOURCES = \
$(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 \
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)
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= \
#include "Debug.h"
#include "Mem.h"
#include "MemBlob.h"
+#include "SBufDetailedStats.h"
#if HAVE_IOSTREAM
#include <iostream>
memFreeString(capacity,mem);
Stats.liveBytes -= capacity;
--Stats.live;
+ recordMemBlobSizeAtDestruct(size);
debugs(MEMBLOB_DEBUGSECTION,9, HERE << "destructed, this="
<< static_cast<void*>(this) << " id=" << id
--- /dev/null
+#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 */
*/
#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"
}
const char *
-Note::match(HttpRequest *request, HttpReply *reply)
+Note::match(HttpRequest *request, HttpReply *reply, const AccessLogEntry::Pointer &al)
{
typedef Values::iterator VLI;
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;
}
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);
label.append('=');
label.append(value);
aclParseAclList(parser, ¬eValue->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) {
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;
}
}
+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);
}
#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"
class HttpRequest;
class HttpReply;
+typedef RefCount<AccessLogEntry> AccessLogEntryPointer;
/**
* Used to store a note configuration. The notes are custom key:value
{
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;
* 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
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(); }
/**
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:
/**
*/
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.
*/
#include "squid.h"
-#include "Store.h"
#include "MemBuf.h"
+#include "Store.h"
/* local types */
#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
#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;
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);
/**
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;
*
*/
+#include "compat/GnuRegex.h"
+
/// a representation of a refresh pattern. Currently a POD.
class RefreshPattern
{
#include "Debug.h"
#include "OutOfBoundsException.h"
#include "SBuf.h"
+#include "SBufDetailedStats.h"
#include "SBufExceptions.h"
#include "util.h"
{
debugs(24, 8, id << " destructed");
--stats.live;
+ recordSBufSizeAtDestruct(len_);
}
MemBlob::Pointer
--- /dev/null
+#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;
+}
--- /dev/null
+
+#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 */
#include "ipc/Messages.h"
#include "ipc/TypedMsgHdr.h"
#include "mgr/Registration.h"
+#include "SBufDetailedStats.h"
#include "SBufStatsAction.h"
#include "StoreEntryStream.h"
{
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
{
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
#include "mgr/Action.h"
#include "SBuf.h"
+#include "StatHist.h"
class StoreEntry;
SBufStats sbdata;
MemBlobStats mbdata;
+ StatHist sbsizesatdestruct;
+ StatHist mbsizesatdestruct;
};
#endif /* SQUID_SBUFSTATSACTION_H */
#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"
{
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 *
}
adaptedHeadSource = initiateAdaptation(
- new Adaptation::Iterator(vrep, cause, group));
+ new Adaptation::Iterator(vrep, cause, fwd->al, group));
startedAdaptation = initiated(adaptedHeadSource);
Must(startedAdaptation);
}
// 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;
#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"
int check_hostnames;
int allow_underscore;
int via;
+ int cache_miss_revalidate;
int emailErrData;
int httpd_suppress_version_string;
int global_internal_static;
~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 &);
/// 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
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! */
}
}
+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)
* 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:
* 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 */
*
*/
-#include "MemObject.h"
#include "HttpReply.h"
+#include "MemObject.h"
/**
\retval true Store contains 0 bytes of data.
#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
{
*/
#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)
#ifndef SQUID_STOREMETAOBJSIZE_H
#define SQUID_STOREMETAOBJSIZE_H
-#include "StoreMeta.h"
#include "MemPool.h"
+#include "StoreMeta.h"
class StoreMetaObjSize : public StoreMeta
{
*/
#include "squid.h"
-#include "StoreMetaSTD.h"
-#include "Store.h"
#include "MemObject.h"
+#include "Store.h"
+#include "StoreMetaSTD.h"
bool
StoreMetaSTD::validLength(int len) const
*/
#include "squid.h"
-#include "StoreMetaSTDLFS.h"
-#include "Store.h"
#include "MemObject.h"
+#include "Store.h"
+#include "StoreMetaSTDLFS.h"
bool
StoreMetaSTDLFS::validLength(int len) const
*/
#include "squid.h"
-#include "StoreMetaURL.h"
-#include "Store.h"
#include "MemObject.h"
+#include "Store.h"
+#include "StoreMetaURL.h"
bool
StoreMetaURL::checkConsistency(StoreEntry *e) const
*/
#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);
*/
#include "squid.h"
-#include "StoreMetaVary.h"
-#include "Store.h"
#include "MemObject.h"
+#include "Store.h"
+#include "StoreMetaVary.h"
bool
StoreMetaVary::checkConsistency(StoreEntry *e) const
*/
#include "squid.h"
-#include "tools.h"
#include "StoreStats.h"
+#include "tools.h"
/* StoreInfoStats */
return len_;
}
-bool String::defined() const
-{
- return buf_!=NULL;
-}
-
-bool String::undefined() const
-{
- return buf_==NULL;
-}
-
char const *
String::rawBuf() const
{
*/
#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);
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"
NULL, /* key[3] */
NULL /* key[4] */
};
+
+static int Squid_Aborting = 0;
#endif
/* ====================================================================== */
/* 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()
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");
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;
}
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()
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 */
* 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
--- /dev/null
+#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_;
--- /dev/null
+#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 */
--- /dev/null
+#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);
+}
+
--- /dev/null
+
+#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 */
#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"
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];
void asnAclInitialize(ACL * acls);
-static void asStateFree(void *data);
-
static void destroyRadixNodeInfo(as_info *);
static OBJH asnStats;
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;
{
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
/* 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;
}
debugs(53, 3, "asHandleReply: AS# " << s << " (" << asState->as_number << ")");
asnAddNet(s, asState->as_number);
s = t + 1;
- asState->dataRead = 1;
+ asState->dataRead = true;
}
/*
}
}
-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
*/
#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 &);
*/
#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 */
#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 &)
#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 *>
#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)
#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>
*/
#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"
#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
*/
#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
#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 *>
#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);
#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"
Ssl::X509_Pointer serverCert;
#endif
+ AccessLogEntry::Pointer al; ///< info for the future access.log entry
+
ExternalACLEntry *extacl_entry;
private:
#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);
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;
#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>
#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 */
#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
#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"
*/
#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.
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 *
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*> *
*/
#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
#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
*/
#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
#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
*/
#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"
/* ACL API */
virtual int match(ACLChecklist *checklist);
+ // XXX: use refcounting instead of raw pointers
std::vector<ACL*> nodes; ///< children nodes of this intermediate node
};
#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 */
*/
#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"
#include "acl/Acl.h"
#include "acl/Data.h"
-#include "splay.h"
#include "ip/Address.h"
+#include "splay.h"
/// \ingroup ACLAPI
class acl_ip_data
*/
#include "squid.h"
-#include "acl/LocalIp.h"
#include "acl/FilledChecklist.h"
+#include "acl/LocalIp.h"
char const *
ACLLocalIP::typeString() const
*/
#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 &)
#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>
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)
*/
#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 */
#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
*/
#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"
#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 *>
{
#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"
#ifndef SQUID_ACLNOTE_H
#define SQUID_ACLNOTE_H
-#include "acl/Strategy.h"
#include "acl/Strategised.h"
+#include "acl/Strategy.h"
class HttpRequest;
bool
ACLNoteData::empty() const
{
- return name.undefined();
+ return name.size() == 0;
}
ACLData<HttpRequest *> *
#define SQUID_ACLNOTEDATA_H
#include "acl/Data.h"
-#include "SquidString.h"
#include "MemPool.h"
+#include "SquidString.h"
class HttpRequest;
class NotePairs;
#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
#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 *>
{
*/
#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 */
#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>
*/
#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"
*/
#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 */
*/
#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"
#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>
*/
#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 */
/* partial specialisation */
+#include "acl/Checklist.h"
#include "acl/Data.h"
#include "acl/ReplyHeaderStrategy.h"
-#include "acl/Checklist.h"
template <>
inline int
#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>
*/
#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 */
/* partial specialisation */
+#include "acl/Checklist.h"
#include "acl/Data.h"
#include "acl/RequestHeaderStrategy.h"
-#include "acl/Checklist.h"
template <>
inline int
#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"
#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 *>
*/
#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"
#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 *>
*/
#include "squid.h"
-#include "acl/SourceIp.h"
#include "acl/FilledChecklist.h"
+#include "acl/SourceIp.h"
char const *
ACLSourceIP::typeString() const
#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 &)
#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 *>
*/
#include "squid.h"
-#include "acl/SslErrorData.h"
#include "acl/Checklist.h"
+#include "acl/SslErrorData.h"
#include "cache_cf.h"
#include "wordlist.h"
#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 *>
#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>
*/
#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"
#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 *>
{
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
*/
#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
#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 *>
{
*/
#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"
#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>
{
*/
#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"
*/
#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"
#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 *>
{
*/
#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"
#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 *>
{
*/
#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
#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>
{
*/
#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
#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 *>
{
#include "squid.h"
+#include "AccessLogEntry.h"
#include "acl/FilledChecklist.h"
#include "adaptation/AccessCheck.h"
#include "adaptation/AccessRule.h"
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;
}
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;
}
#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;
// 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
"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
}
}
+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)
{
#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"
static Notes metaHeaders; ///< The list of configured meta headers
+ static bool needHistory; ///< HttpRequest adaptation history should recorded
+
typedef Vector<ServiceConfigPointer> ServiceConfigs;
ServiceConfigs serviceConfigs;
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
allMeta.compact();
}
+void
+Adaptation::History::recordAdaptationService(SBuf &srvId)
+{
+ theAdaptationServices.push_back(srvId);
+}
+
void
Adaptation::History::setFutureServices(const DynamicGroupCfg &services)
{
#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
/// 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;
/// 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);
*/
#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
{
#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
{
#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)
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();
}
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());
}
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);
#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;
{
public:
Iterator(HttpMsg *virginHeader, HttpRequest *virginCause,
+ AccessLogEntry::Pointer &alp,
const Adaptation::ServiceGroupPointer &aGroup);
virtual ~Iterator();
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
*/
#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)
{
#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
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;
#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
{
#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);
method(f.method),
point(f.point),
request(f.request),
- reply(f.reply)
+ reply(f.reply),
+ al(f.al)
{
if (request)
HTTPMSGLOCK(request);
#ifndef SQUID_ADAPTATION__SERVICE_FILTER_H
#define SQUID_ADAPTATION__SERVICE_FILTER_H
+#include "AccessLogEntry.h"
#include "adaptation/Elements.h"
class HttpRequest;
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
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
#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
{
* 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;
#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());
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
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);
}
/* 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;
* 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"
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();
}
#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>
*/
#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
{
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
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)
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;
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;
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();
}
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);
}
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());
}
}
#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>
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;
#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);
};
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"),
makingVb(opUndecided), proxyingAb(opUndecided),
adaptHistoryId(-1),
vbProductionFinished(false),
- abProductionFinished(false), abProductionAtEnd(false)
+ abProductionFinished(false), abProductionAtEnd(false),
+ al(alp)
{
if (virginCause)
theCauseRep = new MessageRep(virginCause);
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());
}
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();
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);
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();
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()
{
mustStop("adaptationAborted");
}
-bool
-Adaptation::Ecap::XactionRep::callable() const
-{
- return !done();
-}
-
void
Adaptation::Ecap::XactionRep::noteMoreBodySpaceAvailable(RefCount<BodyPipe> bp)
{
#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>
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;
virtual void blockVirgin();
virtual void adaptationDelayed(const libecap::Delay &);
virtual void adaptationAborted();
+ virtual void resume();
virtual void vbDiscard();
virtual void vbMake();
virtual void vbStopMaking();
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);
/// 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
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);
};
#include "squid.h"
-#include "Debug.h"
#include "adaptation/icap/Client.h"
+#include "Debug.h"
void Adaptation::Icap::InitModule()
{
*/
#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;
#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
{
#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
#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):
#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
}
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),
protectGroupBypass(true),
replyHttpHeaderSize(-1),
replyHttpBodySize(-1),
- adaptHistoryId(-1)
+ adaptHistoryId(-1),
+ alMaster(alp)
{
assert(virginHeader);
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) {
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
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),
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) {
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);
}
/* 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);
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()
#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
{
public:
- ModXact(HttpMsg *virginHeader, HttpRequest *virginCause, ServiceRep::Pointer &s);
+ ModXact(HttpMsg *virginHeader, HttpRequest *virginCause, AccessLogEntry::Pointer &alp, ServiceRep::Pointer &s);
virtual ~ModXact();
// BodyProducer methods
} sending;
} state;
+ AccessLogEntry::Pointer alMaster; ///< Master transaction AccessLogEntry
CBDATA_CLASS2(ModXact);
};
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();
InOut virgin;
+ AccessLogEntry::Pointer al;
+
private:
CBDATA_CLASS2(ModXactLauncher);
};
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);
#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
{
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
#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>
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);
#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
#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"
#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"
/* 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:
#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
*/
#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()
{
/* 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
#if USE_AUTH
#include "acl/Acl.h"
-#include "acl/Data.h"
#include "acl/Checklist.h"
+#include "acl/Data.h"
class ProxyAuthLookup : public ACLChecklist::AsyncState
{
#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;
* 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 << "'");
"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 *
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();
+}
#if USE_AUTH
+#include "AccessLogEntry.h"
#include "auth/UserRequest.h"
#include "HelperChildConfig.h"
/* for http_hdr_type parameters-by-value */
#include "HttpHeader.h"
+namespace Format
+{
+ class Format;
+}
+
namespace Auth
{
{
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() {}
\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.
*
\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
* 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;
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;
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;
#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"
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);
}
#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
State.h \
State.cc \
User.h \
- User.cci \
User.cc \
UserRequest.h \
UserRequest.cc
*/
#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;
#if USE_AUTH
-#include "base/Vector.h"
#include "base/RefCount.h"
+#include "base/Vector.h"
/**
\defgroup AuthSchemeAPI Authentication Scheme API
*/
#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;
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) {
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.
*/
);
}
}
+
+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_);
+ }
+}
+++ /dev/null
-/*
- * 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_);
- }
-}
#include "base/RefCount.h"
#include "dlink.h"
#include "ip/Address.h"
+#include "Notes.h"
+#include "SBuf.h"
class AuthUserHashPointer;
class StoreEntry;
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.
CredentialState credentials_state;
protected:
- User(Auth::Config *);
+ User(Auth::Config *, const char *requestRealm);
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 */
#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 */
/* 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
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
* 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);
/* 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()) {
}
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);
}
// 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);
{
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;
+}
#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;
* \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;}
*
* \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 */
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;
#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
{
#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)
public:
MEMPROXY_CLASS(Auth::Basic::User);
- User(Auth::Config *);
+ User(Auth::Config *, const char *requestRealm);
~User();
bool authenticated() const;
bool valid() const;
#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"
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
/* 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());
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);
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());
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;
#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;
void
Auth::Basic::Config::done()
{
+ Auth::Config::done();
+
authbasic_initialised = 0;
if (basicauthenticators) {
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() :
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
}
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);
* 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 */
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 << "'");
/* 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() << "'");
#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 */
~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 *);
#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
{
#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));
public:
MEMPROXY_CLASS(Auth::Digest::User);
- User(Auth::Config *);
+ User(Auth::Config *, const char *requestRealm);
~User();
int authenticated() const;
#include "squid.h"
+#include "AccessLogEntry.h"
#include "auth/digest/auth_digest.h"
#include "auth/digest/User.h"
#include "auth/digest/UserRequest.h"
#include "HttpHeaderTools.h"
#include "HttpReply.h"
#include "HttpRequest.h"
+#include "format/Format.h"
+#include "MemBuf.h"
#include "SquidTime.h"
Auth::Digest::UserRequest::UserRequest() :
return 0;
}
+const char *
+Auth::Digest::UserRequest::credentialsStr()
+{
+ return realm;
+}
+
/** log a digest user in
*/
void
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);
/* 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];
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,
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: {
#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;
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" */
* 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 */
/* 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);
name, "digest", noncemaxuses,
name, "digest", (int) noncemaxduration,
name, "digest", (int) nonceGCInterval);
+ Auth::Config::dump(entry, name, scheme);
}
bool
void
Auth::Digest::Config::done()
{
+ Auth::Config::done();
+
authdigest_initialised = 0;
if (digestauthenticators)
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 *
/* 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 */
* 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;
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.
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;
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;
/* 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;
}
*/
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;
}
/* 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;
}
/* 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;
}
* 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;
}
/* 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;
}
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;
}
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;
}
/* 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;
}
/* 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;
}
/* 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;
}
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;
}
/* 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;
}
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 */
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 *);
#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
{
#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;
}
{
public:
MEMPROXY_CLASS(Auth::Negotiate::User);
- User(Auth::Config *);
+ User(Auth::Config *, const char *requestRealm);
~User();
virtual int32_t ttl() const;
#include "squid.h"
+#include "AccessLogEntry.h"
#include "auth/negotiate/auth_negotiate.h"
#include "auth/negotiate/UserRequest.h"
#include "auth/State.h"
#include "HttpHeaderTools.h"
#include "HttpReply.h"
#include "HttpRequest.h"
+#include "format/Format.h"
+#include "MemBuf.h"
#include "SquidTime.h"
Auth::Negotiate::UserRequest::UserRequest()
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()
{
}
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];
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;
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);
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
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);
* 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"
/**
void
Auth::Negotiate::Config::done()
{
+ Auth::Config::done();
+
authnegotiate_initialised = 0;
if (negotiateauthenticators) {
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)
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 *
* 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);
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 *);
#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
{
#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;
}
{
public:
MEMPROXY_CLASS(Auth::Ntlm::User);
- User(Auth::Config *);
+ User(Auth::Config *, const char *requestRealm);
~User();
virtual int32_t ttl() const;
#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()
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()
{
}
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];
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);
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);
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
#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;
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();
#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;
void
Auth::Ntlm::Config::done()
{
+ Auth::Config::done();
+
authntlm_initialised = 0;
if (ntlmauthenticators) {
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)
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 *
* 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);
#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 */
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 *);
*/
#include "squid.h"
-#include "base/AsyncCallQueue.h"
#include "base/AsyncCall.h"
+#include "base/AsyncCallQueue.h"
#include "Debug.h"
AsyncCallQueue *AsyncCallQueue::TheInstance = 0;
Subscription.h \
TextException.cc \
TextException.h \
- StringArea.h \
Vector.cc \
Vector.h
+++ /dev/null
-/*
- * 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 */
#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"
#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
#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"
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
#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
*/
#include "squid.h"
#include "base/TextException.h"
-#include "mgr/ActionPasswordList.h"
#include "CacheManager.h"
#include "comm/Connection.h"
#include "Debug.h"
#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>
* 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
* 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
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
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.
=== 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="..."
supported by the proxy.
auth_param negotiate keep_alive on
-
Examples:
# 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]
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:
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.
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.
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
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
*/
#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
#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"
#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
++ statCounter.client_http.errors;
clientUpdateStatHistCounters(logType,
- tvSubMsec(start_time, current_time));
+ tvSubMsec(al->cache.start_time, current_time));
clientUpdateHierCounters(&request->hier);
}
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
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);
/*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 ¬es = SyncNotes(*al, *request);
notes.add((*i)->key.termedBuf(), value);
debugs(33, 3, HERE << (*i)->key.termedBuf() << " " << value);
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) {
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));
//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.
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...
#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"
#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"
#endif
#endif
#if USE_SSL
-#include "ssl/support.h"
#include "ssl/ServerBump.h"
+#include "ssl/support.h"
#endif
#if LINGERING_CLOSE
#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)
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;
*/
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;
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
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
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
*/
#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"
// 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 {
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 */
#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"
#ifndef __COMM_H__
#define __COMM_H__
-#include "CommCalls.h"
#include "comm/IoCallback.h"
+#include "CommCalls.h"
#include "StoreIOBuffer.h"
namespace Ip
#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"
#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
{
#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>
#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"
#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
{
#ifndef _SQUID_COMM_FORWARD_H
#define _SQUID_COMM_FORWARD_H
-#include "base/Vector.h"
#include "base/RefCount.h"
+#include "base/Vector.h"
namespace Comm
{
#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"
#include "NullDelayId.h"
#include "SquidString.h"
#include "SquidTime.h"
-#include "StoreClient.h"
#include "Store.h"
+#include "StoreClient.h"
/// \ingroup DelayPoolsInternal
long DelayPools::MemoryUsed = 0;
#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"
#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"
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;
*/
#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()
#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;
#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"
*/
#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"
*/
#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"
#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"
*/
#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;
#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;
#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;
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,
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
#ifndef SQUID_EVENT_H
#define SQUID_EVENT_H
-#include "base/Vector.h"
#include "AsyncEngine.h"
+#include "base/Vector.h"
#include "MemPool.h"
class StoreEntry;
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 */
// 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;
{
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());
}
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, */
/* 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,
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,
LFT_MIME_TYPE,
LFT_TAG,
- LFT_IO_SIZE_TOTAL,
LFT_EXT_LOG,
LFT_SEQUENCE_NUMBER,
LFT_ICAP_OUTCOME,
LFT_ICAP_STATUS_CODE,
#endif
+ LFT_CREDENTIALS,
#if USE_SSL
LFT_SSL_BUMP_MODE,
#include "squid.h"
-#include "ConfigParser.h"
#include "cache_cf.h"
+#include "ConfigParser.h"
#include "Debug.h"
#include "format/Config.h"
#include <list>
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;
}
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;
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();
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();
}
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 = "%";
}
// 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;
{"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},
/*{"<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},
{"err_code", LFT_SQUID_ERROR },
{"err_detail", LFT_SQUID_ERROR_DETAIL },
{"note", LFT_NOTE },
+ {"credentials", LFT_CREDENTIALS},
{NULL, LFT_NONE} /* this must be last */
};
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;
*/
#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,
#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>
#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"
#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;
#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;
*/
#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);
#include "squid.h"
#include "DiskIO/DiskIOStrategy.h"
-#include "UFSStrategy.h"
#include "UFSStoreState.h"
+#include "UFSStrategy.h"
#include "UFSSwapDir.h"
bool
#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"
#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;
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) {
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()
++ 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();
++ 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;
#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;
#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"
#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"
#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"
}
// 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).
// 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
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 */
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();
// 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()));
}
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:
*
*/
#include "squid.h"
+#include "Debug.h"
#include "Icmp.h"
#include "SquidTime.h"
-#include "Debug.h"
Icmp::Icmp()
{
#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",
#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.
#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>
$(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 \
al->cache.caddr = caddr;
- al->cache.replySize = len;
+ // XXX: move to use icp.clientReply instead
+ al->http.clientReplySz.payloadData = len;
al->cache.code = logcode;
*/
#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
#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"
#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"
* 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"
*/
#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
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
#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
#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>
#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
#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"
#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
#include "base/TextException.h"
#include "globals.h"
#include "ipc/Kids.h"
-#include "tools.h"
#include "SquidConfig.h"
+#include "tools.h"
Kids TheKids;
KidName TheKidName;
#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";
#ifndef SQUID_IPC_PORT_H
#define SQUID_IPC_PORT_H
-#include "SquidString.h"
#include "ipc/UdsOp.h"
+#include "SquidString.h"
namespace Ipc
{
#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"
*/
#include "squid.h"
-#include "Store.h"
#include "ipc/ReadWriteLock.h"
+#include "Store.h"
bool
Ipc::ReadWriteLock::lockShared()
*/
#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>
#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>
#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 *
#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
#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
}
}
+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;
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);
/* 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
*/
#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):
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();
bool Ipc::UdsSender::doneAll() const
{
- return !writing && UdsOp::doneAll();
+ return !writing && !sleeping && UdsOp::doneAll();
}
void Ipc::UdsSender::write()
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
}
}
#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;
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
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:
*/
#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"
*/
#include "squid.h"
-#include "cbdata.h"
#include "CacheManager.h"
+#include "cbdata.h"
#include "dlink.h"
#include "DnsLookupDetails.h"
#include "event.h"
#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"
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],
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],
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,
#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
#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"
#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"
#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"
{
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
/* main loop */
EventLoop mainLoop;
- SignalEngine signalEngine(mainLoop);
+ SignalEngine signalEngine;
mainLoop.registerEngine(&signalEngine);
#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"
#include "defines.h"
#include "MemPool.h"
-#include "StoreIOBuffer.h"
#include "Range.h"
+#include "StoreIOBuffer.h"
class mem_node
{
#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"
#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)
#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"
#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"
#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>
#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
{
#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
#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);
#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"
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;
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]);
}
}
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;
}
}
#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"
#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"
void
peerSelect(Comm::ConnectionList * paths,
HttpRequest * request,
+ AccessLogEntry::Pointer const &al,
StoreEntry * entry,
PSC * callback,
void *callback_data)
psstate->request = request;
HTTPMSGLOCK(psstate->request);
+ psstate->al = al;
psstate->entry = entry;
psstate->paths = paths;
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) {
#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
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);
if (cbdataReferenceValidDone(r->data, &cbdata))
r->handler(cbdata, newReply);
- redirectStateFree(r);
+ delete r;
return;
}
}
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
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
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
}
#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"));
}
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,
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) {
helperOpenServers(storeIds);
}
- if (!init) {
- init = 1;
- CBDATA_INIT_TYPE(redirectStateData);
- }
+ init = true;
}
void
#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"
#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>
#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;
*/
#include "squid.h"
-#include "Store.h"
#include "MemObject.h"
#include "SquidTime.h"
+#include "Store.h"
REMOVALPOLICYCREATE createRemovalPolicy_lru;
#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);
#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);
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
#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>
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
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
*/
#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"
#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"
}
/* SNMP checklists */
-#include "acl/Strategy.h"
#include "acl/Strategised.h"
+#include "acl/Strategy.h"
#include "acl/StringData.h"
class ACLSNMPCommunityStrategy : public ACLStrategy<char const *>
{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;
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)
{
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;
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);
const String &Ssl::ErrorDetail::toString() const
{
- if (!errDetailStr.defined())
+ if (errDetailStr.size() == 0)
buildDetail();
return errDetailStr;
}
*/
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
#include "squid.h"
#include "ErrorDetail.h"
-#include "errorpage.h"
#include "ErrorDetailManager.h"
+#include "errorpage.h"
#include "mime_header.h"
void Ssl::errorDetailInitialize()
}
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);
#include "base/RefCount.h"
#include "HttpRequest.h"
-#include "ssl/support.h"
#include "SquidString.h"
+#include "ssl/support.h"
#if HAVE_MAP
#include <map>
#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)
#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
#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
#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>
#include "squid.h"
-#include "ssl/gadgets.h"
#include "ssl/crtd_message.h"
+#include "ssl/gadgets.h"
#if HAVE_CSTDLIB
#include <cstdlib>
#endif
#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;
#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"
#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>
#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
#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"
#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"
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();
}
#ifndef SQUID_STMEM_H
#define SQUID_STMEM_H
-#include "splay.h"
#include "Range.h"
+#include "splay.h"
class mem_node;
#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"
#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();
#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
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.
}
/*
/* 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);
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);
e->kickProducer();
#endif
+ e->unlock(); // after the "++e->lock_count" above
return 1;
}
#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
#include "squid.h"
-#include "Store.h"
#include "MemObject.h"
#include "SquidConfig.h"
+#include "Store.h"
#include "SwapDir.h"
StoreIoStats store_io_stats;
#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",
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)
#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>
}
#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) {}
#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;
#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;
thePlacement(placeEof),
theStringPos(0),
theBareNeedlePos(0),
+ theFindString(0),
+ theFindSBuf(0),
+ theReportFunc(),
+ theReportNeedle(),
+ theReportPos(),
+ theReportQuote('"'),
caseCount(0),
errorCount(0),
reportCount(0)
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 \
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 \
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 \
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 \
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
--- /dev/null
+#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)
+
--- /dev/null
+#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)
+
--- /dev/null
+#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
#include "squid.h"
-#include "HelperChildConfig.h"
#include "globals.h"
+#include "HelperChildConfig.h"
#define STUB_API "stub_HelperChildconfig.cc"
#include "tests/STUB.h"
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
#include "squid.h"
#include "comm/Connection.h"
-#include "MemObject.h"
#include "HttpReply.h"
+#include "MemObject.h"
#if USE_DELAY_POOLS
#include "DelayPools.h"
#endif
--- /dev/null
+#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)
--- /dev/null
+#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)
+
--- /dev/null
+#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
+
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)
--- /dev/null
+#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)
+
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
--- /dev/null
+#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
#include "squid.h"
-#include "HttpRequest.h"
#include "HttpReply.h"
+#include "HttpRequest.h"
#define STUB_API "http.cc"
#include "tests/STUB.h"
--- /dev/null
+#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 */
--- /dev/null
+#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 */
#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
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 ¶ms) STUB_RETVAL(os)
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
#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)
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
* 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"
--- /dev/null
+#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
#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
#include "squid.h"
-#include "StoreClient.h"
#include "Store.h"
+#include "StoreClient.h"
#define STUB_API "store_client.cc"
#include "tests/STUB.h"
--- /dev/null
+#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
--- /dev/null
+#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
+
--- /dev/null
+#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
+
--- /dev/null
+#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 */
--- /dev/null
+#include "squid.h"
+
+#define STUB_API "whois.cc"
+#include "tests/STUB.h"
+
+class FwdState;
+
+void whoisStart(FwdState *) STUB
+
#if USE_AUTH
-#include "testACLMaxUserIP.h"
#include "auth/AclMaxUserIp.h"
#include "ConfigParser.h"
+#include "testACLMaxUserIP.h"
#if HAVE_STDEXCEPT
#include <stdexcept>
{
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
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);
}
#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 );
void
testBoilerplate::testDemonstration()
{
- CPPUNIT_ASSERT(0 == 0);
+ CPPUNIT_ASSERT_EQUAL(0, 0);
}
#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>
#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);
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("\"\\\\\"", "\\"));
}
#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
#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 );
#include "Mem.h"
#include "MemBuf.h"
#include "SquidConfig.h"
+#include "testHttpParser.h"
CPPUNIT_TEST_SUITE_REGISTRATION( testHttpParser );
// 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
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
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
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
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
#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 );
#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 );
#include "squid.h"
#include <cppunit/TestAssert.h>
+#include "HttpRequestMethod.h"
#include "Mem.h"
#include "testHttpRequestMethod.h"
-#include "HttpRequestMethod.h"
#if HAVE_SSTREAM
#include <sstream>
{
struct stat sb;
- CPPUNIT_ASSERT(::stat(TESTDIR, &sb) == 0);
+ CPPUNIT_ASSERT_EQUAL(0, ::stat(TESTDIR, &sb));
/* TODO: check the size */
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
StockEventLoop loop;
loop.run();
- CPPUNIT_ASSERT(pe->swap_status == SWAPOUT_DONE);
+ CPPUNIT_ASSERT_EQUAL(SWAPOUT_DONE, pe->swap_status);
pe->unlock();
}
{
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();
pe->unlink();
StoreEntry *const pe2 = getEntry(i);
- CPPUNIT_ASSERT(pe2 == NULL);
+ CPPUNIT_ASSERT_EQUAL(static_cast<StoreEntry *>(NULL), pe2);
}
}
#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>
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;
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");
CPPUNIT_ASSERT_EQUAL(0,SBuf("the").compare(SBuf("THE"),caseInsensitive,6));
}
-void testSBuf::testGrow()
+void
+testSBuf::testGrow()
{
SBuf t;
t.assign("foo");
CPPUNIT_ASSERT_EQUAL(ref,match);
}
-void testSBuf::testStartsWith()
+void
+testSBuf::testStartsWith()
{
static SBuf casebuf("THE QUICK");
CPPUNIT_ASSERT(literal.startsWith(SBuf(fox1)));
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;
CPPUNIT_ASSERT_EQUAL(f1,SBuf(fox1));
}
-void testSBuf::testFindFirstOf()
+void
+testSBuf::testFindFirstOf()
{
SBuf haystack(literal);
SBuf::size_type idx;
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);
#define SQUID_UNIT_TEST 1
#include "squid.h"
-#include "testStatHist.h"
#include "StatHist.h"
+#include "testStatHist.h"
CPPUNIT_TEST_SUITE_REGISTRATION(testStatHist);
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);
+
+}
CPPUNIT_TEST( testStatHistBaseEquality );
CPPUNIT_TEST( testStatHistBaseAssignment );
CPPUNIT_TEST( testStatHistLog );
+ CPPUNIT_TEST( testStatHistSum );
CPPUNIT_TEST_SUITE_END();
public:
void testStatHistBaseEquality();
void testStatHistBaseAssignment();
void testStatHistLog();
+ void testStatHistSum();
};
#endif /* TESTSTATHIST_H_ */
#define SQUID_UNIT_TEST 1
#include "squid.h"
-#include "testStore.h"
#include "Store.h"
+#include "testStore.h"
CPPUNIT_TEST_SUITE_REGISTRATION( testStore );
StorePointer aStore(new TestStore);
Store::Root(aStore);
- CPPUNIT_ASSERT(&Store::Root() == aStore.getRaw());
+ CPPUNIT_ASSERT_EQUAL(&Store::Root(),aStore.getRaw());
Store::Root(NULL);
}
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);
}
{
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);
}
{
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);
}
#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 );
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);
}
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);
}
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);
}
#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>
#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 );
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);
}
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);
}
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);
}
#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
#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 );
#include <cppunit/TestAssert.h>
+#include "Mem.h"
#include "testURL.h"
#include "URL.h"
-#include "Mem.h"
#if HAVE_SSTREAM
#include <sstream>
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();
}
/* 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);
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());
}
/** \todo CLEANUP: This file shoudl be called something_stub.cc */
-#include "HttpHeaderRange.h"
#include "HttpHeader.h"
+#include "HttpHeaderRange.h"
#include "Mem.h"
#if 0
*/
#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
#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"
CommTimeoutCbPtrFun(tunnelTimeout, tunnelState));
commSetConnTimeout(tunnelState->client.conn, Config.Timeout.lifetime, timeoutCall);
- peerSelect(&(tunnelState->serverDestinations), request,
+ peerSelect(&(tunnelState->serverDestinations), request, al,
NULL,
tunnelPeerSelectComplete,
tunnelState);
*/
#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
#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 */
#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)
{
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;
WhoisState *p = (WhoisState *)params.data;
debugs(75, 3, "whoisClose: FD " << params.fd);
p->entry->unlock();
- cbdataFree(p);
+ delete p;
}
*/
#include "squid.h"
-#include "wordlist.h"
#include "MemBuf.h"
+#include "wordlist.h"
void
wordlistDestroy(wordlist ** list)
*/
#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>
*/
#include "squid.h"
-#include "stmem.h"
#include "mem_node.h"
+#include "stmem.h"
#if HAVE_IOSTREAM
#include <iostream>
#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"