1. customize the squid.conf configuration file:
% vi /usr/local/squid/etc/squid.conf
- 2. Initalise the cache:
+ 2. Initialise the cache:
% /usr/local/squid/sbin/squid -z
3. start the cache:
* they can be reliably used as array indices. */
register unsigned char c, c1;
- /* A random tempory spot in PATTERN. */
+ /* A random temporary spot in PATTERN. */
const char *p1;
/* Points to the end of the buffer, where we should append. */
/*
* From discussions it was chosen to push compat code as far down as possible.
* That means we can have a separate compat for most
- * compatability and portability hacks and resolutions.
+ * compatibility and portability hacks and resolutions.
*
* This file is meant to collate all those hacks files together and
* provide a simple include for them in the core squid headers
* Update/Maintenance History:
*
* 15-Aug-2007 : Copied from fetchmail 6.3.8
- * - added protection around libray headers
+ * - added protection around library headers
*
* 16-Aug-2007 : Altered configure checks
* Un-hacked slightly to use system gethostbyname()
* Update/Maintenance History:
*
* 15-Aug-2007 : Copied from fetchmail 6.3.8
- * - added protection around libray headers
+ * - added protection around library headers
*
* 16-Aug-2007 : Altered configure checks
* Un-hacked slightly to use system gethostbyname()
* Update/Maintenance History:
*
* 16-Aug-2007 : Copied from fetchmail 6.3.8
- * - added protection around libray headers
+ * - added protection around library headers
* - added use of alternative name xgetnameinfo
* to split from any OS-provided.
*
* Update/Maintenance History:
*
* 24-Sep-2007 : Copied from bind 9.3.3
- * - Added protection around libray headers
+ * - Added protection around library headers
* - Altered configure checks
* - Un-hacked slightly to use system gethostbyname()
*
* Update/Maintenance History:
*
* 24-Sep-2007 : Copied from bind 9.3.3
- * - Added protection around libray headers
+ * - Added protection around library headers
* - Altered configure checks to import
*
* 06-Oct-2007 : Various fixes to allow the build on MinGW
*
* Netfilter have a history of defining their own versions of network protocol
* primitives without sufficient protection against the POSIX defines which are
- * aways present in Linux.
+ * always present in Linux.
*
* netinet/in.h must be included before any other sys header in order to properly
* activate include guards in <linux/libc-compat.h> the kernel maintainers added
int h_addrtype; /* host address type */
int h_length; /* length of address */
char **h_addr_list; /* list of addresses from name server */
-#define h_addr h_addr_list[0] /* address, for backward compatiblity */
+#define h_addr h_addr_list[0] /* address, for backward compatibility */
};
/*
struct hostent *gethostbyname2();
void herror();
char *hstrerror();
-/* IPv6 prototype definitons */
+/* IPv6 prototype definitions */
int getaddrinfo();
void freeaddrinfo();
const char *gai_strerror();
* Error return codes from gethostbyname() and gethostbyaddr()
* (left in extern int h_errno).
*/
-#define HOST_NOT_FOUND 1 /* Authoritive Answer Host not found */
+#define HOST_NOT_FOUND 1 /* Authoritative Answer Host not found */
#define TRY_AGAIN 2 /* Non-Authoritive Host not found, or SERVERFAIL */
#define NO_RECOVERY 3 /* Non recoverable errors, FORMERR, REFUSED, NOTIMP */
#define NO_DATA 4 /* Valid name, no data record of requested type */
* Update/Maintenance History:
*
* 26-Apr-2008 : Copied from FreeBSD via OpenGrok
- * - added protection around libray headers
+ * - added protection around library headers
* - added squid_ prefix for uniqueness
* so we can use it where OS copy is broken.
*
406 Not Acceptable *
- 407 Proxy Authentication Required *
408 Request Timeout *
- 409 Confict *
+ 409 Conflict *
C 410 Gone *
411 Length Required *
412 Precondition Failed *
descr: "Certificate does not match domainname"
name: X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT
-detail: "SSL Certficate error: certificate issuer (CA) not known: %ssl_ca_name"
+detail: "SSL Certificate error: certificate issuer (CA) not known: %ssl_ca_name"
descr: "Unable to get issuer certificate"
name: X509_V_ERR_UNABLE_TO_GET_CRL
descr: "CRL signature failure"
name: X509_V_ERR_CERT_NOT_YET_VALID
-detail: "SSL Certficate is not valid before: %ssl_notbefore"
+detail: "SSL Certificate is not valid before: %ssl_notbefore"
descr: "Certificate is not yet valid"
name: X509_V_ERR_CERT_HAS_EXPIRED
descr: "Self signed certificate in certificate chain"
name: X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY
-detail: "SSL Certficate error: certificate issuer (CA) not known: %ssl_ca_name"
+detail: "SSL Certificate error: certificate issuer (CA) not known: %ssl_ca_name"
descr: "Unable to get local issuer certificate"
name: X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE
/* Encodes a string in one go, including any padding at the end.
* Generates exactly BASE64_ENCODE_RAW_LENGTH(length) bytes of output.
* Supports overlapped operation, if src <= dst. FIXME: Use of overlap
- * is deprecated, if needed there should be a separate public fucntion
+ * is deprecated, if needed there should be a separate public function
* to do that.*/
void
base64_encode_raw(char *dst, size_t length, const uint8_t *src);
}
/*
- * Returns 1 if HP maintians the heap property and 0 otherwise.
+ * Returns 1 if HP maintains the heap property and 0 otherwise.
*/
int
verify_heap_property(heap * hp)
bool
TrieNode::add(char const *aString, size_t theLength, void *privatedata, TrieCharTransform *transform)
{
- /* We trust that privatedata and existant keys have already been checked */
+ /* We trust that privatedata and existent keys have already been checked */
if (theLength) {
int index = transform ? (*transform)(*aString): *aString;
}
/**
- * Adds something to the payload. The caller must guarrantee that
+ * Adds something to the payload. The caller must guarantee that
* there is enough space in the payload string to accommodate the
* added value.
* payload_length and hdr will be modified as a side-effect.
#define SQUID_NTLMAUTH_H
/* NP: All of this cruft is little endian */
-/* Endian functions are usualy handled by the OS but not always. */
+/* Endian functions are usually handled by the OS but not always. */
#include "ntlmauth/support_endian.h"
#ifdef __cplusplus
* constant. Best metric to watch is "average time" and total cumulated
* time in given timeframe, which really show percentage of time spent
* in given section of code, and its average completion time. This data
- * could be used to detect bottlenecks withing squid and optimise them.
+ * could be used to detect bottlenecks within squid and optimise them.
*
* \par
* TOTALS are quite off reality. Its there just to summarise cumulative
* node as high in the tree as we can go.
*
* The present version of the code makes use of normal routes in short-
- * circuiting an explict mask and compare operation when testing whether
+ * circuiting an explicit mask and compare operation when testing whether
* a key satisfies a normal route, and also in remembering the unique leaf
* that governs a subtree.
*/
j = 0;
- /* We only want to print as much as sepcified in Len */
+ /* We only want to print as much as specified in Len */
while (pkt_ptr != NULL) {
switch (RFCNB_Pkt_Type(resp)) {
- case RFCNB_SESSION_REJ: /* Didnt like us ... too bad */
+ case RFCNB_SESSION_REJ: /* Didn't like us ... too bad */
/* Why did we get rejected ? */
max_write_data = (File_Handle -> tree -> mbs) - pkt_len;
- /* the 3 is for the data block id and length that preceeds the data */
+ /* the 3 is for the data block id and length that precedes the data */
while (bytes_left > 0) {
SSVAL(SMB_Hdr(pkt), SMB_hdr_mid_offset, tree -> con -> mid);
SSVAL(SMB_Hdr(pkt), SMB_hdr_uid_offset, tree -> con -> uid);
- /* Tell server we known about non-dos names and extended attibutes */
+ /* Tell server we known about non-dos names and extended attributes */
SSVAL(SMB_Hdr(pkt), SMB_hdr_flg2_offset,
(SMB_FLG2_NON_DOS | SMB_FLG2_EXT_ATR));
SSVAL(SMB_Hdr(pkt), SMB_trans_len, param_len + strlen(SMB_LMAPI_SLOT) + 1);
- p = SMB_Hdr(pkt) + SMB_trans_len + 2; /* Skip the BCC and ect */
+ p = SMB_Hdr(pkt) + SMB_trans_len + 2; /* Skip the BCC and etc */
strcpy(p, SMB_LMAPI_SLOT);
p = p + strlen(SMB_LMAPI_SLOT) + 1;
SSVAL(SMB_Hdr(pkt), SMB_trans_len, param_len + strlen(SMB_LMAPI_SLOT) +
1 + data_len);
- p = SMB_Hdr(pkt) + SMB_trans_len + 2; /* Skip the BCC and ect */
+ p = SMB_Hdr(pkt) + SMB_trans_len + 2; /* Skip the BCC and etc */
strcpy(p, SMB_LMAPI_SLOT);
p = p + strlen(SMB_LMAPI_SLOT) + 1;
#define SMB_openx_mod_offset 39 /* mode to open with */
#define SMB_openx_atr_offset 41 /* search attributes */
#define SMB_openx_fat_offset 43 /* File attributes */
-#define SMB_openx_tim_offset 45 /* time and date of creat */
+#define SMB_openx_tim_offset 45 /* time and date of create */
#define SMB_openx_ofn_offset 49 /* Open function */
#define SMB_openx_als_offset 51 /* Space to allocate on */
#define SMB_openx_res_offset 55 /* reserved */
/* Negotiate the protocol we will use from the list passed in Prots */
/* we return the index of the accepted protocol in NegProt, -1 indicates */
-/* none acceptible, and our return value is 0 if ok, <0 if problems */
+/* none acceptable, and our return value is 0 if ok, <0 if problems */
int SMB_Negotiate(SMB_Handle_Type Con_Handle, const char *Prots[])
The parser now accepts two additional pieces of information in a mib:
DESCRIPTION and INDEX. It also handles "ACCESS" and "MAX-ACCESS".
With these additions, SNMPv2 SMI MIBs can be parsed with minimal
-changes. (Specificly, with the removal of text conventions, etc.)
+changes. (Specifically, with the removal of text conventions, etc.)
The included CMU MIB should be a good example.
}
/*
- * asn_parse_objid - pulls an object indentifier out of an ASN object
+ * asn_parse_objid - pulls an object identifier out of an ASN object
* identifier type.
* On entry, datalength is input as the number of valid bytes following
* "data". On exit, it is returned as the number of valid bytes
/*
* To do: Write an asn_parse_exception function to go with the new
* asn_build_exception function below so that the exceptional values can
- * be handled in input packets aswell as output ones.
+ * be handled in input packets as well as output ones.
*/
/*
CPPUNIT_ASSERT(memcmp(unescaped_str, "w%0rd",6)==0);
xfree(unescaped_str);
- /* Handle '0' bytes embeded in encoded % */
+ /* Handle '0' bytes embedded in encoded % */
unescaped_str = xstrdup("w%%00%rd");
rfc1738_unescape(unescaped_str);
CPPUNIT_ASSERT(memcmp(unescaped_str, "w%00%rd",8)==0);
my $extras = ''; # DEBUG section, inspired by ..., etc.
if (defined $boiler) {
- my $copyClaims = ''; # formatted Copyright claims extraced from sources
+ my $copyClaims = ''; # formatted Copyright claims extracted from sources
my $preserveClaims = 0; # whether to preserve them or not
if (my @rawClaims = ($boiler =~ m/$reClaims/g)) {
}
# Some files have license declarations way down in the code so we may not
- # find a boilerplate at all or find an "empty" boilerplate preceeding them.
+ # find a boilerplate at all or find an "empty" boilerplate preceding them.
my $license =
"Copyright|".
"This program is free software|".
system("find ./ -print -type f > $tmpdir/fp$$");
chdir($tmpdir);
# this cut prints only the lines with 4 fields so unnecessary lines
-# are supressed
+# are suppressed
system("cut -d'/' -f4 -s fp$$ >> cd$$ ; rm fp$$")
}
system("sort -T $tmpdir cd$$ >scd$$; rm cd$$");
vaid
valuse
whan
+whats
whe
wil
wnat
## Please see the COPYING and CONTRIBUTORS files for details.
##
-# Reads cache.log from STDIN, preferrably with full debugging enabled.
+# Reads cache.log from STDIN, preferably with full debugging enabled.
# Finds creation and destruction messages for a given class.
# At the end, reports log lines that correspond to still-alive objects.
# Also reports the number of objects found (total and still-alive).
my $pid;
if($pid=fork()){
- #do parrent staf
+ #do parent staf
close(FROM_ASTYLE);
if(!open(IN, "<$in")){
# -c -> set cache directory
# -n -> use Netscape cache format (default is CERN)
# -p -> port number to listen on (default 3130)
-# -v -> verbose - writes activitiy log to stderr
+# -v -> verbose - writes activity log to stderr
#
# group -> multicast group to listen on
# The error-details.txt file consist of records like the following:
#
# name: X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT
-# detail: "SSL Certficate error: certificate issuer (CA) not known: %ssl_ca_name"
+# detail: "SSL Certificate error: certificate issuer (CA) not known: %ssl_ca_name"
# descr: "Unable to get issuer certificate"
#
# The records separated with an empty line.
#
# The output of the tool is a source file where each block of consecutive
# include directives for project-specific files (#include "header.h")
-# is sorted with this specification: squid.h (if present) is alwasy first,
+# is sorted with this specification: squid.h (if present) is always first,
# then the other directives are sorted in case-insensitive alphabetical order.
#
# Suggested usage:
md52=`cat $FILENAME.astylebak| tr -d "\n \t\r" | $MD5`;
if test "$md51" != "$md52"; then
- echo "ERROR: File $FILENAME not formating well";
+ echo "ERROR: File $FILENAME not formatting well";
mv $FILENAME $FILENAME.astylebad
mv $FILENAME.astylebak $FILENAME
git checkout -- ${FILENAME}
# Build the GPERF generated content
make -C src/http gperf-files
-# Run formating
+# Run formatting
echo "" >doc/debug-sections.tmp
srcformat || exit 1
sort -u <doc/debug-sections.tmp | sort -n >doc/debug-sections.tmp2
generate_page("${top}/${pagetemplate}", $option{$name});
}
-# and now, the alpabetic index file!
+# and now, the alphabetic index file!
my $fh;
my $fh_open = 0;
/* Abstract interface for async engines which an event loop can utilise.
*
- * Some implementations will be truely async, others like the event engine
+ * Some implementations will be truly async, others like the event engine
* will be pseudo async.
*/
*
* The timeout value is a requested timeout for this engine - the engine
* should not block for more than this period. (If it takes longer than the
- * timeout to do actual checks thats fine though undesirable).
+ * timeout to do actual checks that's fine though undesirable).
*/
virtual int checkEvents(int timeout) = 0;
};
bool hasQueue() const; ///< whether any clients are waiting for write quota
bool hasQueue(const CommQuotaQueue*) const; ///< has a given queue
unsigned int quotaEnqueue(int fd); ///< client starts waiting in queue; create the queue if necessary
- int quotaPeekFd() const; ///< retuns the next fd reservation
+ int quotaPeekFd() const; ///< returns the next fd reservation
unsigned int quotaPeekReserv() const; ///< returns the next reserv. to pop
void quotaDequeue(); ///< pops queue head from queue
void kickQuotaQueue(); ///< schedule commHandleWriteHelper call
/**
* Configure client write limiting (note:"client" here means - IP). It is called
* by httpAccept in client_side.cc, where the initial bucket size (anInitialBurst)
- * computed, using the configured maximum bucket vavlue and configured initial
+ * computed, using the configured maximum bucket value and configured initial
* bucket value(50% by default).
*
* \param writeSpeedLimit is speed limit configured in config for this pool
/* Dispatch code to handle events that have completed. Completed events are queued
* with a completion dispatcher by the OS Async engine - i.e. the poll or kqueue or
- * select loop, or a signal reciever, or the diskd/diskthreads/etc modules.
+ * select loop, or a signal receiver, or the diskd/diskthreads/etc modules.
*/
class CompletionDispatcher
static char *RegexStrtokFile();
/**
- * Parse the next token as a regex patern. The regex patterns are non quoted
+ * Parse the next token as a regex pattern. The regex patterns are non quoted
* tokens.
*/
static char *RegexPattern();
/**
* Strict syntax mode. Does not allow not alphanumeric characters in unquoted tokens.
- * Controled by the configuration_includes_quoted_values in squid.conf but remains
+ * Controlled by the configuration_includes_quoted_values in squid.conf but remains
* false when the the legacy ConfigParser::NextQuotedToken() call forces
* RecognizeQuotedValues to be temporary true.
*/
static bool AllowMacros_;
static bool ParseQuotedOrToEol_; ///< The next tokens will be handled as quoted or to_eol token
static bool RecognizeQuotedPair_; ///< The next tokens may contain quoted-pair (\-escaped) characters
- static bool PreviewMode_; ///< The next token will not poped from cfg files, will just previewd.
+ static bool PreviewMode_; ///< The next token will not popped from cfg files, will just previewd.
static bool ParseKvPair_; ///<The next token will be handled as kv-pair token
static enum ParsingStates {atParseKey, atParseValue} KvPairState_; ///< Parsing state while parsing kv-pair tokens
};
const int expectedWait = max(oldestWait, rateWait);
if (expectedWait < 0 ||
static_cast<time_msec_t>(expectedWait) < config.ioTimeout)
- return true; // expected wait time is acceptible
+ return true; // expected wait time is acceptable
debugs(47,2, HERE << "cannot wait: " << expectedWait <<
" oldest: " << SipcIo(KidIdentifier, oldestIo, diskId));
*/
bool runOnce();
- /** set the primary async engine. The primary async engine recieves the
+ /** set the primary async engine. The primary async engine receives the
* lowest requested timeout gathered from the other engines each loop.
* (There is a default of 10ms if all engines are idle or request higher
* delays).
#include <vector>
-/// Counts events, forgetting old ones. Usefull for "3 errors/minute" limits.
+/// Counts events, forgetting old ones. Useful for "3 errors/minute" limits.
class FadingCounter
{
public:
double horizon;
private:
- const int precision; ///< #counting slots, controls measur. occuracy
+ const int precision; ///< #counting slots, controls measur. accuracy
double delta; ///< sub-interval duration = horizon/precision
double lastTime; ///< time of the last update
return length > 0;
}
-/* merges recepient with donor if possible; returns true on success
+/* merges recipient with donor if possible; returns true on success
* both specs must be canonized prior to merger, of course */
bool
HttpHdrRangeSpec::mergeWith(const HttpHdrRangeSpec * donor)
assert(rhs > offset);
length = rhs - offset;
} else {
- /* does recepient contain donor? */
+ /* does recipient contain donor? */
merged =
offset <= donor->offset && donor->offset < rhs;
}
++p;
}
- /* decrease ilen to still match the token for ';' qualified non '=' statments */
+ /* decrease ilen to still match the token for ';' qualified non '=' statements */
else if ((p = strchr(item, ';')) && (p - item < ilen)) {
ilen = p - item;
++p;
}
/* Is this a targeted directive? */
- /* TODO: remove the temporary useage and use memrchr and the information we have instead */
+ /* TODO: remove the temporary usage and use memrchr and the information we have instead */
temp = xstrndup (item, initiallen + 1);
if (!((target = strrchr (temp, ';')) && !strchr (target, '"') && *(target + 1) != '\0'))
if (field_start == field_end) {
if (field_ptr < header_end) {
- debugs(55, warnOnError, "WARNING: unparseable HTTP header field near {" <<
+ debugs(55, warnOnError, "WARNING: unparsable HTTP header field near {" <<
getStringPrefix(field_start, hdrLen-(field_start-header_start)) << "}");
PROF_stop(HttpHeaderParse);
clean();
const auto e = HttpHeaderEntry::parse(field_start, field_end, owner);
if (!e) {
- debugs(55, warnOnError, "WARNING: unparseable HTTP header field {" <<
+ debugs(55, warnOnError, "WARNING: unparsable HTTP header field {" <<
getStringPrefix(field_start, field_end-field_start) << "}");
debugs(55, warnOnError, " in {" << getStringPrefix(header_start, hdrLen) << "}");
/**
* There may be more than one byte range specified in the request.
- * This object holds all range specs in order of their appearence
+ * This object holds all range specs in order of their appearance
* in the request because we SHOULD preserve that order.
*/
class HttpHdrRange
}
/**
- * parses an int field, complains if soemthing went wrong, returns true on
+ * parses an int field, complains if something went wrong, returns true on
* success
*/
int
// catch missing or negative status value (negative '-' is not a digit)
pos = protoPrefix.psize();
- // skip arbitrary number of digits and a dot in the verion portion
+ // skip arbitrary number of digits and a dot in the version portion
while ((size_t)pos <= hdr_len && (*(buf+pos) == '.' || xisdigit(*(buf+pos)) ) ) ++pos;
// catch missing version info
void packHeadersUsingSlowPacker(Packable &p) const;
/** Clone this reply.
- * Could be done as a copy-contructor but we do not want to accidently copy a HttpReply..
+ * Could be done as a copy-contructor but we do not want to accidentally copy a HttpReply..
*/
HttpReply *clone() const;
// content is long enough to possibly hold a reply
// 2 being magic size of a 1-byte request method plus space delimiter
if (hdr_len < 2) {
- // this is ony a real error if the headers apparently complete.
+ // this is only a real error if the headers apparently complete.
if (hdr_len > 0) {
debugs(58, 3, HERE << "Too large request header (" << hdr_len << " bytes)");
*error = Http::scInvalidHeader;
{
// Intercepted request with Host: header which cannot be trusted.
// Because it failed verification, or someone bypassed the security tests
- // we cannot cache the reponse for sharing between clients.
+ // we cannot cache the response for sharing between clients.
// TODO: update cache to store for particular clients only (going to same Host: and destination IP)
if (!flags.hostVerified && (flags.intercepted || flags.interceptTproxy))
return false;
* ----------
*
* MemBuffer is a memory-resident buffer with printf()-like interface. It
- * hides all offest handling and overflow checking. Moreover, it has a
- * build-in control that no partial data has been written.
+ * hides all offset handling and overflow checking. Moreover, it has a
+ * built-in control that no partial data has been written.
*
* MemBuffer is designed to handle relatively small data. It starts with a
* small buffer of configurable size to avoid allocating huge buffers all the
/* Fix of bug 753r. The value of vargs is undefined
* after vsnprintf() returns. Make a copy of vargs
- * incase we loop around and call vsnprintf() again.
+ * in case we loop around and call vsnprintf() again.
*/
va_list ap;
va_copy(ap,vargs);
/// Walks through the possible values list of the note, selects
/// the first value, matching the given HttpRequest and HttpReply
- /// and assignes the given 'matched' to it.
+ /// and assigns the given 'matched' to it.
/// \return true if matched, false otherwise
bool match(HttpRequest *request, HttpReply *reply, const AccessLogEntryPointer &al, SBuf &matched);
const SBuf &key() const { return theKey; }
bool internal = false;
/** if set, request to try very hard to keep the connection alive */
bool mustKeepalive = false;
- /** set if the rquest wants connection oriented auth */
+ /** set if the request wants connection oriented auth */
bool connectionAuth = false;
/** set if connection oriented auth can not be supported */
bool connectionAuthDisabled = false;
bool pinned = false;
/** Authentication was already sent upstream (e.g. due tcp-level auth) */
bool authSent = false;
- /** Deny direct forwarding unless overriden by always_direct
+ /** Deny direct forwarding unless overridden by always_direct
* Used in accelerator mode */
bool noDirect = false;
/** Reply with chunked transfer encoding */
acl_access *followXFF;
#endif /* FOLLOW_X_FORWARDED_FOR */
- /// acceptible PROXY protocol clients
+ /// acceptable PROXY protocol clients
acl_access *proxyProtocol;
/// spoof_client_ip squid.conf acl.
time_t getCurrentTime(void);
int tvSubMsec(struct timeval, struct timeval);
-/// timeval substraction operation
+/// timeval subtraction operation
/// \param[out] res = t2 - t1
void tvSub(struct timeval &res, struct timeval const &t1, struct timeval const &t2);
*
* In practice, the requirements are less strict,
* but then it gets hard to define them without math notation.
- * val_in is applied after offseting the value but before scaling
+ * val_in is applied after offsetting the value but before scaling
* 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);
void lock(const char *context);
/// disclaim shared ownership; may remove entry from store and delete it
- /// returns remaning lock level (zero for unlocked and possibly gone entry)
+ /// returns remaining lock level (zero for unlocked and possibly gone entry)
int unlock(const char *context);
/// returns a local concurrent use counter, for debugging
std::ostream &print(std::ostream &os) const;
private:
- uint8_t raw[3]; // designed to follow "op" members, in pading space
+ uint8_t raw[3]; // designed to follow "op" members, in padding space
};
inline std::ostream &
* The value of the response's Expires: header, if any.
* If the response does not have an Expires: header, this
* is set to -1.
- * If the response has an invalid (unparseable)
+ * If the response has an invalid (unparsable)
* Expires: header, it is also set to -1. There are some cases
* where Squid sets expires to -2. This happens for the
* internal "netdb" object and for FTP URL responses.
/**
* The value of the response's Last-modified: header, if any.
* This is set to -1 if there is no Last-modified: header,
- * or if it is unparseable.
+ * or if it is unparsable.
*/
SwappedTime lastmod = 0;
* Note: the original code with a loop is broken because it uses strstr()
* instead of strnstr(). If 's' contains a 'del', strListIsSubstr() may
* return true when it should not. If 's' does not contain a 'del', the
- * implementaion is equavalent to strstr()! Thus, we replace the loop with
+ * implementation is equavalent to strstr()! Thus, we replace the loop with
* strstr() above until strnstr() is available.
*/
}
if (svcHandle == 0)
return 1;
- /* Set Process work dir to directory cointaining squid.exe */
+ /* Set Process work dir to directory containing squid.exe */
GetModuleFileName(NULL, path, 512);
WIN32_module_name=xstrdup(path);
} else if (s_iInitCount < 0)
return (s_iInitCount);
- /* s_iInitCount == 0. Do the initailization */
+ /* s_iInitCount == 0. Do the initialization */
iVersionRequested = MAKEWORD(2, 0);
err = WSAStartup((WORD) iVersionRequested, &wsaData);
/// configures ACL options, throwing on configuration errors
virtual void parseFlags();
- /// parses node represenation in squid.conf; dies on failures
+ /// parses node representation in squid.conf; dies on failures
virtual void parse() = 0;
virtual char const *typeString() const = 0;
virtual bool isProxyAuth() const;
namespace Acl
{
-/// Configurable all-of ACL. Each ACL line is a conjuction of ACLs.
+/// Configurable all-of ACL. Each ACL line is a conjunction of ACLs.
/// Uses AndNode and OrNode to handle squid.conf configuration where multiple
/// acl all-of lines are always ORed together.
class AllOf: public Acl::InnerNode
* Working on setting up a proper firewall for a network containing some
* Win'95 computers at our Univ, I've discovered that some smart students
* avoid the restrictions easily just changing their IP addresses in Win'95
- * Contol Panel... It has been getting boring, so I took Squid-1.1.18
+ * Control Panel... It has been getting boring, so I took Squid-1.1.18
* sources and added a new acl type for hard-wired access control:
*
* acl <name> arp <Ethernet address> ...
virtual int doMatch(ACLChecklist *checklist, Nodes::const_iterator start) const;
};
-/// An inner ACL expression tree node representing a boolean conjuction (AND)
+/// An inner ACL expression tree node representing a boolean conjunction (AND)
/// operator applied to a list of child tree nodes.
/// For example, conditions expressed on a single http_access line are ANDed.
class AndNode: public InnerNode
void
aclParseAclList(ConfigParser &, Acl::Tree **treep, const char *label)
{
- // accomodate callers unable to convert their ACL list context to string
+ // accommodate callers unable to convert their ACL list context to string
if (!label)
label = "...";
/// The label parameter identifies the context (for debugging).
/// \ingroup ACLAPI
void aclParseAclList(ConfigParser &parser, Acl::Tree **, const char *label);
-/// Template to convert various context lables to strings. \ingroup ACLAPI
+/// Template to convert various context labels to strings. \ingroup ACLAPI
template <class Any>
inline
void aclParseAclList(ConfigParser &parser, Acl::Tree **tree, const Any any)
if (!cfgline)
cfgline = xstrdup(config_input_line);
- // expect a list of ACL names, each possibly preceeded by '!' for negation
+ // expect a list of ACL names, each possibly preceded by '!' for negation
while (const char *t = ConfigParser::strtokFile()) {
const bool negated = (*t == '!');
if (mask.isIPv4()) {
/* locate what CIDR mask was _probably_ meant to be in its native protocol format. */
/* this will completely crap out with a security fail-open if the admin is playing mask tricks */
- /* however, thats their fault, and we do warn. see bug 2601 for the effects if we don't do this. */
+ /* however, that's their fault, and we do warn. see bug 2601 for the effects if we don't do this. */
unsigned int m = mask.cidr();
debugs(28, DBG_CRITICAL, "WARNING: IPv4 netmasks are particularly nasty when used to compare IPv6 to IPv4 ranges.");
debugs(28, DBG_CRITICAL, "WARNING: For now we will assume you meant to write /" << m);
* Added support for running on a Domain Controller.
* Version 1.10
* 01-05-2003 Guido Serassio
- * Added option for case insensitive group name comparation.
+ * Added option for case insensitive group name comparison.
* More debug info.
* Updated documentation.
* Segfault bug fix (Bugzilla #574)
debug("LsaQueryInformationPolicy Error: %ld\n", status);
} else {
- /* Get name in useable format */
+ /* Get name in usable format */
DomainName = AllocStrFromLSAStr(ppdiDomainInfo->Name);
/*
#define LDAP_ERR_NULL -1 /* Null edui_ldap_t pointer */
#define LDAP_ERR_POINTER -2 /* Null l->lp pointer */
#define LDAP_ERR_PARAM -3 /* Null or Missing parameters */
-#define LDAP_ERR_INIT -4 /* Not initalized */
+#define LDAP_ERR_INIT -4 /* Not initialized */
#define LDAP_ERR_OPEN -5 /* Not open */
#define LDAP_ERR_CONNECT -6 /* Unable to connect */
#define LDAP_ERR_BIND -7 /* Not bound */
local_printfx("\n");
}
-/* Initalizes program's configuration paremeters */
+/* Initializes program's configuration parameters */
static void
InitConf()
{
/* InitLDAP() - <edui_ldap_t>
*
- * Initalize LDAP structure for use, zeroing out all variables.
+ * Initialize LDAP structure for use, zeroing out all variables.
*
*/
static void
OpenLDAP(edui_ldap_t *l, char *h, unsigned int p)
{
if ((l == NULL) || (h == NULL)) return LDAP_ERR_NULL;
- if (!(l->status & LDAP_INIT_S)) return LDAP_ERR_INIT; /* Not initalized, or might be in use */
+ if (!(l->status & LDAP_INIT_S)) return LDAP_ERR_INIT; /* Not initialized, or might be in use */
if (l->status & LDAP_OPEN_S) return LDAP_ERR_OPEN; /* Already open */
if (l->status & LDAP_BIND_S) return LDAP_ERR_BIND; /* Already bound */
int s;
if (l == NULL) return LDAP_ERR_NULL;
if (l->lp == NULL) return LDAP_ERR_NULL;
- if (!(l->status & LDAP_INIT_S)) return LDAP_ERR_INIT; /* Connection not initalized */
+ if (!(l->status & LDAP_INIT_S)) return LDAP_ERR_INIT; /* Connection not initialized */
if (!(l->status & LDAP_OPEN_S)) return LDAP_ERR_OPEN; /* Connection not open */
if (l->lm != NULL) {
if (l == NULL) return LDAP_ERR_NULL;
if ((v > 3) || (v < 1)) return LDAP_ERR_PARAM;
if (l->lp == NULL) return LDAP_ERR_POINTER;
- if (!(l->status & LDAP_INIT_S)) return LDAP_ERR_INIT; /* Not initalized */
+ if (!(l->status & LDAP_INIT_S)) return LDAP_ERR_INIT; /* Not initialized */
if (!(l->status & LDAP_OPEN_S)) return LDAP_ERR_OPEN; /* Not open */
if (l->status & LDAP_BIND_S) return LDAP_ERR_BIND; /* Already bound */
{
int s;
if (l == NULL) return LDAP_ERR_NULL;
- if (!(l->status & LDAP_INIT_S)) return LDAP_ERR_INIT; /* Not initalized */
+ if (!(l->status & LDAP_INIT_S)) return LDAP_ERR_INIT; /* Not initialized */
if (!(l->status & LDAP_OPEN_S)) return LDAP_ERR_OPEN; /* Not open */
if (l->status & LDAP_BIND_S) return LDAP_ERR_BIND; /* Already bound */
if (l->lp == NULL) return LDAP_ERR_POINTER; /* Error */
void *y, *z;
if (l == NULL) return LDAP_ERR_NULL;
if (ip == NULL) return LDAP_ERR_PARAM;
- if (!(l->status & LDAP_INIT_S)) return LDAP_ERR_INIT; /* Not initalized */
+ if (!(l->status & LDAP_INIT_S)) return LDAP_ERR_INIT; /* Not initialized */
if (!(l->status & LDAP_OPEN_S)) return LDAP_ERR_OPEN; /* Not open */
if (!(l->status & LDAP_BIND_S)) return LDAP_ERR_BIND; /* Not bound */
ResetLDAP(edui_ldap_t *l)
{
if (l == NULL) return LDAP_ERR_NULL;
- if (!(l->status & LDAP_INIT_S)) return LDAP_ERR_INIT; /* Not initalized */
+ if (!(l->status & LDAP_INIT_S)) return LDAP_ERR_INIT; /* Not initialized */
if (!(l->status & LDAP_OPEN_S)) return LDAP_ERR_OPEN; /* Not open */
if (!(l->status & LDAP_BIND_S)) return LDAP_ERR_BIND; /* Not bound */
if (!(l->status & LDAP_PERSIST_S)) return LDAP_ERR_PERSIST; /* Not persistent */
int swi;
char bufa[EDUI_MAXLEN], bufb[EDUI_MAXLEN], bufc[EDUI_MAXLEN], bufd[EDUI_MAXLEN], bufg[EDUI_MAXLEN];
if (l == NULL) return LDAP_ERR_NULL;
- if (!(l->status & LDAP_INIT_S)) return LDAP_ERR_INIT; /* Not initalized */
+ if (!(l->status & LDAP_INIT_S)) return LDAP_ERR_INIT; /* Not initialized */
if (!(l->status & LDAP_OPEN_S)) return LDAP_ERR_OPEN; /* Not open */
if (!(l->status & LDAP_BIND_S)) return LDAP_ERR_BIND; /* Not Bound */
if (l->search_ip[0] == '\0') return LDAP_ERR_DATA; /* Search IP is required */
if (l == NULL) return LDAP_ERR_NULL;
if ((scope < 0) || (filter == NULL)) return LDAP_ERR_PARAM; /* If attrs is NULL, then all attrs will return */
if (l->lp == NULL) return LDAP_ERR_POINTER;
- if (!(l->status & LDAP_INIT_S)) return LDAP_ERR_INIT; /* Not initalized */
+ if (!(l->status & LDAP_INIT_S)) return LDAP_ERR_INIT; /* Not initialized */
if (!(l->status & LDAP_OPEN_S)) return LDAP_ERR_OPEN; /* Not open */
if (!(l->status & LDAP_BIND_S)) return LDAP_ERR_BIND; /* Not bound */
if (l->status & LDAP_SEARCH_S) return LDAP_ERR_SEARCHED; /* Already searching */
LDAPMessage *ent;
if (l == NULL) return LDAP_ERR_NULL;
if (l->lp == NULL) return LDAP_ERR_POINTER;
- if (!(l->status & LDAP_INIT_S)) return LDAP_ERR_INIT; /* Not initalized */
+ if (!(l->status & LDAP_INIT_S)) return LDAP_ERR_INIT; /* Not initialized */
if (!(l->status & LDAP_OPEN_S)) return LDAP_ERR_OPEN; /* Not open */
if (!(l->status & LDAP_BIND_S)) return LDAP_ERR_BIND; /* Not bound */
if (!(l->status & LDAP_SEARCH_S)) return LDAP_ERR_NOT_SEARCHED; /* Not searched */
case LDAP_ERR_POINTER:
return "Null LDAP pointer";
case LDAP_ERR_PARAM:
- return "Null or Missing paremeter(s)";
+ return "Null or Missing parameter(s)";
case LDAP_ERR_INIT:
- return "LDAP data not initalized";
+ return "LDAP data not initialized";
case LDAP_ERR_OPEN:
return "LDAP connection is not active";
case LDAP_ERR_CONNECT:
case LDAP_ERR_NOT_SEARCHED:
return "LDAP connection has not been searched";
case LDAP_ERR_INVALID:
- return "Invalid paremeters";
+ return "Invalid parameters";
case LDAP_ERR_OOB:
- return "Paremeter is out of bounds";
+ return "Parameter is out of bounds";
case LDAP_ERR_PERSIST:
return "Persistent mode is not active";
case LDAP_ERR_DATA:
}
}
- /* Set predefined required paremeters if none are given, localhost:LDAP_PORT, etc */
+ /* Set predefined required parameters if none are given, localhost:LDAP_PORT, etc */
if (edui_conf.host[0] == '\0') /* Default to localhost */
xstrncpy(edui_conf.host, "localhost", sizeof(edui_conf.host));
if (edui_conf.port < 0)
if (!(edui_ldap.status & LDAP_INIT_S)) {
InitLDAP(&edui_ldap);
debug("InitLDAP() -> %s\n", ErrLDAP(LDAP_ERR_SUCCESS));
- if (edui_conf.mode & EDUI_MODE_PERSIST) /* Setup persistant mode */
+ if (edui_conf.mode & EDUI_MODE_PERSIST) /* Setup persistent mode */
edui_ldap.status |= LDAP_PERSIST_S;
}
if ((edui_ldap.status & LDAP_IDLE_S) && (edui_elap > 0)) {
current_entry->address =
(((inet_addr (tmpbuf))) & current_entry->netmask);
} else {
- /* when theres no slash, we figure the netmask is /32 */
+ /* when there's no slash, we figure the netmask is /32 */
current_entry->address = (inet_addr(tmpbuf));
current_entry->netmask = (inet_addr("255.255.255.255"));
}
It uses B<ldapsearch> from Openldap to lookup the name of a AD group sid.
This helper must be used in with the negotiate_kerberos_auth helper in a
-Microsft AD or Samba environement.
+Microsoft AD or Samba environment.
It reads from the standard input the domain username and a list of group sids
and tries to match the group SIDs to the AD group sids.
typedef TDB_DATA DB_ENTRY;
#else
-#error "Either Berkley DB or Trivial DB must be available"
+#error "Either Berkeley DB or Trivial DB must be available"
#endif
static void
const char *channel_id = strtok(request, " ");
char *detail = strtok(NULL, "\n");
if (detail == NULL) {
- // Only 1 paramater supplied. We are expecting at least 2 (including the channel ID)
+ // Only 1 parameter supplied. We are expecting at least 2 (including the channel ID)
fprintf(stderr, "FATAL: %s is concurrent and requires the concurrency option to be specified.\n", program_name);
shutdown_db();
exit(EXIT_FAILURE);
#define TQ_BUFFERSIZE 1024
/** If there is more than this given number of seconds between two
- * sucessive requests, than the second request will be treated as a
+ * successive requests, than the second request will be treated as a
* new request and the time between first and seconds request will
* be treated as a activity pause.
*
if (!theCause) { // probably sent a request message
if (dynamic_cast<HttpReply*>(aMsg)) { // we got a response message
if (HttpRequest *cause = dynamic_cast<HttpRequest*>(theMsg)) {
- // definately sent request, now use it as the cause
+ // definitely sent request, now use it as the cause
theCause = cause; // moving the lock
theMsg = 0;
debugs(93,3, HERE << "in request satisfaction mode");
adapted = true;
clearAdaptation(theLauncher);
- if (!updatePlan(true)) // do not immediatelly advance the new plan
+ if (!updatePlan(true)) // do not immediately advance the new plan
thePlan.next(filter());
step();
}
void Adaptation::Iterator::noteInitiatorAborted()
{
- announceInitiatorAbort(theLauncher); // propogate to the transaction
+ announceInitiatorAbort(theLauncher); // propagate to the transaction
clearInitiator();
mustStop("initiator gone");
}
}
}
- // if no port, the caller may use service_configConfigs or supply the default if neeeded
+ // if no port, the caller may use service_configConfigs or supply the default if needed
++s;
e = strchr(s, '\0');
// TODO: metaServerIp, metaAuthenticatedUser, and metaAuthenticatedGroups
- // If the name is unknown, metaValue returns an emtpy area
+ // If the name is unknown, metaValue returns an empty area
return metaValue(name);
}
void Adaptation::Icap::Launcher::noteInitiatorAborted()
{
- announceInitiatorAbort(theXaction); // propogate to the transaction
+ announceInitiatorAbort(theXaction); // propagate to the transaction
clearInitiator();
Must(done()); // should be nothing else to do
{
/**
- * Set of 'mode' flags defining types of trafic which can be received.
+ * Set of 'mode' flags defining types of traffic which can be received.
*
* Use to determine the processing steps which need to be applied
* to this traffic under any special circumstances which may apply.
src = url;
i = 0;
- /* Then everything until first /; thats host (and port; which we'll look for here later) */
+ /* Then everything until first /; that's host (and port; which we'll look for here later) */
// bug 1881: If we don't get a "/" then we imply it was there
// bug 3074: We could just be given a "?" or "#". These also imply "/"
// bug 3233: whitespace is also a hostname delimiter.
} else {
dst = urlpath;
}
- /* Then everything from / (inclusive) until \r\n or \0 - thats urlpath */
+ /* Then everything from / (inclusive) until \r\n or \0 - that's urlpath */
for (; i < l && *src != '\r' && *src != '\n' && *src != '\0'; ++i, ++src, ++dst) {
*dst = *src;
}
/* protocol "independent" methods
*
* actually these methods are specific to HTTP:
- * they are methods we recieve on our HTTP port,
+ * they are methods we receive on our HTTP port,
* and if we had a FTP listener would not be relevant
* there.
*
* Skip any '/' after the colon
* Copy the next SQUID_MAXHOSTNAMELEN bytes to host[]
* Look for an ending '/' or ':' and terminate
- * Look for login info preceeded by '@'
+ * Look for login info preceded by '@'
*/
class URLHostName
String keyExtrasLine; ///< The format of the request to the auth helper
Format::Format *keyExtras = nullptr; ///< The compiled request format
int keep_alive = 1; ///< whether to close the connection on auth challenges. default: on
- int utf8 = 0; ///< wheter to accept UTF-8 characterset instead of ASCII. default: off
+ int utf8 = 0; ///< whether to accept UTF-8 characterset instead of ASCII. default: off
protected:
/**
}
/**
- * Dump the username cache statictics for viewing...
+ * Dump the username cache statistics for viewing...
*/
void
Auth::User::CredentialsCacheStats(StoreEntry *output)
// 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().
+ // XXX: we have no access to the transaction / AccessLogEntry so can't SyncNotes().
// workaround by using anything already set in HttpRequest
// OR use new and rely on a later Sync copying these to AccessLogEntry
* a note on proxy_auth logix here:
* proxy_auth==NULL -> unauthenticated request || already
* authenticated connection so we test for an authenticated
- * connection when we recieve no authentication header.
+ * connection when we receive no authentication header.
*/
/* a) can we find other credentials to use? and b) are they logged in already? */
* Credentials may be found in one of the following locations (listed by order of preference):
* - the source passed as parameter aUR
* - cached in the HttpRequest parameter from a previous authentication of this request
- * - cached in the ConnStateData paremeter from a previous authentication of this connection
+ * - cached in the ConnStateData parameter from a previous authentication of this connection
* (only applies to some situations. ie NTLM, Negotiate, Kerberos auth schemes,
* or decrypted SSL requests from inside an authenticated CONNECT tunnel)
* - cached in the user credentials cache from a previous authentication of the same credentials
char const * denyMessage(char const * const default_message = NULL) const;
- /** Possibly overrideable in future */
+ /** Possibly overridable in future */
void setDenyMessage(char const *);
- /** Possibly overrideable in future */
+ /** Possibly overridable in future */
char const * getDenyMessage() const;
/**
*/
/*
- * util.c Miscellanous generic functions.
+ * util.c Miscellaneous generic functions.
*
*/
char Default_NTDomain[DNLEN+1] = NTV_DEFAULT_DOMAIN;
const char * errormsg;
-const char NTV_SERVER_ERROR_MSG[] = "Internal server errror";
+const char NTV_SERVER_ERROR_MSG[] = "Internal server error";
const char NTV_GROUP_ERROR_MSG[] = "User not allowed to use this cache";
const char NTV_LOGON_ERROR_MSG[] = "No such user or wrong password";
const char NTV_VALID_DOMAIN_SEPARATOR[] = "\\/";
if (!crypted || strcmp(pwd->pw_passwd, crypted)) {
return 2; /* Wrong password */
} else {
- return 1; /* Authentication Sucessful */
+ return 1; /* Authentication Successful */
}
}
}
if (!crypted || strcmp(pwd->sp_pwdp, crypted)) {
return 2; /* Wrong password */
} else {
- return 1; /* Authentication Sucessful */
+ return 1; /* Authentication Successful */
}
}
}
* that a given nonce applies to only one user (barring attacks or
* really bad timing with expiry and creation). Using a random
* component in the nonce allows us to loop to find a unique nonce.
- * We use H(nonce_data) so the nonce is meaningless to the reciever.
+ * We use H(nonce_data) so the nonce is meaningless to the receiver.
* So our nonce looks like hex(H(timestamp,randomdata))
* And even if our randomness is not very random we don't really care
* - the timestamp also guarantees local uniqueness in the input to
/* the method we'll check at the authenticate step as well */
- /* we don't send or parse opaques. Ok so we're flexable ... */
+ /* we don't send or parse opaques. Ok so we're flexible ... */
/* find the user */
Auth::Digest::User *digest_user;
#endif
fprintf(stderr, PROGRAM_NAME " WARNING, LDAP search error, trying to recover'%s'\n", ldap_err2string(rc));
ldap_msgfree(res);
- /* try to connect to the LDAP server agin, maybe my persisten conexion failed. */
+ /* try to connect to the LDAP server again, maybe my persistent conexion failed. */
if (!retry) {
++retry;
ldap_unbind(ld);
return password;
} else {
fprintf(stderr, PROGRAM_NAME " WARNING, LDAP error '%s'\n", ldap_err2string(rc));
- /* try to connect to the LDAP server agin, maybe my persisten conexion failed. */
+ /* try to connect to the LDAP server again, maybe my persistent conexion failed. */
if (!retry) {
++retry;
ldap_unbind(ld);
#endif
fprintf(stderr, PROGRAM_NAME " WARNING, LDAP search error, trying to recover'%s'\n", ldap_err2string(rc));
ldap_msgfree(res);
- /* try to connect to the LDAP server agin, maybe my persisten conexion failed. */
+ /* try to connect to the LDAP server again, maybe my persistent conexion failed. */
if (!retry) {
++retry;
ldap_unbind(ld);
return password;
} else {
fprintf(stderr, PROGRAM_NAME " WARNING, LDAP error '%s'\n", ldap_err2string(rc));
- /* try to connect to the LDAP server agin, maybe my persisten conexion failed. */
+ /* try to connect to the LDAP server again, maybe my persistent conexion failed. */
if (!retry) {
++retry;
ldap_unbind(ld);
if (!userbasedn || !((passattr != NULL) || (edir_universal_passwd && usersearchfilter && version == LDAP_VERSION3 && use_tls))) {
fprintf(stderr, "Usage: " PROGRAM_NAME " -b basedn -f filter [options] ldap_server_name\n\n");
fprintf(stderr, "\t-A password attribute(REQUIRED)\t\tUser attribute that contains the password\n");
- fprintf(stderr, "\t-l password realm delimiter(REQUIRED)\tCharater(s) that devides the password attribute\n\t\t\t\t\t\tin realm and password tokens, default ':' realm:password\n");
+ fprintf(stderr, "\t-l password realm delimiter(REQUIRED)\tCharater(s) that divides the password attribute\n\t\t\t\t\t\tin realm and password tokens, default ':' realm:password\n");
fprintf(stderr, "\t-b basedn (REQUIRED)\t\t\tbase dn under where to search for users\n");
fprintf(stderr, "\t-e Encrypted passwords(REQUIRED)\tPassword are stored encrypted using HHA1\n");
fprintf(stderr, "\t-F filter\t\t\t\tuser search filter pattern. %%s = login\n");
handle = NULL;
return 2;
}
- if (handle->Security == 0) { /* share-level security, unuseable */
+ if (handle->Security == 0) { /* share-level security, unusable */
debug("SMB Server uses share-level security .. we need user security.\n");
SMB_Discon(handle, 0);
handle = NULL;
const char *
make_challenge(char *domain, char *domain_controller)
{
- /* trying to circumvent some strange problem wih pointers in SMBLib */
+ /* trying to circumvent some strange problem with pointers in SMBLib */
/* Ugly as hell, but the lib is going to be dropped... */
strncpy(my_domain, domain, sizeof(my_domain)-1);
my_domain[sizeof(my_domain)-1] = '\0';
}
/* there was an error. We have two errno's to look at.
* libntlmssp's erno is insufficient, we'll have to look at
- * the actual SMB library error codes, to acually figure
+ * the actual SMB library error codes, to actually figure
* out what's happening. The thing has braindamaged interfacess..*/
smblib_err = SMB_Get_Last_Error();
smb_errorclass = SMBlib_Error_Class(SMB_Get_Last_SMB_Err());
debug("LsaQueryInformationPolicy Error: %ld\n", status);
} else {
- /* Get name in useable format */
+ /* Get name in usable format */
DomainName = AllocStrFromLSAStr(ppdiDomainInfo->Name);
/*
char *c = static_cast<char*>(memchr(buf, '\n', sizeof(buf)));
if (c) {
if (oversized) {
- helperfail("messge=\"illegal request received\"");
+ helperfail("message=\"illegal request received\"");
fprintf(stderr, "Illegal request received: '%s'\n", buf);
return 1;
}
break;
case Auth::Ok:
- fatal("Auth::Ntlm::UserRequest::authenticate: unexpect auth state DONE! Report a bug to the squid developers.\n");
+ fatal("Auth::Ntlm::UserRequest::authenticate: unexpected auth state DONE! Report a bug to the squid developers.\n");
break;
case Auth::Failed:
AsyncCall::Pointer theNext; // used exclusively by AsyncCallQueue
private:
- const char *isCanceled; // set to the cancelation reason by cancel()
+ const char *isCanceled; // set to the cancellation reason by cancel()
// not implemented to prevent nil calls from being passed around and unknowingly scheduled, for now.
AsyncCall();
// This may happen when we have bugs or some module is not calling
// us asynchronously (comm used to do that).
debugs(93, 5, HERE << inCall << " is in progress; " <<
- call << " canot reenter the job.");
+ call << " cannot reenter the job.");
return call.cancel("reentrant job call");
}
static const CharacterSet ETAGC;
// HTTP character sets, RFC 7235
- // token68 (internal charaters only, excludes '=' terminator)
+ // token68 (internal characters only, excludes '=' terminator)
static const CharacterSet TOKEN68C;
private:
* A subscription may be passed to multiple producers.
*
* Call_ must have a copy constructor.
- * A pointer to Call_ must be convertable to AsyncCall::Pointer
+ * A pointer to Call_ must be convertible to AsyncCall::Pointer
*/
template<class Call_>
class CallSubscription: public Subscription
}
// prevent infinite fetch loops in the request parser
- // due to buffer full but not enough data recived to finish parse
+ // due to buffer full but not enough data received to finish parse
if (Config.maxRequestBufferSize <= Config.maxRequestHeaderSize) {
fatalf("Client request buffer of %u bytes cannot hold a request with %u bytes of headers." \
" Change client_request_buffer_max or request_header_max_size limits.",
return;
}
- // if this is the first rule proccessed
+ // if this is the first rule processed
if (*ssl_bump == NULL) {
bumpCfgStyleLast = bcsNone;
sslBumpCfgRr::lastDeprecatedRule = Ssl::bumpEnd;
\subsection AsyncOpWithoutCBDATA Asynchronous operation without cbdata, showing why cbdata is needed
\par
- For a asyncronous operation with callback functions, the normal
+ For a asynchronous operation with callback functions, the normal
sequence of events in programs NOT using cbdata is as follows:
\code
// initialization
type_of_data our_data = new ...;
...
- // Initiate a asyncronous operation, with our_data as callback_data
+ // Initiate a asynchronous operation, with our_data as callback_data
fooOperationStart(bar, callback_func, our_data);
...
- // The asyncronous operation completes and makes the callback
+ // The asynchronous operation completes and makes the callback
callback_func(callback_data, ....);
// Some time later we clean up our data
delete our_data;
// initialization
type_of_data our_data = new ...;
...
- // Initiate a asyncronous operation, with our_data as callback_data
+ // Initiate a asynchronous operation, with our_data as callback_data
fooOperationStart(bar, callback_func, our_data);
...
// ouch, something bad happened elsewhere.. try to cleanup
// pending operations.
delete our_data;
...
- // The asyncronous operation completes and makes the callback
+ // The asynchronous operation completes and makes the callback
callback_func(callback_data, ....);
// CRASH, the memory pointer to by callback_data is no longer valid
// at the time of the callback
\endcode
- \subsection AsyncOpWithCBDATA Asyncronous operation with cbdata
+ \subsection AsyncOpWithCBDATA Asynchronous operation with cbdata
\par
The callback data allocator lets us do this in a uniform and
safe manner. The callback data allocator is used to allocate,
track and free memory pool objects used during callback
- operations. Allocated memory is locked while the asyncronous
+ operations. Allocated memory is locked while the asynchronous
operation executes elsewhere, and is freed when the operation
completes. The normal sequence of events is:
// initialization
type_of_data our_data = new type_of_data;
...
- // Initiate a asyncronous operation, with our_data as callback_data
+ // Initiate a asynchronous operation, with our_data as callback_data
fooOperationStart(..., callback_func, our_data);
...
// foo
void *local_pointer = cbdataReference(callback_data);
....
- // The asyncronous operation completes and makes the callback
+ // The asynchronous operation completes and makes the callback
void *cbdata;
if (cbdataReferenceValidDone(local_pointer, &cbdata))
callback_func(...., cbdata);
With this scheme, nothing bad happens if delete gets called
before fooOperantionComplete(...).
- \par Initalization
+ \par Initialization
\code
// initialization
type_of_data our_data = new type_of_data;
...
- // Initiate a asyncronous operation, with our_data as callback_data
+ // Initiate a asynchronous operation, with our_data as callback_data
fooOperationStart(..., callback_func, our_data);
...
// do some stuff with it
// something bad happened elsewhere.. cleanup
delete our_data;
....
- // The asyncronous operation completes and makes the callback
+ // The asynchronous operation completes and makes the callback
void *cbdata;
if (cbdataReferenceValidDone(local_pointer, &cbdata))
// won't be called, as the data is no longer valid
The expanded key_extras value is added to the Squid credentials
cache and, hence, will affect authentication. It can be used to
- autenticate different users with identical user names (e.g.,
+ authenticate different users with identical user names (e.g.,
when user authentication depends on http_port).
Avoid adding frequently changing information to key_extras. For
(e.g., with %#DATA, spaces between arguments become
%20).
- If SSL is enabled, the following formating codes become available:
+ If SSL is enabled, the following formatting codes become available:
%USER_CERT SSL User certificate in PEM format
%USER_CERTCHAIN SSL User certificate chain in PEM format
# regex matching on URL path [fast]
acl aclname port 80 70 21 0-1024... # destination TCP port [fast]
- # ranges are alloed
+ # ranges are allowed
acl aclname localport 3128 ... # TCP port the client connected to [fast]
# NP: for interception mode this is usually '80'
# use REQUIRED to accept any valid username.
#
# Will use proxy authentication in forward-proxy scenarios, and plain
- # http authenticaiton in reverse-proxy scenarios
+ # http authentication in reverse-proxy scenarios
#
# NOTE: when a Proxy-Authentication header is sent but it is not
# needed during ACL checking the username is NOT logged
concurrency=
The number of requests each certificate validator helper can handle in
- parallel. A value of 0 indicates the certficate validator does not
+ parallel. A value of 0 indicates the certificate validator does not
support concurrency. Defaults to 1.
When this directive is set to a value >= 1 then the protocol
NAME: cache_dir
TYPE: cachedir
DEFAULT: none
-DEFAULT_DOC: No disk cache. Store cache ojects only in memory.
+DEFAULT_DOC: No disk cache. Store cache objects only in memory.
LOC: Config.cacheSwap
DOC_START
Format:
near the low-water mark.
As swap utilization increases towards the high-water mark set
- by cache_swap_high object eviction becomes more agressive.
+ by cache_swap_high object eviction becomes more aggressive.
The value difference in percentages between low- and high-water
marks represent an eviction rate of 300 objects per second and
- the rate continues to scale in agressiveness by multiples of
+ the rate continues to scale in aggressiveness by multiples of
this above the high-water mark.
Defaults are 90% and 95%. If you have a large cache, 5% could be
maintain utilization near the low-water mark.
As swap utilization increases towards this high-water mark object
- eviction becomes more agressive.
+ eviction becomes more aggressive.
The value difference in percentages between low- and high-water
marks represent an eviction rate of 300 objects per second and
- the rate continues to scale in agressiveness by multiples of
+ the rate continues to scale in aggressiveness by multiples of
this above the high-water mark.
Defaults are 90% and 95%. If you have a large cache, 5% could be
straight to using PORT for IPv4 servers.
Some devices are known to not handle this extension correctly and
- may result in crashes. Devices which suport EPRT enough to fail
+ may result in crashes. Devices which support EPRT enough to fail
cleanly will result in Squid attempting PORT anyway. This directive
should only be disabled when EPRT results in device failures.
Re-write creates a difference in the state held by the client
and server. Possibly causing confusion when the server response
- contains snippets of its view state. Embeded URLs, response
+ contains snippets of its view state. Embedded URLs, response
and content Location headers, etc. are not re-written by this
interface.
DOC_START
This option puts an upper limit on how stale content Squid
will serve from the cache if cache validation fails.
- Can be overriden by the refresh_pattern max-stale option.
+ Can be overridden by the refresh_pattern max-stale option.
DOC_END
NAME: refresh_pattern
you may also specify them by your custom file name:
Example: deny_info ERR_CUSTOM_ACCESS_DENIED bad_guys
- By defaut Squid will send "403 Forbidden". A different 4xx or 5xx
+ By default Squid will send "403 Forbidden". A different 4xx or 5xx
may be specified by prefixing the file name with the code and a colon.
e.g. 404:ERR_CUSTOM_ACCESS_DENIED
Requires client_db to be enabled (the default).
- WARNING: This may noticably slow down traffic received via external proxies
+ WARNING: This may noticeably slow down traffic received via external proxies
or NAT devices and cause them to rebound error messages back to their clients.
DOC_END
Activation of the Partial Content extension is negotiated with each
ICAP service during OPTIONS exchange. Most ICAP servers should handle
- negotation correctly even if they do not support the extension, but
+ negotiation correctly even if they do not support the extension, but
some might fail. To disable Partial Content support for all ICAP
services and to avoid any negotiation, set this option to "off".
*
\par
* Each pipe node has a data push function, and a data request function.
- * This limits flexability - the data flow is no longer assembled at each
+ * This limits flexibility - the data flow is no longer assembled at each
* step.
*
\par
\par
* No data member may hold a reference to it's stream node.
* The stream guarantees that DETACH will be called before
- * freeing the node, alowing data members to cleanup.
+ * freeing the node, allowing data members to cleanup.
*
\par
* If a node's data holds a reference to something that needs to
/**
\ingroup ClientStreamAPI
*
- * Detachs the tail of the stream. CURRENTLY DOES NOT clean up the tail node data -
+ * Detaches the tail of the stream. CURRENTLY DOES NOT clean up the tail node data -
* this must be done separately. Thus Abort may ONLY be called by the tail node.
*
\param thisObject 'this' reference for the client stream
private:
AnyP::PortCfgPointer portCfg; ///< from HttpPortList
Ipc::FdNoteId portTypeNote; ///< Type of IPC socket being opened
- Subscription::Pointer sub; ///< The handler to be subscribed for this connetion listener
+ Subscription::Pointer sub; ///< The handler to be subscribed for this connection listener
};
static void clientListenerConnectionOpened(AnyP::PortCfgPointer &s, const Ipc::FdNoteId portTypeNote, const Subscription::Pointer &sub);
#endif
const int concurrentRequestLimit = pipelinePrefetchMax() + 1 + internalRequest;
- // when queue filled already we cant add more.
+ // when queue filled already we can't add more.
if (existingRequestCount >= concurrentRequestLimit) {
debugs(33, 3, clientConnection << " max concurrent requests reached (" << concurrentRequestLimit << ")");
debugs(33, 5, clientConnection << " deferring new request until one is done");
if (msg) {
// This is important to know, but maybe not so much that flooding the log is okay.
#if QUIET_PROXY_PROTOCOL
- // display the first of every 32 occurances at level 1, the others at level 2.
+ // display the first of every 32 occurrences at level 1, the others at level 2.
static uint8_t hide = 0;
debugs(33, (hide++ % 32 == 0 ? DBG_IMPORTANT : 2), msg << " from " << clientConnection);
#else
if (pools.size()) {
ACLFilledChecklist ch(NULL, NULL, NULL);
- // TODO: we check early to limit error response bandwith but we
+ // TODO: we check early to limit error response bandwidth but we
// should recheck when we can honor delay_pool_uses_indirect
// TODO: we should also pass the port details for myportname here.
ch.src_addr = clientConnection->remote;
if (reply.result != Helper::Okay) {
debugs(33, 5, "Certificate for " << tlsConnectHostOrIp << " cannot be generated. ssl_crtd response: " << reply_message.getBody());
} else {
- debugs(33, 5, "Certificate for " << tlsConnectHostOrIp << " was successfully recieved from ssl_crtd");
+ debugs(33, 5, "Certificate for " << tlsConnectHostOrIp << " was successfully received from ssl_crtd");
if (sslServerBump && (sslServerBump->act.step1 == Ssl::bumpPeek || sslServerBump->act.step1 == Ssl::bumpStare)) {
doPeekAndSpliceStep();
auto ssl = fd_table[clientConnection->fd].ssl.get();
assert(b);
Ssl::ClientBio *bio = static_cast<Ssl::ClientBio *>(BIO_get_data(b));
- debugs(33, 5, "PeekAndSplice mode, proceed with client negotiation. Currrent state:" << SSL_state_string_long(ssl));
+ debugs(33, 5, "PeekAndSplice mode, proceed with client negotiation. Current state:" << SSL_state_string_long(ssl));
bio->hold(false);
Comm::SetSelect(clientConnection->fd, COMM_SELECT_WRITE, clientNegotiateSSL, this, 0);
/// Callback function. It is called when squid receive message from ssl_crtd.
static void sslCrtdHandleReplyWrapper(void *data, const Helper::Reply &reply);
- /// Proccess response from ssl_crtd.
+ /// Process response from ssl_crtd.
void sslCrtdHandleReply(const Helper::Reply &reply);
void switchToHttps(ClientHttpRequest *, Ssl::BumpMode bumpServerMode);
return;
}
- // The previously identified hit suddenly became unsharable!
+ // The previously identified hit suddenly became unshareable!
// This is common for collapsed forwarding slaves but might also
// happen to regular hits because we are called asynchronously.
if (!e->mayStartHitting()) {
- debugs(88, 3, "unsharable " << *e << ". MISS");
+ debugs(88, 3, "unshareable " << *e << ". MISS");
http->logType.update(LOG_TCP_MISS);
processMiss();
return;
/* Responses with no body will not have a content-type header,
* which breaks the rep_mime_type acl, which
* coincidentally, is the most common acl for reply access lists.
- * A better long term fix for this is to allow acl matchs on the various
+ * A better long term fix for this is to allow acl matches on the various
* status codes, and then supply a default ruleset that puts these
* codes before any user defines access entries. That way the user
* can choose to block these responses where appropriate, but won't get
/* Signal old objects. NB: rfc 2616 is not clear,
* by implication, on whether we should do this to all
* responses, or only cache hits.
- * 14.46 states it ONLY applys for heuristically caclulated
+ * 14.46 states it ONLY applies for heuristically calculated
* freshness values, 13.2.4 doesn't specify the same limitation.
* We interpret RFC 2616 under the combination.
*/
void
clientReplyContext::makeThisHead()
{
- /* At least, I think thats what this does */
+ /* At least, I think that's what this does */
dlinkDelete(&http->active, &ClientActiveRequests);
dlinkAdd(http, &http->active, &ClientActiveRequests);
}
StoreEntry *e = storeCreateEntry(storeId(), http->log_uri, reqFlags, m);
- // Make entry collapsable ASAP, to increase collapsing chances for others,
+ // Make entry collapsible ASAP, to increase collapsing chances for others,
// TODO: every must-revalidate and similar request MUST reach the origin,
// but do we have to prohibit others from collapsing on that request?
if (reqFlags.cachable &&
/* So, we mark the store logic as complete */
flags.storelogiccomplete = 1;
- /* and get the caller to request a read, from whereever they are */
+ /* and get the caller to request a read, from wherever they are */
/* NOTE: after ANY data flows down the pipe, even one step,
* this function CAN NOT be used to manage errors
*/
* \retval 0 success
* \retval -1 failure
*
- * TODO: Pass in the buffers to be used in the inital Read request, as they are
+ * TODO: Pass in the buffers to be used in the initial Read request, as they are
* determined by the user
*/
int
}
/**
- * Start locating an alternative storeage ID string (if any) from admin
+ * Start locating an alternative storage ID string (if any) from admin
* configured helper program. This is an asynchronous operation terminating in
* ClientRequestContext::clientStoreIdDone() when completed.
*/
break;
}
- /* FIXME PIPELINE: This is innacurate during pipelining */
+ /* FIXME PIPELINE: This is inaccurate during pipelining */
if (http->getConn() != NULL && Comm::IsConnOpen(http->getConn()->clientConnection))
fd_note(http->getConn()->clientConnection->fd, http->uri);
bodyBytesRead += delta; // supports negative and zero deltas
- // check for overflows ("infinite" response?) and undeflows (a bug)
+ // check for overflows ("infinite" response?) and underflows (a bug)
Must(bodyBytesRead >= 0);
}
/* AYJ: 2011-01-13: Bug 2581.
* 226 status is possibly waiting in the ctrl buffer.
* The connection will hang if we DONT send buffered_ok.
- * This happens on all transfers which can be completly sent by the
+ * This happens on all transfers which can be completely sent by the
* server before the 150 started status message is read in by Squid.
* ie all transfers of about one packet hang.
*/
/* Test URL login syntax. Overrides any headers received. */
loginParser(request->url.userInfo(), true);
- /* name is missing. thats fatal. */
+ /* name is missing. that's fatal. */
if (!user[0])
fatal("FTP login parsing destroyed username info");
"mdtm=" << ftpState->mdtm << ", size=" << ftpState->theSize <<
"slashhack=" << (slashHack? "T":"F"));
- /* Try the / hack to support "Netscape" FTP URL's for retreiving files */
+ /* Try the / hack to support "Netscape" FTP URL's for retrieving files */
if (!ftpState->flags.isdir && /* Not a directory */
!ftpState->flags.try_slash_hack && !slashHack && /* Not doing slash hack */
ftpState->mdtm <= 0 && ftpState->theSize < 0) { /* Not known as a file */
std::ostream &operator <<(std::ostream &, const Http::TunnelerAnswer &);
-} // namepace Http
+} // namespace Http
#endif /* SQUID_SRC_CLIENTS_HTTP_TUNNELERANSWER_H */
* This case is presently handled here as it's both a known case and it's
* uncertain what error will be returned by the IPv6 stack in such case. It's
* possible this will also be handled by the errno checks below after connect()
- * but needs carefull cross-platform verification, and verifying the address
+ * but needs careful cross-platform verification, and verifying the address
* condition here is simple.
*/
if (!F->local_addr.isIPv4() && address.isIPv4()) {
"DeferredReadManager::CloseHandler",
CommCloseCbPtrFun(&CloseHandler, temp));
comm_add_close_handler(aRead.theRead.conn->fd, closer);
- temp->element.closer = closer; // remeber so that we can cancel
+ temp->element.closer = closer; // remember so that we can cancel
}
void
std::deque<TcpAcceptor::Pointer> deferred_;
};
-}; // namepace Comm
+}; // namespace Comm
#endif /* _SQUID_SRC_COMM_ACCEPT_LIMITER_H */
{
Must(temporaryFd_ < 0);
- // our initators signal abort by cancelling their callbacks
+ // our initiators signal abort by cancelling their callbacks
if (callback_ == NULL || callback_->canceled())
return false;
/**
* Store data about the physical and logical attributes of a connection.
*
- * Some link state can be infered from the data, however this is not an
+ * Some link state can be inferred from the data, however this is not an
* object for state data. But a semantic equivalent for FD with easily
* accessible cached properties not requiring repeated complex lookups.
*
/// Actively cancel the given callback
void cancel(const char *reason);
- /// finish the IO operation imediately and schedule the callback with the current state.
+ /// finish the IO operation immediately and schedule the callback with the current state.
void finish(Comm::Flag code, int xerrn);
private:
* The variables 'incoming_icp_interval' and 'incoming_http_interval'
* determine how many normal I/O events to process before checking
* incoming sockets again. Note we store the incoming_interval
- * multipled by a factor of (2^INCOMING_FACTOR) to have some
+ * multiplied by a factor of (2^INCOMING_FACTOR) to have some
* pseudo-floating point precision.
*
* The variable 'udp_io_events' and 'tcp_io_events' counts how many normal
* The variables 'incoming_udp_interval' and 'incoming_tcp_interval'
* determine how many normal I/O events to process before checking
* incoming sockets again. Note we store the incoming_interval
- * multipled by a factor of (2^INCOMING_FACTOR) to have some
+ * multiplied by a factor of (2^INCOMING_FACTOR) to have some
* pseudo-floating point precision.
*
* The variable 'udp_io_events' and 'tcp_io_events' counts how many normal
* The variables 'incoming_udp_interval' and 'incoming_tcp_interval'
* determine how many normal I/O events to process before checking
* incoming sockets again. Note we store the incoming_interval
- * multipled by a factor of (2^INCOMING_FACTOR) to have some
+ * multiplied by a factor of (2^INCOMING_FACTOR) to have some
* pseudo-floating point precision.
*
* The variable 'udp_io_events' and 'tcp_io_events' counts how many normal
* all zero as per RFC 1035. If not the message should be
* rejected.
* NO! RFCs say ignore inbound reserved, they may be used in future.
- * NEW messages need to be set 0, thats all.
+ * NEW messages need to be set 0, that's all.
*/
h->rcode = t & 0x0F;
memcpy(&s, buf + (*off), sizeof(s));
*
* IPv4 equivalents are taken care of by the RFC1035 library.
* Where one protocol lookup must be followed by another, the caller
- * is resposible for the order and handling of the lookups.
+ * is responsible for the order and handling of the lookups.
*
* KNOWN BUGS:
*
max_shared_edns = min(max_shared_edns, server.last_seen_edns);
} else {
nameservers[from_ns].last_seen_edns = q->edns_seen;
- // maybe reduce the global limit downwards to accomodate this NS
+ // maybe reduce the global limit downwards to accommodate this NS
max_shared_edns = min(max_shared_edns, q->edns_seen);
}
if (max_shared_edns < RFC1035_DEFAULT_PACKET_SZ)
}
// Do searchpath processing on the master A query only to keep
- // things simple. NXDOMAIN is authorative for the label, not
+ // things simple. NXDOMAIN is authoritative for the label, not
// the record type.
if (q->rcode == 3 && !q->master && q->do_searchpath && q->attempt < MAX_ATTEMPT) {
assert(NULL == message->answer);
// a log warning if the files are missing
TCP_RESET, // Send TCP RST packet instead of error page
- ERR_SECURE_ACCEPT_FAIL, // Rejects the SSL connection intead of error page
+ ERR_SECURE_ACCEPT_FAIL, // Rejects the SSL connection instead of error page
ERR_REQUEST_START_TIMEOUT, // Aborts the connection instead of error page
ERR_REQUEST_PARSE_TIMEOUT, // Aborts the connection instead of error page
ERR_RELAY_REMOTE, // Sends server reply instead of error page
clientStreamNode *thisNode; /* our stream node */
/* the request we are processing. HMM: cbdataReferencing this will result
* in a circular reference, so we don't. Note: we are automatically freed
- * when it is, so thats ok. */
+ * when it is, so that's ok. */
ClientHttpRequest *http;
struct {
switch (sline) {
- case Http::scContinue: /* Should never reach us... but squid needs to alter to accomodate this */
+ case Http::scContinue: /* Should never reach us... but squid needs to alter to accommodate this */
case Http::scSwitchingProtocols: /* Ditto */
esiChoose::process (int dovars)
{
/* process as much of the list as we can, stopping only on
- * faliures
+ * failures
*/
/* We MUST have a when clause */
NULLUnChosen();
addmember(stackmember * stack, int *stackdepth, stackmember * candidate)
{
if (candidate->valuetype != ESI_EXPR_LITERAL && *stackdepth > 1) {
- /* !(!(a==b))) is why thats safe */
+ /* !(!(a==b))) is why that's safe */
/* strictly less than until we unwind */
if (*stackdepth >= ESI_STACK_DEPTH_LIMIT)
}
/* process as much of the list as we can, stopping only on
- * faliures
+ * failures
*/
if (!processing || processedcount == 0)
processingResult = ESI_PROCESS_COMPLETE;
* Product - Mozilla version 4.0
* in comments - compatible; .... 3705
*
- * Useing the RFC a more appropriate header would be
+ * Using the RFC a more appropriate header would be
* User-Agent: MSIE/6.0 Mozilla/4.0 Windows-NT/5.1 .NET-CLR/1.0.3705
* or something similar.
*
* Working on setting up a proper firewall for a network containing some
* Win'95 computers at our Univ, I've discovered that some smart students
* avoid the restrictions easily just changing their IP addresses in Win'95
- * Contol Panel... It has been getting boring, so I took Squid-1.1.18
+ * Control Panel... It has been getting boring, so I took Squid-1.1.18
* sources and added a new acl type for hard-wired access control:
*
* acl <name> arp <Ethernet address> ...
/* Ours, use it.. if the key matches */
const char *key = makeExternalAclKey(ch, acl);
if (!key)
- return ACCESS_DUNNO; // insufficent data to continue
+ return ACCESS_DUNNO; // insufficient data to continue
if (strcmp(key, (char*)entry->key) != 0) {
debugs(82, 9, "entry key='" << (char *)entry->key << "', our key='" << key << "' do not match. Discarded.");
// too bad. need a new lookup.
{
/*
- * Bytecodes for the configureable format stuff
+ * Bytecodes for the configurable format stuff
*/
typedef enum {
LFT_NONE, /* dummy */
LFT_SERVER_LOCAL_TOS,
LFT_SERVER_LOCAL_NFMARK,
- /* original Request-Line details recieved from client */
+ /* original Request-Line details received from client */
LFT_CLIENT_REQ_METHOD,
LFT_CLIENT_REQ_URI,
LFT_CLIENT_REQ_URLSCHEME,
/* LFT_CLIENT_REQ_QUERY, */
LFT_CLIENT_REQ_VERSION,
- /* Request-Line details recieved from client (legacy, filtered) */
+ /* Request-Line details received from client (legacy, filtered) */
LFT_REQUEST_METHOD,
LFT_REQUEST_URI,
LFT_REQUEST_URLPATH_OLD_31,
/*LFT_REQUEST_SIZE_BODY, */
/*LFT_REQUEST_SIZE_BODY_NO_TE, */
- /* original Status-Line details recieved from server */
+ /* original Status-Line details received from server */
// XXX: todo
/* Status-Line details sent to the client */
/// A namespace or 'set' of tokens
/// components register their namespace prefix and an array of tokens
-/// which can then be embeded in any format.
+/// which can then be embedded in any format.
class TokenNamespace
{
public:
return false;
}
- /* very inefficent parser, but who cares, this needs to be simple */
+ /* very inefficient parser, but who cares, this needs to be simple */
/* First off, let's tokenize, we'll optimize in a second pass.
* A token can either be a %-prefixed sequence (usually a dynamic
* token but it can be an escaped sequence), or a string. */
case LFT_DNS_WAIT_TIME:
if (al->request && al->request->dnsWait >= 0) {
// TODO: microsecond precision for dns wait time.
- // Convert miliseconds to timeval struct:
+ // Convert milliseconds to timeval struct:
outtv.tv_sec = al->request->dnsWait / 1000;
outtv.tv_usec = (al->request->dnsWait % 1000) * 1000;
doMsec = 1;
/* case LFT_USER_SCHEME: */
// the fmt->type can not be LFT_HTTP_SENT_STATUS_CODE_OLD_30
- // but compiler complains if ommited
+ // but compiler complains if omitted
case LFT_HTTP_SENT_STATUS_CODE_OLD_30:
case LFT_HTTP_SENT_STATUS_CODE:
outint = al->http.code;
Format(const char *name);
virtual ~Format();
- /* very inefficent parser, but who cares, this needs to be simple */
+ /* very inefficient parser, but who cares, this needs to be simple */
/* First off, let's tokenize, we'll optimize in a second pass.
* A token can either be a %-prefixed sequence (usually a dynamic
* token but it can be an escaped sequence), or a string. */
hash_link *e = (hash_link *)hash_lookup(fqdn_table, f->hash.key);
if (NULL != e) {
- /* avoid colission */
+ /* avoid collision */
fqdncache_entry *q = (fqdncache_entry *) e;
fqdncacheRelease(q);
}
theBuf.clear();
- // theFile->write may call writeCompleted immediatelly
+ // theFile->write may call writeCompleted immediately
theFile->write(r);
}
// locked entry is safe, but no support for reading the entry we swap out.
const Ipc::StoreMapAnchor *slot = map->peekAtReader(e.swap_filen);
if (!slot)
- return NULL; // we were writing afterall
+ return NULL; // we were writing after all
Rock::SwapDir::Pointer self(this);
IoState *sio = new IoState(self, &e, cbFile, cbIo, data);
* occur strictly after reads and writes.
* ufs doesn't queue, it simply completes, so close callbacks occur
* strictly after reads and writes.
- * aufs performs closes syncronously, so close events must be managed
+ * aufs performs closes synchronously, so close events must be managed
* to force strict ordering.
* The below does this:
* closing is set when theFile->close() has been called, and close only triggers
// f is percentage of 'gap' filled between low- and high-water.
// Used to reduced purge rate when between water markers, and
- // to multiply it more agressively the further above high-water
+ // to multiply it more aggressively the further above high-water
// it reaches. But in a graceful linear growth curve.
double f = 1.0;
if (highWaterSz > lowWaterSz) {
* consequences of errors.
*
* \retval true successful rename
- * \retval false an error occured
+ * \retval false an error occurred
*/
bool FileRename(const SBuf &from, const SBuf &to);
Helper::Xaction *r = nullptr;
helper_server::RequestIndex::iterator it;
if (parent->childs.concurrency) {
- // If concurency supported retrieve request from ID
+ // If concurrency supported retrieve request from ID
it = requestsIndex.find(request_number);
if (it != requestsIndex.end()) {
r = *(it->second);
char *e = NULL;
i = strtol(msg, &e, 10);
// Do we need to check for e == msg? Means wrong response from helper.
- // Will be droped as "unexpected reply on channel 0"
+ // Will be dropped as "unexpected reply on channel 0"
needsMore = !(xisspace(*e) || (eom && e == eom));
if (!needsMore) {
msg = e;
/**
* Update an existing set of details with new start/max/idle/concurrent limits.
* This is for parsing new child settings into an object incrementally then updating
- * the running set without loosing any of the active state or causing races.
+ * the running set without losing any of the active state or causing races.
*/
ChildConfig &updateLimits(const ChildConfig &rhs);
}
} else if (!strncmp(p,"AF ",3)) {
- // NTLM/Negotate OK response
+ // NTLM/Negotiate OK response
result = Helper::Okay;
p+=3;
// followed by:
* disable reading on the outgoing socket.
*/
/* XXX Don't we need this handler to read replies while shutting down?
- * I think there should be a separate hander for reading replies..
+ * I think there should be a separate handler for reading replies..
*/
assert(Comm::IsConnOpen(htcpOutgoingConn));
/*
* Anonymizing patch by lutz@as-node.jena.thur.de
- * have a look into http-anon.c to get more informations.
+ * have a look into http-anon.c to get more information.
*/
#include "squid.h"
/** \par
* In chunked response we do not know the content length but we are absolutely
* sure about the end of response, so we are calling the statusIfComplete to
- * decide if we can be persistant
+ * decide if we can be persistent
*/
if (lastChunk && flags.chunked)
return statusIfComplete();
// server sent more that the advertised content length
debugs(11, 5, "payloadSeen=" << payloadSeen <<
" clen=" << clen << '/' << vrep->content_length <<
- " trucated=" << payloadTruncated << '+' << extras);
+ " truncated=" << payloadTruncated << '+' << extras);
inBuf.chop(0, inBuf.length() - extras);
payloadTruncated += extras;
buf.append(raw.content(), rawDataSize);
buf.append("\r\n", 2);
- Must(rawDataSize > 0); // we did not accidently created last-chunk above
+ Must(rawDataSize > 0); // we did not accidentally created last-chunk above
// Do not send last-chunk unless we successfully received everything
if (receivedWholeRequestBody) {
{
const TimeOrTag spec = http->request->header.getTimeOrTag(Http::HdrType::IF_RANGE);
- /* check for parsing falure */
+ /* check for parsing failure */
if (!spec.valid)
return false;
while (tok.prefix(p, LineCharacters())) {
if (!tok.skipOne(CharacterSet::LF)) // move tokenizer past the LF
- break; // error. reached invalid octet or end of buffer insted of an LF ??
+ break; // error. reached invalid octet or end of buffer instead of an LF ??
// header lines must start with the name (case insensitive)
if (p.substr(0, namelen).caseCmp(name, namelen))
/**
* Class partially implementing RFC 792 - ICMP for IP version 4.
- * Provides ECHO-REQUEST, ECHO-REPLY (secion 4.1)
+ * Provides ECHO-REQUEST, ECHO-REPLY (section 4.1)
*/
class Icmp4 : public Icmp
{
debugs(42, 8, HERE << n << " bytes from " << preply.from);
-// FIXME INET6 : The IPv6 Header (ip6_hdr) is not availble directly >:-(
+// FIXME INET6 : The IPv6 Header (ip6_hdr) is not available directly >:-(
//
// TTL still has to come from the IP header somewhere.
// still need to strip and process it properly.
/*
* FIXME INET6: Without access to the IPv6-Hops header we must rely on the total RTT
- * and could caculate the hops from that, but it produces some weird value mappings using ipHops
+ * and could calculate the hops from that, but it produces some weird value mappings using ipHops
* for now everything is 1 v6 hop away with variant RTT
* WANT: preply.hops = ip->ip6_hops; // ipHops(ip->ip_hops);
*/
/**
* Class partially implementing RFC 4443 - ICMPv6 for IP version 6.
- * Provides ECHO-REQUEST, ECHO-REPLY (secion 4)
+ * Provides ECHO-REQUEST, ECHO-REPLY (section 4)
*/
class Icmp6 : public Icmp
{
case NETDB_EX_NETWORK:
++o;
- /* FIXME INET6 : NetDB can still ony send IPv4 */
+ /* FIXME INET6 : NetDB can still only send IPv4 */
memcpy(&line_addr, p + o, sizeof(struct in_addr));
addr = line_addr;
o += sizeof(struct in_addr);
/* windows uses the control socket for feedback to squid */
#define LINK_TO_SQUID squid_link
-// windows still requires WSAFD but there are too many dependancy problems
+// windows still requires WSAFD but there are too many dependency problems
// to just link to win32.cc where it is normally defined.
int
/**
* Open a connection and request IDENT information from a peer machine.
- * Callack will be called whan the lookup is completed.
+ * Callback will be called whan the lookup is completed.
* Self-registers with a global ident lookup manager,
* will call Ident::Init() itself if the manager has not been initialized already.
*/
return IN6_IS_ADDR_UNSPECIFIED(&mSocketAddr_.sin6_addr) || IN6_ARE_ADDR_EQUAL(&mSocketAddr_.sin6_addr, &v4_anyaddr);
}
-/// NOTE: Does NOT clear the Port stored. Ony the Address and Type.
+/// NOTE: Does NOT clear the Port stored. Only the Address and Type.
void
Ip::Address::setAnyAddr()
{
}
/* some external code may have blindly memset a parent. */
- /* thats okay, our default is known */
+ /* that's okay, our default is known */
if ( isAnyAddr() ) {
if (isIPv6())
memcpy(buf,"::\0", min(static_cast<unsigned int>(3),blen));
*/
bool isSiteLocal6() const;
- /** Test whether content is an IPv6 address with SLAAC EUI-64 embeded.
+ /** Test whether content is an IPv6 address with SLAAC EUI-64 embedded.
\retval true if address matches ::ff:fe00:0
\retval false if --disable-ipv6 has been compiled.
\retval false if address does not match ::ff:fe00:0
* these functions can be used to convert this object
* and pull out the data needed by the unconverted code
* they are intentionaly hard to use, use getAddrInfo() instead.
- * these functiosn WILL NOT be in the final public API after transition.
+ * these functions WILL NOT be in the final public API after transition.
*/
void getSockAddr(struct sockaddr_storage &addr, const int family) const;
*
* \param silent 0 if errors are to be displayed. 1 if errors are to be hidden.
* \param newConn Details known, to be updated where relevant.
- * \return Whether successfuly located the new address.
+ * \return Whether successfully located the new address.
*/
bool TproxyTransparent(const Comm::ConnectionPointer &newConn, int silent);
*
* \param silent 0 if errors are to be displayed. 1 if errors are to be hidden.
* \param newConn Details known, to be updated where relevant.
- * \return Whether successfuly located the new address.
+ * \return Whether successfully located the new address.
*/
bool NetfilterInterception(const Comm::ConnectionPointer &newConn, int silent);
*
* \param silent 0 if errors are to be displayed. 1 if errors are to be hidden.
* \param newConn Details known, to be updated where relevant.
- * \return Whether successfuly located the new address.
+ * \return Whether successfully located the new address.
*/
bool IpfwInterception(const Comm::ConnectionPointer &newConn, int silent);
*
* \param silent 0 if errors are to be displayed. 1 if errors are to be hidden.
* \param newConn Details known, to be updated where relevant.
- * \return Whether successfuly located the new address.
+ * \return Whether successfully located the new address.
*/
bool IpfInterception(const Comm::ConnectionPointer &newConn, int silent);
*
* \param silent 0 if errors are to be displayed. 1 if errors are to be hidden.
* \param newConn Details known, to be updated where relevant.
- * \return Whether successfuly located the new address.
+ * \return Whether successfully located the new address.
*/
bool PfInterception(const Comm::ConnectionPointer &newConn, int silent);
/**
* NOTE: Due to the low-level nature of the library these
* objects are part of the dump function must be self-contained.
- * which means no StoreEntry refrences. Just a basic char* buffer.
+ * which means no StoreEntry references. Just a basic char* buffer.
*/
void
Ip::Qos::Config::dumpConfigLine(char *entry, const char *name) const
/* child */
TheProcessKind = pkHelper;
- no_suid(); /* give up extra priviliges */
+ no_suid(); /* give up extra privileges */
/* close shared socket with parent */
close(prfd);
static int
AddToMap(const PendingOpenRequest &por)
{
- // find unused ID using linear seach; there should not be many entries
+ // find unused ID using linear search; there should not be many entries
for (int id = 0; true; ++id) {
if (TheSharedListenRequestMap.find(id) == TheSharedListenRequestMap.end()) {
TheSharedListenRequestMap[id] = por;
{
const Anchor &inode = anchorAt(fileno);
- // note: we do not lock, so comparison may be inacurate
+ // note: we do not lock, so comparison may be inaccurate
if (inode.empty())
return +2;
hash_link *e = (hash_link *)hash_lookup(ip_table, i->hash.key);
if (NULL != e) {
- /* avoid colission */
+ /* avoid collision */
ipcache_entry *q = (ipcache_entry *) e;
ipcacheRelease(q);
}
* Does nothing if the domain name does not exist.
*
\param name domain name to have an IP marked bad
- \param addr specific addres to be marked bad
+ \param addr specific address to be marked bad
*/
void
ipcacheMarkBadAddr(const char *name, const Ip::Address &addr)
(SELECT COUNT(*) FROM access_log WHERE squid_request_status LIKE '%MISS%')
/
(SELECT COUNT(*) FROM access_log)*100
- AS pecentage;
+ AS percentage;
-- response times
CREATE OR REPLACE VIEW time_response_ranges AS
# we use logfile to pass database access information to this script
# sample configuration:
# access_log daemon:/host/database/table/username/password squid
-# to let a parmeter unspecified, e.g. the database host, use a double slash:
+# to let a parameter unspecified, e.g. the database host, use a double slash:
# access_log daemon://database/table/username/password squid
my ( $host, $database, $table, $user, $pass ) = $log_file =~ / \/(.*?)\/(.*?)\/(.*?)\/(.*?)\/(.*?) \z /xms;
}
drops = 0;
- // append without spliting buf, unless it exceeds IoBufSize
+ // append without splitting buf, unless it exceeds IoBufSize
for (size_t off = 0; off < len; off += IoBufSize)
appendChunk(record + off, min(len - off, IoBufSize));
}
Log::TcpLogger::appendChunk(const char *chunk, const size_t len)
{
Must(len <= IoBufSize);
- // add a buffer if there is not one that can accomodate len bytes
+ // add a buffer if there is not one that can accommodate len bytes
bool addBuffer = buffers.empty() ||
(buffers.back()->size+len > IoBufSize);
// also add a buffer if there is only one and that one is being written
}
setbuf(stdout, NULL);
/* XXX stderr should not be closed, but in order to support squid must be
- * able to collect and manage modules's stderr first.
+ * able to collect and manage modules' stderr first.
*/
close(2);
t = open(_PATH_DEVNULL, O_RDWR);
/**
\par
* Main cleanup handler. For MemPools to stay within upper idle limits,
- * this function needs to be called periodically, preferrably at some
+ * this function needs to be called periodically, preferably at some
* constant rate, eg. from Squid event. It looks through all pools and
* chunks, cleans up internal states and checks for releasable chunks.
*
MemChunk::MemChunk(MemPoolChunked *aPool)
{
/* should have a pool for this too -
- * note that this requres:
+ * note that this requires:
* allocate one chunk for the pool of chunks's first chunk
* allocate a chunk from that pool
* move the contents of one chunk into the other
OfflineToggleAction(const CommandPointer &cmd);
};
-/// Registeres profiles for the actions above; \todo move elsewhere?
+/// Registers profiles for the actions above; \todo move elsewhere?
void RegisterBasics();
} // namespace Mgr
-- cacheNetwork group { squid 4 }
--
-- This material is probably best suited elsewhere, however for now it
--- will reside here until the both the Proxy and Squid MIBs are implimented.
+-- will reside here until the both the Proxy and Squid MIBs are implemented.
--
cacheIpCache OBJECT IDENTIFIER ::= { cacheNetwork 1 }
cbdataReferenceDone(psstate->peerCountMcastPeerXXX);
- fake->abort(); // sets ENTRY_ABORTED and initiates releated cleanup
+ fake->abort(); // sets ENTRY_ABORTED and initiates related cleanup
fake->mem_obj->request = nullptr;
fake->unlock("peerCountMcastPeersDone");
}
#include "ssl/support.h"
#endif
-/// url maximum length + extra informations passed to redirector
+/// url maximum length + extra information passed to redirector
#define MAX_REDIRECTOR_REQUEST_STRLEN (MAX_URL + 1024)
class RedirectStateData
#if USE_HTTP_VIOLATIONS
/* Normally a client reload request ("Cache-Control: no-cache" or "Pragma: no-cache")
- * means we must treat this reponse as STALE and fetch a new one.
+ * means we must treat this response as STALE and fetch a new one.
*
* However, some options exist to override this behaviour. For example, we might just
* revalidate our existing response, or even just serve it up without revalidating it.
SBuf::Printf(const char *fmt, ...)
{
// with printf() the fmt or an arg might be a dangerous char*
- // NP: cant rely on vappendf() Locker because of clear()
+ // NP: can't rely on vappendf() Locker because of clear()
const Locker blobKeeper(this, buf());
va_list args;
++stats.rawAccess;
/* null-terminate the current buffer, by hand-appending a \0 at its tail but
* without increasing its length. May COW, the side-effect is to guarantee that
- * the MemBlob's tail is availabe for us to use */
+ * the MemBlob's tail is available for us to use */
*rawSpace(1) = '\0';
++store_->size;
++stats.setChar;
debugs(24, 8, "First byte not found");
return npos;
}
- // lastPossible guarrantees no out-of-bounds with memcmp()
+ // lastPossible guarantees no out-of-bounds with memcmp()
if (0 == memcmp(needle.buf(), tmp, needle.length())) {
debugs(24, 8, "Found at " << (tmp-buf()));
return (tmp-buf());
* NO verifications are made on the size parameters, it's up to the caller to
* make sure that the new size is big enough to hold the copied contents.
* The re-allocated storage MAY be bigger than the requested size due to size-chunking
- * algorithms in MemBlock, it is guarranteed NOT to be smaller.
+ * algorithms in MemBlock, it is guaranteed NOT to be smaller.
*/
void
SBuf::reAlloc(size_type newsize)
/** print SBuf contents and debug information about the SBuf to an ostream
*
- * Debug function, dumps to a stream informations on the current SBuf,
+ * Debug function, dumps to a stream information on the current SBuf,
* including low-level details and statistics.
*/
std::ostream& dump(std::ostream &os) const;
*/
SBuf consume(size_type n = npos);
- /// gets global statistic informations
+ /// gets global statistic information
static const SBufStats& GetStats();
/** Copy SBuf contents into user-supplied C buffer.
/**
* Try to guesstimate how big a MemBlob to allocate.
- * The result is guarranteed to be to be at least the desired size.
+ * The result is guaranteed to be to be at least the desired size.
*/
size_type estimateCapacity(size_type desired) const {return (2*desired);}
~EncryptorAnswer(); ///< deletes error if it is still set
Comm::ConnectionPointer conn; ///< peer connection (secured on success)
- /// answer recepients must clear the error member in order to keep its info
+ /// answer recipients must clear the error member in order to keep its info
/// XXX: We should refcount ErrorState instead of cbdata-protecting it.
CbcPointer<ErrorState> error; ///< problem details (nil on success)
std::ostream &operator <<(std::ostream &, const Security::EncryptorAnswer &);
-} // namepace Security
+} // namespace Security
#endif /* SQUID_SECURITY_ENCRYPTORANSWER_H */
* their reference counts independently, or it may not. This varies between
* API functions, though it is usually documented.
*
- * This means the caller code needs to be carefuly written to use the correct
+ * This means the caller code needs to be carefully written to use the correct
* reset method and avoid the raw-pointer constructor unless OpenSSL function
* producing the pointer is clearly documented as incrementing a lock for it.
*/
void
Security::PeerConnector::bail(ErrorState *error)
{
- Must(error); // or the recepient will not know there was a problem
+ Must(error); // or the recipient will not know there was a problem
Must(callback != NULL);
CbDialer *dialer = dynamic_cast<CbDialer*>(callback->getDialer());
Must(dialer);
dialer->answer().error = error;
callBack();
- // Our job is done. The callabck recepient will probably close the failed
+ // Our job is done. The callabck recipient will probably close the failed
// peer connection and try another peer or go direct (if possible). We
// can close the connection ourselves (our error notification would reach
- // the recepient before the fd-closure notification), but we would rather
- // minimize the number of fd-closure notifications and let the recepient
+ // the recipient before the fd-closure notification), but we would rather
+ // minimize the number of fd-closure notifications and let the recipient
// manage the TCP state of the connection.
}
virtual bool initialize(Security::SessionPointer &);
/// Performs a single secure connection negotiation step.
- /// It is called multiple times untill the negotiation finishes or aborts.
+ /// It is called multiple times until the negotiation finishes or aborts.
void negotiate();
/// Called after negotiation has finished. Cleans up TLS/SSL state.
if (certs.size() > 1) {
// NOTE: calling SSL_CTX_use_certificate() repeatedly _replaces_ the previous cert details.
// so we cannot use it and support multiple server certificates with OpenSSL.
- debugs(83, DBG_CRITICAL, "ERROR: OpenSSL does not support multiple server certificates. Ignoring addional cert= parameters.");
+ debugs(83, DBG_CRITICAL, "ERROR: OpenSSL does not support multiple server certificates. Ignoring additional cert= parameters.");
}
const auto &keys = certs.front();
subSize(filename);
int ret = remove(filename.c_str());
if (ret < 0 && errno != ENOENT)
- throw std::runtime_error("Failed to remove certficate file " + filename + " from db");
+ throw std::runtime_error("Failed to remove certificate file " + filename + " from db");
}
bool Ssl::CertificateDb::deleteInvalidCertificate() {
clientConnection->close();
// TODO: If the server control connection is gone, reset state to login
- // again. Reseting login alone is not enough: FtpRelay::sendCommand() will
+ // again. Resetting login alone is not enough: FtpRelay::sendCommand() will
// not re-login because FtpRelay::serverState() is not going to be
// fssConnected. Calling resetLogin() alone is also harmful because
// it does not reset correctly the client-to-squid control connection (eg
if (!tok.skip('"') || !tok.skip(' '))
continue;
- // optional spaces; remember their number to accomodate MS servers
+ // optional spaces; remember their number to accommodate MS servers
prependSpaces = 1 + tok.skipAll(CharacterSet::SP);
SBuf cmd;
bool createDataConnection(Ip::Address cltAddr);
void closeDataConnection();
- /// Called after data trasfer on client-to-squid data connection is
+ /// Called after data transfer on client-to-squid data connection is
/// finished.
void userDataCompletionCheckpoint(int finalStatusCode);
debugs(49, 5, HERE << "Called.");
PDU = snmp_pdu_create(0);
- /* Allways answer on SNMPv1 */
+ /* Always answer on SNMPv1 */
rq->session.Version = SNMP_VERSION_1;
Community = snmp_parse(&rq->session, PDU, buf, len);
}
/*
- * Packet OK, ACL Check OK, Create reponse.
+ * Packet OK, ACL Check OK, Create response.
*/
static void
snmpConstructReponse(SnmpRequest * rq)
/*
IPv4 address: 10.10.0.9 ==>
oid == 10.10.0.9
- IPv6 adress : 20:01:32:ef:a2:21:fb:32:00:00:00:00:00:00:00:00:OO:01 ==>
+ IPv6 address : 20:01:32:ef:a2:21:fb:32:00:00:00:00:00:00:00:00:OO:01 ==>
oid == 32.1.50.239.162.33.251.20.50.0.0.0.0.0.0.0.0.0.1
*/
void
oid == 10.10.0.9 ==>
IPv4 address: 10.10.0.9
oid == 32.1.50.239.162.33.251.20.50.0.0.0.0.0.0.0.0.0.1 ==>
- IPv6 adress : 20:01:32:ef:a2:21:fb:32:00:00:00:00:00:00:00:00:OO:01
+ IPv6 address : 20:01:32:ef:a2:21:fb:32:00:00:00:00:00:00:00:00:OO:01
*/
void
oid2addr(oid * id, Ip::Address &addr, u_int size)
}
/**
- * Converts the code to a string value. Supported formating codes are:
+ * Converts the code to a string value. Supported formatting codes are:
*
* Error meta information:
* %err_name: The name of a high-level SSL error (e.g., X509_V_ERR_*)
/**
* It uses the convert method to build the string errDetailStr using
* a template message for the current SSL error. The template messages
- * can also contain normal error pages formating codes.
+ * can also contain normal error pages formatting codes.
* Currently the error template messages are hard-coded
*/
void Ssl::ErrorDetail::buildDetail() const
private:
typedef const char * (ErrorDetail::*fmt_action_t)() const;
/**
- * Holds a formating code and its conversion method
+ * Holds a formatting code and its conversion method
*/
class err_frm_code
{
public:
- const char *code; ///< The formating code
+ const char *code; ///< The formatting code
fmt_action_t fmt_action; ///< A pointer to the conversion method
};
- static err_frm_code ErrorFormatingCodes[]; ///< The supported formating codes
+ static err_frm_code ErrorFormatingCodes[]; ///< The supported formatting codes
const char *subject() const;
const char *ca_name() const;
auto *s = buf.c_str();
const auto e = s + size;
- //ignore spaces, new lines and comment lines (starting with #) at the beggining
+ //ignore spaces, new lines and comment lines (starting with #) at the beginning
for (; (*s == '\n' || *s == ' ' || *s == '\t' || *s == '#') && s < e; ++s) {
if (*s == '#')
while (s<e && *s != '\n')
- ++s; // skip untill the end of line
+ ++s; // skip until the end of line
}
if ( s != e) {
/// The ClientBio version of the Ssl::Bio::stateChanged method
/// When the client hello message retrieved, fill the
- /// "features" member with the client provided informations.
+ /// "features" member with the client provided information.
virtual void stateChanged(const SSL *ssl, int where, int ret);
/// The ClientBio version of the Ssl::Bio::write method
virtual int write(const char *buf, int size, BIO *table);
/// If the holdRead flag is true then it does not write any data
/// to socket and sets the "read retry" flag of the BIO to true
virtual int read(char *buf, int size, BIO *table);
- /// Prevents or allow writting on socket.
+ /// Prevents or allow writing on socket.
void hold(bool h) {holdRead_ = holdWrite_ = h;}
/// Sets the buffered input data (Bio::rbuf).
/// If bumping is enabled, analyses the SSL hello message sent by squid OpenSSL
/// subsystem (step3 bumping step) against bumping mode:
/// * Peek mode: Send client hello message instead of the openSSL generated
-/// hello message and normaly denies bumping and allow only
+/// hello message and normally denies bumping and allow only
/// splice or terminate the SSL connection
-/// * Stare mode: Sends the openSSL generated hello message and normaly
+/// * Stare mode: Sends the openSSL generated hello message and normally
/// denies splicing and allow bump or terminate the SSL
/// connection
/// If SQUID_USE_OPENSSL_HELLO_OVERWRITE_HACK is enabled also checks if the
{
/**
- * This class is used to hold the required informations to build
+ * This class is used to hold the required information to build
* a request message for the certificate validator helper
*/
class CertValidationRequest
};
/**
- * This class is used to store informations found in certificate validation
+ * This class is used to store information found in certificate validation
* response messages read from certificate validator helper
*/
class CertValidationResponse: public RefCountable
typedef RefCount<CertValidationResponse> Pointer;
/**
- * This class used to hold error informations returned from
+ * This class used to hold error information returned from
* cert validator helper.
*/
class RecvdError
/**
* This class is responsible for composing or parsing messages destined to
- * or comming from a certificate validation helper.
+ * or coming from a certificate validation helper.
* The messages format is:
\verbatim
response/request-code SP body-length SP [key=value ...] EOL
CertValidationMsg(MessageKind kind): CrtdMessage(kind) {}
/// Build a request message for the cert validation helper
- /// using informations provided by vcert object
+ /// using information provided by vcert object
void composeRequest(CertValidationRequest const &vcert);
- /// Parse a response message and fill the resp object with parsed informations
+ /// Parse a response message and fill the resp object with parsed information
bool parseResponse(CertValidationResponse &resp, std::string &error);
/// Search a CertItems list for the certificate with ID "name"
i = map.find(Ssl::CrtdMessage::param_Sign);
if (i != map.end()) {
if ((certProperties.signAlgorithm = Ssl::certSignAlgorithmId(i->second.c_str())) == Ssl::algSignEnd) {
- error = "Wrong signing algoritm: ";
+ error = "Wrong signing algorithm: ";
error += i->second;
return false;
}
class CertificateProperties;
/**
- * This class is responsible for composing and parsing messages destined to, or comming
- * from an ssl_crtd server. Format of these mesages is:
+ * This class is responsible for composing and parsing messages destined to, or coming
+ * from an ssl_crtd server. Format of these messages is:
* response/request-code SP body length SP body
*/
class CrtdMessage
std::string cn = rawCn;
if (cn.length() > MaxCnLen) {
- // In the case the length od CN is more than the maximum supported size
+ // In the case the length of CN is more than the maximum supported size
// try to use the first upper level domain.
size_t pos = 0;
do {
if (X509_add_ext(cert.get(), ext, -1))
++added;
if (nid == NID_key_usage && !rsaPkey) {
- // NSS does not requre the KeyEncipherment flag on EC keys
+ // NSS does not require the KeyEncipherment flag on EC keys
// but it does require it for RSA keys. Since ssl-bump
// substitutes RSA keys for EC ones, we need to ensure that
// that the more stringent requirements are met.
/**
\ingroup SslCrtdSslAPI
- * Initialize the bio with the file 'filename' openned for reading
+ * Initialize the bio with the file 'filename' opened for reading
*/
bool OpenCertsFileForReading(BIO_Pointer &bio, const char *filename);
/**
\ingroup SslCrtdSslAPI
- * Initialize the bio with the file 'filename' openned for writting
+ * Initialize the bio with the file 'filename' opened for writing
*/
bool OpenCertsFileForWriting(BIO_Pointer &bio, const char *filename);
Security::PrivateKeyPointer signWithPkey; ///< The key of the signing certificate
bool setValidAfter; ///< Do not mimic "Not Valid After" field
bool setValidBefore; ///< Do not mimic "Not Valid Before" field
- bool setCommonName; ///< Replace the CN field of the mimicing subject with the given
+ bool setCommonName; ///< Replace the CN field of the mimicking subject with the given
std::string commonName; ///< A CN to use for the generated certificate
CertSignAlgorithm signAlgorithm; ///< The signing algorithm to use
const EVP_MD *signHash; ///< The signing hash to use
filledCheck->serverCert.reset();
}
// If the certificate validator is used then we need to allow all errors and
- // pass them to certficate validator for more processing
+ // pass them to certificate validator for more processing
else if (Ssl::TheConfig.ssl_crt_validator) {
ok = 1;
}
for (i = 0; current && (i < depth); ++i) {
if (X509_check_issued(current, current) == X509_V_OK) {
// either ctx->cert is itself self-signed or untrustedCerts
- // aready contain the self-signed current certificate
+ // already contain the self-signed current certificate
break;
}
/**
\ingroup ServerProtocolSSLAPI
- * Generates a certificate and a private key using provided properies and set it
+ * Generates a certificate and a private key using provided properties and set it
* to SSL object.
*/
bool configureSSL(SSL *ssl, CertificateProperties const &properties, AnyP::PortCfg &port);
char *ptr_to_buf = target.data;
int64_t location = target.offset;
- /* Start copying begining with this block until
+ /* Start copying beginning with this block until
* we're satiated */
while (p && bytes_to_go > 0) {
return true;
}
- return !range.size(); // empty range is contigous
+ return !range.size(); // empty range is contiguous
}
bool
mem_node const *start() const;
mem_node *getBlockContainingLocation (int64_t location) const;
/* access the contained nodes - easier than punning
- * as a contianer ourselves
+ * as a container ourselves
*/
const Splay<mem_node *> &getNodes() const;
char * NodeGet(mem_node * aNode);
va_list ap;
/* Fix of bug 753r. The value of vargs is undefined
* after vsnprintf() returns. Make a copy of vargs
- * incase we loop around and call vsnprintf() again.
+ * in case we loop around and call vsnprintf() again.
*/
va_copy(ap,vargs);
errno = 0;
* store_dirs_rebuilding is initialized to _1_ as a hack so that
* storeDirWriteCleanLogs() doesn't try to do anything unless _all_
* cache_dirs have been read. For example, without this hack, Squid
- * will try to write clean log files if -kparse fails (becasue it
+ * will try to write clean log files if -kparse fails (because it
* calls fatal()).
*/
int Store::Controller::store_dirs_rebuilding = 1;
}
/*
- * handle callbacks all avaliable fs'es
+ * handle callbacks all available fs'es
*/
int
Store::Controller::callback()
{
- /* This will likely double count. Thats ok. */
+ /* This will likely double count. That's ok. */
PROF_start(storeDirCallback);
/* mem cache callbacks ? */
/* walk each fs */
for (i = 0; i < Config.cacheSwap.n_configured; ++i) {
- /* XXX FixMe: This should be done "in parallell" on the different
+ /* XXX FixMe: This should be done "in parallel" on the different
* cache_dirs, not one at a time.
*/
/* call the maintain function .. */
/*
* NOTE: 'Header' refers to the swapfile metadata header.
- * 'OBJHeader' refers to the object header, with cannonical
+ * 'OBJHeader' refers to the object header, with canonical
* processed object headers (which may derive from FTP/HTTP etc
* upstream protocols
* 'Body' refers to the swapfile body, which is the full
return std::string();
if (theBareNeedlePos == 0)
- return "@B"; // at the beggining of the hay string
+ return "@B"; // at the beginning of the hay string
if (theBareNeedlePos == theStringHay.length()-theStringNeedle.length())
return "@E"; // at the end of the hay string
return "@M"; // in the "middle" of the hay string
theLoop.run();
CPPUNIT_ASSERT_EQUAL(2, engine.calls);
/* add an engine which is suffering errors. This should result in 10
- * loops until the loop stops - because thats the error retry amount
+ * loops until the loop stops - because that's the error retry amount
*/
RecordingEngine failing_engine(AsyncEngine::EVENT_ERROR);
theLoop.registerEngine(&failing_engine);
void
testHttpRequest::testCreateFromUrl()
{
- /* vanilla url, implict method */
+ /* vanilla url, implicit method */
unsigned short expected_port;
SBuf url("http://foo:90/bar");
const MasterXaction::Pointer mx = new MasterXaction(XactionInitiator::initClient);
CPPUNIT_ASSERT_EQUAL(hasher(literal),hasher(SBuf(fox)));
CPPUNIT_ASSERT_EQUAL(hasher(SBuf(fox)),hasher(SBuf(fox)));
- //differen content should have different hash
+ //different content should have different hash
CPPUNIT_ASSERT(hasher(SBuf(fox)) != hasher(SBuf(fox1)));
{
// Windows has an alternative method if there is no POSIX getrusage defined.
if (WIN32_OS_version >= _WIN_OS_WINNT) {
/* On Windows NT and later call PSAPI.DLL for process Memory */
- /* informations -- Guido Serassio */
+ /* information -- Guido Serassio */
HANDLE hProcess;
PROCESS_MEMORY_COUNTERS pmc;
hProcess = OpenProcess(PROCESS_QUERY_INFORMATION |
return Config.uniqueHostname ? Config.uniqueHostname : getMyHostname();
}
-/** leave a priviliged section. (Give up any privilegies)
+/** leave a privileged section. (Give up any privilegies)
* Routines that need privilegies can rap themselves in enter_suid()
* and leave_suid()
* To give upp all posibilites to gain privilegies use no_suid()
#endif
}
-/* Give up the posibility to gain privilegies.
+/* Give up the possibility to gain privilegies.
* this should be used before starting a sub process
*/
void
/**
* Compatibility wrapper function for waitpid
- * \pid the pid of child proccess to wait for.
+ * \pid the pid of child process to wait for.
* \param status the exit status returned by waitpid
* \param flags WNOHANG or 0
*/
int empty_portlist[WCCP2_NUMPORTS] = {0, 0, 0, 0, 0, 0, 0, 0};
-/* END WCCP V2 PROTOCL TYPES DEFINITION */
+/* END WCCP V2 PROTOCOL TYPES DEFINITION */
void wccp2_add_service_list(int service, int service_id, int service_priority,
int service_proto, int service_flags, int ports[], int security_type, char *password);
/* number of caches */
struct in_addr *cache_address;
- /* Alternative assignement mask/values */
+ /* Alternative assignment mask/values */
int num_maskval;
struct wccp2_mask_element_t *mask_element;
/**
* Parse wccp2_return_method and wccp2_forwarding_method options
* they can be '1' aka 'gre' or '2' aka 'l2'
- * repesenting the integer numeric of the same.
+ * representing the integer numeric of the same.
*/
void
parse_wccp2_method(int *method)
/**
* Parse wccp2_assignment_method option
* they can be '1' aka 'hash' or '2' aka 'mask'
- * repesenting the integer numeric of the same.
+ * representing the integer numeric of the same.
*/
void
parse_wccp2_amethod(int *method)
fi
#
-# above command currently encounters dependancy problems on cleanup.
+# above command currently encounters dependency problems on cleanup.
#
# do not build any of the install's ...
#
## Please see the COPYING and CONTRIBUTORS files for details.
##
-# test all header files (.h) for dependancy issues.
+# test all header files (.h) for dependency issues.
#
# Ideally this test should be performed twice before any code is accepted.
# With or without inline enabled. This is needed because the .cci files
} else if (s_iInitCount < 0)
return (s_iInitCount);
- /* s_iInitCount == 0. Do the initailization */
+ /* s_iInitCount == 0. Do the initialization */
iVersionRequested = MAKEWORD(2, 0);
err = WSAStartup((WORD) iVersionRequested, &wsaData);
if (status == 401 || status == 407) {
reset_auth(req);
- status = 403; /* Forbiden, see comments in case isForward: */
+ status = 403; /* Forbidden, see comments in case isForward: */
}
/* this is a way to pass HTTP status to the Web server */
//
// Revision 1.12 2000/03/29 07:54:41 voeckler
// added mechanism to give a port specification precedence over a host
-// specificiation with the -p option and not colon.
+// specification with the -p option and not colon.
//
// Revision 1.11 1999/06/18 13:18:28 voeckler
// added refcount, fixed missing LF in -s output.
// purpose: concatinate an arbitrary number of C strings.
// paramtr: start (IN): first C string
// ... (IN): further C strings, terminated with a NULL pointer
-// returns: memory allocated via new(), containing the concatinated string.
+// returns: memory allocated via new(), containing the concatenated string.
{
va_list ap;
const char* s;
}
}
-// o.k., this is pure lazyness...
+// o.k., this is pure laziness...
static struct in_addr serverHost;
static unsigned short serverPort;
::linebuffer[ ::buffersize-1 ] = '\0'; // force-terminate string
// check the offset into the start of object data. The offset is
- // stored in a host endianess after the first byte.
+ // stored in a host endianness after the first byte.
unsigned int datastart;
memcpy( &datastart, ::linebuffer + 1, sizeof(unsigned int) );
if ( datastart > ::buffersize - addon - 1 ) {
// nodelay (IN): true=set TCP_NODELAY option.
// sendBufferSize (IN): don't set (use sys defaults) if < 0
// recvBufferSize (IN): don't set (use sys defaults) if < 0
-// returns: 0 == if everthing went ok, -1 otherwise
+// returns: 0 == if everything went ok, -1 otherwise
// warning: sockfd will be closed, if -1 is returned!
{
// set TCP_NODELAY option, if that is wanted.
/// start timing a new transaction
void TimerStart();
-/// calculate and display the statictics for a complete transaction
+/// calculate and display the statistics for a complete transaction
/// \param fsize number of bytes transferred during this transaction (for KB/s measure)
void TimerStop(size_t fsize);
/// port on the server to contact
uint16_t port;
- /// whether to enable TLS on the server connnection
+ /// whether to enable TLS on the server connection
bool tlsEnabled;
/// whether to do anonymous TLS (non-authenticated)