]> git.ipfire.org Git - thirdparty/squid.git/log
thirdparty/squid.git
18 years ago./configure needs to use $CRYPTLIB when checking for crypt()
wessels [Sat, 30 Jun 2007 12:33:05 +0000 (12:33 +0000)] 
./configure needs to use $CRYPTLIB when checking for crypt()

When ./configure checks for the crypt() function, it should have -lcrypt
in $LIBS (if -lcrypt was found).  Created a special AC_CHECK_FUNCS
for crypt() that temporarily adds $CRYPTLIB to $LIBS.

This became a problem when #if HAVE_CRYPT was added to
helpers/basic_auth/NCSA/ncsa_auth.c.  The crypt() function was always
there, but not always surrounded by the #ifdef.

18 years agoFix compile error in non-ICAP builds.
amosjeffries [Fri, 29 Jun 2007 14:31:59 +0000 (14:31 +0000)] 
Fix compile error in non-ICAP builds.

18 years agoExplicitly disabled ICAPConfig copying and assignment to prevent such things
rousskov [Thu, 28 Jun 2007 21:28:59 +0000 (21:28 +0000)] 
Explicitly disabled ICAPConfig copying and assignment to prevent such things
from happening because the default/generated constructor and operator do not
do the right thing.

18 years agoFixed coredumps when requesting /config cache_object with ICAP enabled.
rousskov [Thu, 28 Jun 2007 21:18:16 +0000 (21:18 +0000)] 
Fixed coredumps when requesting /config cache_object with ICAP enabled.

Various dump_icap_*() functions were copying ICAPConfig instances. ICAPConfig
class does not support copying and copying is not really needed (and may be
expensive) here.

18 years agoMarked ICAPConfig::dump*() methods as constant because they are.
rousskov [Thu, 28 Jun 2007 21:11:01 +0000 (21:11 +0000)] 
Marked ICAPConfig::dump*() methods as constant because they are.
This change should have no runtime effect.

18 years agoPartial bug #1921 fix: Limit the amount of data read by FTP to avoid
rousskov [Thu, 28 Jun 2007 20:31:58 +0000 (20:31 +0000)] 
Partial bug #1921 fix: Limit the amount of data read by FTP to avoid
overflowing ICAP buffers. This fix is partial because it applies to
reading response bodies (the data stream). A complete fix should also
address cases where the ICAP buffers are overwhelmed by content produced
by FTP code (e.g., a directory listing).

18 years agoBug #1986 fix: Do not abandon ICAP when doing FTP HEAD.
rousskov [Thu, 28 Jun 2007 20:20:05 +0000 (20:20 +0000)] 
Bug #1986 fix: Do not abandon ICAP when doing FTP HEAD.
Also, do not forget to adjust cachability of FTP responses when doing ICAP.

FTP HEAD processing code was calling appendSuccessHeader() but was not
checking whether the latter set icapAccessCheckPending. This resulted
in aborted FTP HEAD transactions.

Also, appendSuccessHeader was adjusting entry cachability based on
authentication flags but _not_ when ICAP was enabled. I moved that code
to newly added haveParsedReplyHeaders() which is called with or without
ICAP, just like in HttpState.

TODO: rename appendSuccessHeader because it is doing a lot more than that.

18 years agoThe -a command line option adds ports. Updated documentation to reflect this.
hno [Wed, 27 Jun 2007 10:26:11 +0000 (10:26 +0000)] 
The -a command line option adds ports. Updated documentation to reflect this.

In Squid-3 the -a command line option no longer overwrites the first
http_port specification. Instead it adds a new http_port without any options.

18 years agoPolish HttpStateData::readReply() layout to weed out bugs, step 4:
rousskov [Tue, 26 Jun 2007 06:35:24 +0000 (06:35 +0000)] 
Polish HttpStateData::readReply() layout to weed out bugs, step 4:
Polished comments and debugging messages.
This change should have no runtime effect.

18 years agoPolish HttpStateData::readReply() layout to weed out bugs, step 3:
rousskov [Tue, 26 Jun 2007 06:24:33 +0000 (06:24 +0000)] 
Polish HttpStateData::readReply() layout to weed out bugs, step 3:
Handle I/O errors first so that we do not have to compare flag
with COMM_OK in all the if statements that follow.
This change should have no runtime effect.

18 years agoPolish HttpStateData::readReply() layout to weed out bugs, step 2:
rousskov [Tue, 26 Jun 2007 06:16:00 +0000 (06:16 +0000)] 
Polish HttpStateData::readReply() layout to weed out bugs, step 2:
Use the xerrno parameter instead of the global errno. The latter has
nothing to do with the old system call we are post-processing now.

18 years agoPolish HttpStateData::readReply() layout to weed out bugs, step 1:
rousskov [Tue, 26 Jun 2007 06:11:08 +0000 (06:11 +0000)] 
Polish HttpStateData::readReply() layout to weed out bugs, step 1:
1996 (revision 1.8) code was setting errno to zero before calling read(2).
We no longer make system calls in HttpStateData::readReply(). Resetting
errno here is a little bit too late.

18 years agoAuthor: Emilio Casbas <ecasbas@unav.es>
hno [Tue, 26 Jun 2007 05:05:32 +0000 (05:05 +0000)] 
Author: Emilio Casbas <ecasbas@unav.es>
squid.conf.default cleanups

18 years agoAuthor: Christos Tsantilas <chtsanti@users.sourceforge.net>
rousskov [Tue, 26 Jun 2007 04:34:24 +0000 (04:34 +0000)] 
Author: Christos Tsantilas <chtsanti@users.sourceforge.net>
Bug #1971 fix, part 1: Check whether the store entry got aborted while
we were waiting for an asynchronous ICAP ACL check.

Also moved common icapAclCheckDone() code from FtpStateData and
HttpStateData into Server. Removed "if (eof) serverComplete()" checks from
HttpStateData::processReplyHeader and HttpStateData::failReply methods as
eof can no longer be true there.

18 years agoBug #1798: Temporary shortage of system filedescriptors may cause Squid to perma
hno [Mon, 25 Jun 2007 20:38:14 +0000 (20:38 +0000)] 
Bug #1798: Temporary shortage of system filedescriptors may cause Squid to perma
nently stop accepting connections

To adjust to system limits Squid automatically reduces the amount of
filedescriptors when it detects a system wide shortage. However, this
reduction might go so far that Squid completely stops accepting new
connections.

This patch adds a limit causing Squid to restart if the limit gets way
too low, in an attempt to recover if the situation is temporary.

18 years agoBootstrapped
hno [Mon, 25 Jun 2007 19:57:43 +0000 (19:57 +0000)] 
Bootstrapped

18 years agoBug #1566: esi:include aborts with lock assert
hno [Mon, 25 Jun 2007 17:45:20 +0000 (17:45 +0000)] 
Bug #1566: esi:include aborts with lock assert

this is a temporary fix.

more analysis is needed to avoid memory leaks here..

18 years agoSmall example on how to use the squid_session helper
hno [Mon, 25 Jun 2007 17:31:46 +0000 (17:31 +0000)] 
Small example on how to use the squid_session helper

Merged from Squid-2

18 years agoForgot to add the ncsa_auth man page
hno [Mon, 25 Jun 2007 17:27:35 +0000 (17:27 +0000)] 
Forgot to add the ncsa_auth man page

18 years agoImported ncsa_auth changes from Squid-2
hno [Mon, 25 Jun 2007 17:27:03 +0000 (17:27 +0000)] 
Imported ncsa_auth changes from Squid-2

- Support for plain MD5 hashed password (no salting)
- man page documenting it's use

18 years agoRenamed db_auth.pl to squid_db_auth, and autogenerate perl path and man page
hno [Mon, 25 Jun 2007 17:13:15 +0000 (17:13 +0000)] 
Renamed db_auth.pl to squid_db_auth, and autogenerate perl path and man page

changes merged from Squid-2

18 years agoImport squid_radius_auth helper for basic authentication to RADIUS
hno [Mon, 25 Jun 2007 17:02:34 +0000 (17:02 +0000)] 
Import squid_radius_auth helper for basic authentication to RADIUS

18 years agoForgot to dist the eDirectory helper
hno [Mon, 25 Jun 2007 17:01:48 +0000 (17:01 +0000)] 
Forgot to dist the eDirectory helper

18 years agoClean up whitespace in squid.conf.default
hno [Mon, 25 Jun 2007 16:10:45 +0000 (16:10 +0000)] 
Clean up whitespace in squid.conf.default

18 years agoClean up HTML escapes in the configuration manual
hno [Mon, 25 Jun 2007 15:58:49 +0000 (15:58 +0000)] 
Clean up HTML escapes in the configuration manual

18 years agoSort config options to match Squid-2.
hno [Mon, 25 Jun 2007 15:29:29 +0000 (15:29 +0000)] 
Sort config options to match Squid-2.

18 years agoBootstrapped
hno [Mon, 25 Jun 2007 06:10:41 +0000 (06:10 +0000)] 
Bootstrapped

18 years agoAuthor: Markus Moeller <huaraz@moeller.plus.com>
hno [Mon, 25 Jun 2007 04:34:15 +0000 (04:34 +0000)] 
Author: Markus Moeller <huaraz@moeller.plus.com>
Kerberos SPNEGO helper

Kerberos-only SPNEGO helper using MIT or Heimdal kerberos
and the refrence SPNEGO parser published by Microsoft

18 years agoBootstrapped
hno [Sun, 24 Jun 2007 06:10:39 +0000 (06:10 +0000)] 
Bootstrapped

18 years agoAuthor: Manu Garg <manugarg@gmail.com>
hno [Sun, 24 Jun 2007 03:08:39 +0000 (03:08 +0000)] 
Author: Manu Garg <manugarg@gmail.com>
Bug #1968: Squid hangs occasionally when using DNS search paths

Squid 2.6 (tested with squid 2.6.1 and 2.6.5) hangs after running for some time
(could be from 5 min to 40 min on a busy server). Squid becomes unresponsive
and CPU usage becomes 90-100%. ltrace shows that it's continuously comparing
strings in an infinite loop:

strcmp("thumbnail.videoegg.com", "i12.ebaystatic.com") = -1
strcmp("thumbnail.videoegg.com", "i12.ebaystatic.com") = -1
strcmp("thumbnail.videoegg.com", "i12.ebaystatic.com") = -1

The problem seems to be in the way squid's internal DNS system (dns_internal.c)
keeps record of looked up but not yet answered DNS queries. This bug is hit
specifically when multiple search paths are used in /etc/resolv.conf.

Squid caches all dns queries before sending them to avoid duplicate queries for
the same name. (look at: idnsCacheQuery(q) and hash_table *idns_lookup_hash, in
dns_internal.c). This mechanism works well unless multiple search paths are
defined in /etc/resolv.conf. When multiple dns search paths are defined, same
query object is modified and next search path is concatenated to it's name.
This query is cached again and resent.

Problem is that the query is not unlinked before being cached and thus linked
again. Only the key of hash object (that's actually name) changes this time;
object itself remains same. This corrupts the hash table of looked up queries.

18 years agoBug #1948: digest_edir_auth helper, using novell eDirectory universal password
hno [Sun, 24 Jun 2007 02:50:10 +0000 (02:50 +0000)] 
Bug #1948: digest_edir_auth helper, using novell eDirectory universal password

This is a modified version of digets_ldap_auth, with eDirectory special hooks
for retrieving the Universal Password plain text password.

18 years agoAdd missing helpers/digest_auth/eDirectory/.cvsignore
hno [Sun, 24 Jun 2007 02:48:35 +0000 (02:48 +0000)] 
Add missing helpers/digest_auth/eDirectory/.cvsignore

18 years agoBootstrapped
hno [Wed, 20 Jun 2007 06:10:40 +0000 (06:10 +0000)] 
Bootstrapped

18 years agoufsdump needs a bit of dependencies or parallell builds may fail
hno [Wed, 20 Jun 2007 04:01:11 +0000 (04:01 +0000)] 
ufsdump needs a bit of dependencies or parallell builds may fail

18 years agoThe last http.cc commit message is missing the following important change:
rousskov [Wed, 20 Jun 2007 03:19:04 +0000 (03:19 +0000)] 
The last http.cc commit message is missing the following important change:

HttpStateData may get stuck if request body producer aborts while the
request body is being sent. The code already had a related XXX comment.
This change is meant to abort the server transaction when that happens,
but I cannot reproduce the problem and, hence, is not sure the change is
correct and sufficient.

When handling request body producer abort, create an error before
terminating the server transaction because FwdState asserts there is an
error. Unfortunately, we do not know why the body was aborted and have
to guess. The response is probably irrelevant if it was the HTTP client
that aborted the request. Thus, we are using ICAP_ERROR in hope that all
other cases are ICAP-related. If there are exceptions, we may confuse
admins and developers.

Merged from the squid3-icap branch.

18 years agoPartial bug #1973 fix: Try to revive a suspended service after the
rousskov [Wed, 20 Jun 2007 03:13:49 +0000 (03:13 +0000)] 
Partial bug #1973 fix: Try to revive a suspended service after the
icap_service_revival_delay.

When a service gets suspended, schedule an OPTIONS update after the
icap_service_revival_delay. If there is already an OPTIONS fetch scheduled,
that outdated event will be deleted using eventDelete().

Eventually, we may want to have a separate option to control suspended
service revival.

Polished code, comments, and debugging.

Merged from the squid3-icap branch.

18 years agoBug #1974 fix: Bypass failures of optional ICAP services.
rousskov [Wed, 20 Jun 2007 03:12:15 +0000 (03:12 +0000)] 
Bug #1974 fix: Bypass failures of optional ICAP services.

To bypass various failures, ICAPModXact catches its own exceptions and enables
the "echo" mode instead of quitting. Exceptions are not overruled if the
transaction is retriable. The code disables bypass for essential ICAP services
and when something makes clean echoing impossible (e.g., some buffered HTTP
body content was consumed).

This design allows the same bypass mechanism to be used for moth REQMOD and
RESPMOD, regardless of the vectoring point. Its implementation did not require
changing any Squid core files.

Previously many if not most ICAP failures were not bypassed and users were
receiving cryptic "ICAP protocol error" messages when an optional ICAP
service went down. With the current code, the service may go up and down many
times but only the transactions with large message bodies (that were executing
when the service went down) should be affected.

When deciding on whether to consume HTTP content written to the ICAP server,
Squid has to resolve a trade-off: postponing consumption longer increases
process footprint and may slow the HTTP side down, but consuming sooner
increases the chance of that "ICAP protocol" error being returned to the user.
Since Squid cannot buffer very large messages, some errors are inevitable. We
may want to add knobs to control this tradeoff.

The entries below are only indirectly related to the bug #1974 fix.

virginConsume() does not call or imply checkConsuming(). We must call
checkConsuming() even if we called virginConsume(). Otherwise, we may leave
and get destroyed while the pipe object still holds a [consumer] pointer to
us.

Polished VirginBodyAct so that we can distinguish disabled from undecided
states without using magical negative size constants.

Do not stop writing before throwing an exception. If the exception kills the
transaction, the transaction should cleanup the writer anyway. To bypass an
exception, we need all virgin content intact. Stopping writes before throwing
an exception may consume virgin content because the code does not know that
the exception is about to be thrown and may perceive content as "no longer
needed".

Added debugging.

Merged from the squid3-icap branch.

18 years agoIgnore comm_write notifications if the newly added
rousskov [Wed, 20 Jun 2007 03:08:33 +0000 (03:08 +0000)] 
Ignore comm_write notifications if the newly added
ICAPXaction::ignoreLastWrite member is set. This allows kids to more safely
work around comm inability to cancel a pending write request.

When connect() times out, throw an exception instead of calling mustStop()
because we can bypass the former and not the latter. We cannot bypass mustStop
because the code may use it for legitimate stopping conditions. Eventually,
we may want to have two kinds of exceptions: bypassable and fatal.

Support icap_connect_timeout and icap_io_timeout squid.conf options.

Count I/O timeout as a service failure. This helps suspend broken services
faster and avoid HTTP processing delays when the service is optional.

Eventually, we will probably count all (or most) exceptions as service
failures.

Removed ICAPXaction members that were copied to AsyncJob some time ago.

Polished debugging.

Merged from the squid3-icap branch.

18 years agoAdded icap_connect_timeout and icap_io_timeout squid.conf options to control
rousskov [Wed, 20 Jun 2007 03:03:45 +0000 (03:03 +0000)] 
Added icap_connect_timeout and icap_io_timeout squid.conf options to control
how long an ICAP transaction should wait for the ICAP server to accept its
connection or process the next I/O. These options are needed for many optional
ICAP services that are poorly reachable or otherwise delay network I/Os.
Waiting for a service is harmful to user experience, especially when the
service failure or lack of connectivity can be bypassed.

The two knobs use HTTP option values as defaults and have different defaults
for essential and optional services. This may be a bad idea and will change
depending on user feedback.

All timeouts are currently global. Eventually, we will need per-service or
service group timeouts and, possibly, even an OPTIONS-specific timeout.

Merged from the squid3-icap branch.

18 years agoMade AsyncJob::callException() virtual so that kids can customize exception
rousskov [Wed, 20 Jun 2007 03:00:11 +0000 (03:00 +0000)] 
Made AsyncJob::callException() virtual so that kids can customize exception
handling. ICAP transactions will use that to bypass failures.

Merged from the squid3-icap branch.

18 years agoDo not retry server transactions aborted due to request body supply
rousskov [Wed, 20 Jun 2007 02:58:26 +0000 (02:58 +0000)] 
Do not retry server transactions aborted due to request body supply
failures because the problem is not with the server and will not go away
if FwdState tries again.

Merged from the squid3-icap branch.

18 years agoAdded debugging and polished comments.
rousskov [Wed, 20 Jun 2007 02:49:37 +0000 (02:49 +0000)] 
Added debugging and polished comments.

18 years agoBug #1981 fix: Tell FwdState that an unregistered and failed Server is
rousskov [Wed, 20 Jun 2007 02:27:00 +0000 (02:27 +0000)] 
Bug #1981 fix: Tell FwdState that an unregistered and failed Server is
gone.

When a Server unregisters its fd (by calling FwdState::unregister) and
then fails, call FwdState::handleUnregisteredServerEnd to tell FwdState
that the server is done working, so that the transaction does not get
stuck waiting for the server to call FwdState::complete. The old code
would just set Server's FwdState pointer to NULL which was only enough
if FwdState::self was already NULL due to aborts.

This change fixed the bug in my limited ICAP tests.

The whole FwdState relationship with Servers needs a serious revision as
similar bugs probably do (or will) exist. We probably need to maintain a
state variable representing the relationship. The following Server
states are possible, at least: got valid FD and working, closed FD but
still working, stopped working (failure or success). FwdState needs to
be notified when we stopped working. Currently, when Server closes the
FD, deep down the Server stack, it may not be clear whether the Server
is still working or not.

Finally, it may be a good idea for FwdState to notify Server when
FwdState is aborted. Currently, the Server must check that the store
entry is still valid to notice the abort, and it sometimes forgets to do
that, causing store assertions.

18 years agoBug #1900: Double "squid -k shutdown" makes Squid restart again
hno [Mon, 18 Jun 2007 04:08:48 +0000 (04:08 +0000)] 
Bug #1900: Double "squid -k shutdown" makes Squid restart again

18 years agoAuthor: Christos Tsantilas <chtsanti@users.sourceforge.net>
hno [Mon, 18 Jun 2007 03:48:20 +0000 (03:48 +0000)] 
Author: Christos Tsantilas <chtsanti@users.sourceforge.net>
HTTP/0.9 responses support

This patch adds back HTTP/0.9 support, upgrading them to HTTP/1.0.

18 years agoMake ACLChecklist::matchAclListSlow a private member function. Not part of the public API
hno [Mon, 18 Jun 2007 03:39:49 +0000 (03:39 +0000)] 
Make ACLChecklist::matchAclListSlow a private member function. Not part of the public API

18 years agoKill old stale code dealing with deferred reads and delay pools.
hno [Sun, 10 Jun 2007 18:13:31 +0000 (18:13 +0000)] 
Kill old stale code dealing with deferred reads and delay pools.

Squid-3 already have a deferred read infrastructure dealing with
buffering and delay pools, taking filedescriptors in/out from the
active set when needed. The comm loops don't need to emulate this.

18 years agoBootstrapped
hno [Sun, 10 Jun 2007 18:08:55 +0000 (18:08 +0000)] 
Bootstrapped

18 years agoMark kqueue as experimental
hno [Sun, 10 Jun 2007 18:08:07 +0000 (18:08 +0000)] 
Mark kqueue as experimental

18 years agoClean up configure magics selecting which comm loop to use, promote epoll to stable
hno [Sun, 10 Jun 2007 18:07:28 +0000 (18:07 +0000)] 
Clean up configure magics selecting which comm loop to use, promote epoll to stable

This is basically a copy from Squid-2, making configure a bit smarter
in selecting which comm loop to use, and automatically enabling epoll
if it seems usable.

kqueue is still not activated automatically even if defected as the
comm_kqueue implementation is still experimental and known to have issues

18 years agoBug #1939: --enable-epoll causes SSL to occationally hang
hno [Sun, 10 Jun 2007 17:02:23 +0000 (17:02 +0000)] 
Bug #1939: --enable-epoll causes SSL to occationally hang

This patch makes comm_epoll support the "read_pending" flag, indicating
data has been buffered at the I/O layer and is immediately available for
processing without having to wait for an I/O event.

kqueue still needs fixing.

18 years agoRestore the code making helpers run in their own sessions.
hno [Sun, 10 Jun 2007 16:43:17 +0000 (16:43 +0000)] 
Restore the code making helpers run in their own sessions.

Having the helpers in the same session / process group as Squid broke
debugging with Squid running in foreground, which is worth more than
to have the process associations entirely correct.

18 years agoBootstrapped
hno [Sun, 3 Jun 2007 05:48:13 +0000 (05:48 +0000)] 
Bootstrapped

18 years agoDatabase auth helper using Perl DBI
hno [Sun, 3 Jun 2007 05:46:00 +0000 (05:46 +0000)] 
Database auth helper using Perl DBI

18 years agoBug #1983: Update the read timeout when reading from an CONNECT tunnel
hno [Sat, 2 Jun 2007 18:21:57 +0000 (18:21 +0000)] 
Bug #1983: Update the read timeout when reading from an CONNECT tunnel

Also need to deal with the timeout while sending data to the server,
or the timeout might trigger during a large PUT/POST.

18 years agoBug #1983: Update the read timeout when reading from an CONNECT tunnel
hno [Sat, 2 Jun 2007 18:01:34 +0000 (18:01 +0000)] 
Bug #1983: Update the read timeout when reading from an CONNECT tunnel

18 years agoRename more SSL references to Tunnel in tunnel.cc
hno [Sat, 2 Jun 2007 17:54:26 +0000 (17:54 +0000)] 
Rename more SSL references to Tunnel in tunnel.cc

18 years agoMake tunnel.cc identify itself as tunnel and not ssl
hno [Sat, 2 Jun 2007 17:50:32 +0000 (17:50 +0000)] 
Make tunnel.cc identify itself as tunnel and not ssl

tunnel.cc is about tunnel operation as needed for CONNECT, not really SSL.
This change renames everything in tunnel.cc to use tunnel instead of ssl,
this to avoid confusion with the SSL code.

18 years agoBug #1976 fix: Do not check OPTIONS response specifics if the response
rousskov [Thu, 31 May 2007 02:22:30 +0000 (02:22 +0000)] 
Bug #1976 fix: Do not check OPTIONS response specifics if the response
is invalid in some way. Squid should now handle 404 Not Found and other
"invalid" ICAP OPTIONS responses by marking the ICAP service down.

OPTIONS error setting needs more work, but reporting the last error should
work for now.

Thanks to Christos Tsantilas for reporting and investigating this bug.

18 years agoBootstrapped
hno [Wed, 30 May 2007 06:10:40 +0000 (06:10 +0000)] 
Bootstrapped

18 years agoRollback String API changes. Delayed to 3.1.
amosjeffries [Tue, 29 May 2007 19:31:36 +0000 (19:31 +0000)] 
Rollback String API changes. Delayed to 3.1.

18 years agoAdded 'clientside_tos' directive and feature.
wessels [Sat, 26 May 2007 12:38:03 +0000 (12:38 +0000)] 
Added 'clientside_tos' directive and feature.

Much like 'tcp_outgoing_tos' except that this affect connections
between Squid and its clients instead of server-side connections.

18 years agoAdjust refresh_pattern min-age to make 0 mean 0, not 1 second
hno [Thu, 24 May 2007 07:45:03 +0000 (07:45 +0000)] 
Adjust refresh_pattern min-age to make 0 mean 0, not 1 second

18 years agoURI-escape using the recommended upper case
hno [Thu, 24 May 2007 03:59:44 +0000 (03:59 +0000)] 
URI-escape using the recommended upper case

18 years agoKill the redundant url_convert_hex function. Equivalent to rfc1738_unescape
hno [Thu, 24 May 2007 03:10:06 +0000 (03:10 +0000)] 
Kill the redundant url_convert_hex function. Equivalent to rfc1738_unescape

18 years agoBack out unintentional commit of unrelated url.cc changes
hno [Thu, 24 May 2007 03:07:43 +0000 (03:07 +0000)] 
Back out unintentional commit of unrelated url.cc changes

18 years agoFix the cppunit tests to use setUp() rather than an static constructor to
hno [Thu, 24 May 2007 02:59:14 +0000 (02:59 +0000)] 
Fix the cppunit tests to use setUp() rather than an static constructor to
initialize memory pools etc.

Static constructors is dangerous in that you don't know for sure
in which order they will be called. The recent String pool change
where the object size is dynamically calculated on startup is and
example, where the requested pool size had not yet been calculated
before the pools was created.

18 years agoDo not reuse a persistent ICAP connection if icap_persistent_connections in
rousskov [Tue, 22 May 2007 23:43:40 +0000 (23:43 +0000)] 
Do not reuse a persistent ICAP connection if icap_persistent_connections in
squid.conf (i.e., TheICAPConfig.reuse_connections) is off. We were probably
not reusing before this change except shortly after reconfiguration and in
cases where an ICAP server does not respond with Connection: close when our
request has Connection: close.

18 years agoThe ICAP minimum for service_revival_delay and other OPTIONS retries is
rousskov [Tue, 22 May 2007 23:12:38 +0000 (23:12 +0000)] 
The ICAP minimum for service_revival_delay and other OPTIONS retries is
currntly 30 and not 60 seconds.

18 years agoBug #1966 fix: Use rounded String MemPool sizes in the hard-coded pool
rousskov [Tue, 22 May 2007 22:40:05 +0000 (22:40 +0000)] 
Bug #1966 fix: Use rounded String MemPool sizes in the hard-coded pool
config to avoid warnings that the configured pool size does not match the
actual size.

18 years agoBug #1967 fix: avoid new strncmp() that silently converts char* buffers into
rousskov [Tue, 22 May 2007 22:37:26 +0000 (22:37 +0000)] 
Bug #1967 fix: avoid new strncmp() that silently converts char* buffers into
Strings because String length is limited by 64KB and because it is an
expensive conversion.

All similar conversions should be removed, but that is bug #1970.

18 years agoRemoved hopefully unused SIZEOF_CHUNK macro in preparation for bug #1966 fix.
rousskov [Tue, 22 May 2007 09:44:34 +0000 (09:44 +0000)] 
Removed hopefully unused SIZEOF_CHUNK macro in preparation for bug #1966 fix.

18 years ago%URI external_acl_type tag for referencing the complete URI
hno [Tue, 22 May 2007 07:16:39 +0000 (07:16 +0000)] 
%URI external_acl_type tag for referencing the complete URI

18 years agoSqString.cc:198: error: cannot convert 'unsigned int*' to 'size_t*' for argument...
hno [Tue, 22 May 2007 07:15:55 +0000 (07:15 +0000)] 
SqString.cc:198: error: cannot convert 'unsigned int*' to 'size_t*' for argument '2' to 'void* memAllocString(size_t, size_t*)'

18 years agoLoad configure defines from src/cf_gen_defines
hno [Tue, 22 May 2007 05:31:37 +0000 (05:31 +0000)] 
Load configure defines from src/cf_gen_defines

18 years agoBootstrapped
hno [Mon, 21 May 2007 06:10:40 +0000 (06:10 +0000)] 
Bootstrapped

18 years agoFix 1-off bug left after strnlen bug removal.
amosjeffries [Sun, 20 May 2007 14:29:44 +0000 (14:29 +0000)] 
Fix 1-off bug left after strnlen bug removal.

Also:
 * Harden memory allocations to SqString.
 * Added more unit tests for strings.

18 years agoImplement FreeBSD ipfw based ip transparent interception using
adrian [Sun, 20 May 2007 10:22:43 +0000 (10:22 +0000)] 
Implement FreeBSD ipfw based ip transparent interception using
the getsockname() syscall. This returns the original destination
IP rather than the local server IP.

This behaviour existed in Squid-2 in the past; but was removed for some
reason.

18 years agoHaren SqStrign copy-constructor.
amosjeffries [Sun, 20 May 2007 10:22:06 +0000 (10:22 +0000)] 
Haren SqStrign copy-constructor.

18 years agoFix old bug: append sometimes does not fully copy a string if \0 exists in source
amosjeffries [Sat, 19 May 2007 20:51:14 +0000 (20:51 +0000)] 
Fix old bug: append sometimes does not fully copy a string if \0 exists in source

This bug exists in the basic implementation of strncat(dst,src,len) which will only copy EITHER to len or first \0 character, whichever comes first.
In squid this only occurs only if the string internal buffer is large enough to hold the existing plus the new strings.
The buffer re-allocation code used proper xmemcpy which does not have this limitation.
Have now set both append() branches to use the same copy mechanism.

18 years agoReally remove String.cc and String.cci
serassio [Sat, 19 May 2007 15:36:43 +0000 (15:36 +0000)] 
Really remove String.cc and String.cci

18 years agoConvert three old known points of buffer voilation to use protected code.
amosjeffries [Sat, 19 May 2007 12:49:12 +0000 (12:49 +0000)] 
Convert three old known points of buffer voilation to use protected code.

18 years agoMake string handle append(NULL) gracefully instead of core dumping.
amosjeffries [Sat, 19 May 2007 12:31:00 +0000 (12:31 +0000)] 
Make string handle append(NULL) gracefully instead of core dumping.

18 years agoFix: Squid does not compile with --enable-storeio=coss
amosjeffries [Sat, 19 May 2007 11:03:48 +0000 (11:03 +0000)] 
Fix: Squid does not compile with --enable-storeio=coss

18 years agoBootstrapped
hno [Sat, 19 May 2007 06:10:40 +0000 (06:10 +0000)] 
Bootstrapped

18 years agoFixed assertion related to TCP_RESET feature
wessels [Sat, 19 May 2007 00:30:41 +0000 (00:30 +0000)] 
Fixed assertion related to TCP_RESET feature

When 'deny_info TCP_RESET' was used (and triggered), Squid asserted
in connNoteUseOfBuffer().  Because we called comm_reset_close() in
clientReplyContext::sendMoreData(), the ClientHttpRequest was freed
before http->doCallouts() returned.  Thus we were accessing freed
memory and passing a bad value to connNoteUseOfBuffer().

I've moved the comm_reset_close() call from there to
clientProcessRequest().  I dont really like having it in
clientProcessRequest(), but it seems to be the only place that will
work.  At least this way we can avoid the destroying ClientHttpRequest
before clientProcessRequest() reaches 'finish'.

18 years agoAdded some debugging to ClientHttpRequest::doCallouts()
wessels [Sat, 19 May 2007 00:26:01 +0000 (00:26 +0000)] 
Added some debugging to ClientHttpRequest::doCallouts()

18 years agobootstrap after modifying Makefile.am please
wessels [Fri, 18 May 2007 23:20:45 +0000 (23:20 +0000)] 
bootstrap after modifying Makefile.am please

18 years agoAuthor: Tsantilos Christos <chtsanti@users.sourceforge.net>
amosjeffries [Fri, 18 May 2007 22:56:18 +0000 (22:56 +0000)] 
Author: Tsantilos Christos <chtsanti@users.sourceforge.net>
Fix compile errors slipped into ICAP on string API patch.

18 years agoSqString core apparently not automatically added to cvs by patch.
amosjeffries [Fri, 18 May 2007 12:44:35 +0000 (12:44 +0000)] 
SqString core apparently not automatically added to cvs by patch.

18 years agoAdd string API layer for better string handling.
amosjeffries [Fri, 18 May 2007 12:41:21 +0000 (12:41 +0000)] 
Add string API layer for better string handling.

For various reasons listed below we adopt the std::string API (but not the implementation) as the basis for string operations.

This patch reverts the SquidString.h file to provide only the main API and hooks for any string implementation behind the API.

For Release 3.0 the old String (now SqString) will remain the default string core.
That code has been kept in this patch with some minor modifications and bug fixes as listed below.

For Release 3.1 it is expected that a better string core will be developed.

Reasons for these changes:

The initial String implementation was incomplete and non-standard causing some risky operations at points in the code and duplicated some operations.
std::string provides a better known API for string handling which is widely use amongst other string implementations beyond std::string itself and this enables std::string or a derivative to be used in squid at some future date.
String as used previously is a defined alternative to std::string in some systems

This patch:
   - moves the old String class to SqString
   - provides the well-known type of 'string' for general use
   - provides implicit conversion from char* and char[] types
   - migrates custom functions to well-known API:
       buf()           -> c_str()
       clean()         -> clear()
   - removes redundant functions:
       buf(char*)      -> operator=(char*)
       initBuf(char*)  -> operator=(char*)
       reset(char*)    -> operator=(char*)
   - adds well-known API methods for safer string use:
       operator []
       empty()
       operator <<
       strcmp(), strcasecmp(), etc
   - May fix bug #1088 - segmentation fault after append(char*,int)
   - Fixes several unreported char* handling bugs in String/SqString

18 years agoAdd cfgman to Squid-3 snapshot generation
hno [Fri, 18 May 2007 07:26:43 +0000 (07:26 +0000)] 
Add cfgman to Squid-3 snapshot generation

18 years agoImported cf.data.pre -> HTML script from Squid-2.
hno [Fri, 18 May 2007 06:43:28 +0000 (06:43 +0000)] 
Imported cf.data.pre -> HTML script from Squid-2.

Imported changes:
2007/05/13 12:18:00 adrian +114 -0 Flesh out the beginnings of a cf.data.pre -> web interface.
2007/05/13 12:34:31 adrian +23 -2 Flesh out a little more for testing. I need to treat NAME entries with
2007/05/13 13:49:56 adrian +18 -2 Handle name aliases right.
2007/05/13 14:02:40 hno +6 -1 Add --out and --verbose command line options
2007/05/13 14:04:40 adrian +33 -32 Prepare for the actual page generating code.
2007/05/13 14:33:12 adrian +72 -19 Begin writing pages.
2007/05/13 14:43:50 adrian +8 -7 More HTML generation fixes.
2007/05/13 14:46:32 adrian +3 -2 Fix escaping.
2007/05/13 14:51:55 adrian +20 -3 Add in some more "full" template..
2007/05/13 14:58:40 adrian +15 -6 * try to show the aliases in the output; they're not yet working
2007/05/13 17:01:45 hno +133 -54 Get the ToC running, with raw section separators.
2007/05/13 21:12:56 hno +8 -0 Dump out the config manual while making snapshots
2007/05/13 21:13:14 hno +5 -3 Pick up the templates relative to the script location
2007/05/13 22:16:56 hno +108 -34 Hacked up a single page document mode
2007/05/13 22:28:49 hno +2 -0 Build single-page config manual as well as part of the snapshot process
2007/05/13 22:34:18 hno +2 -1 Compress the single-page config manual
2007/05/13 22:38:26 hno +1 -1 Correct format of single page configuration manual
2007/05/14 14:34:21 amosjeffries +102 -67 Fancy-Up the squid.conf documentation output.
2007/05/14 14:51:26 adrian +11 -2 Fix the templates to <pre>'ify suggested config.
2007/05/14 14:55:48 adrian +11 -1 Use the new format CSS now.
2007/05/14 15:16:31 adrian +16 -29 * remove the CSS stuff for now; eww.
2007/05/15 11:45:59 amosjeffries +9 -9 Fixed HTML structure somehow broken: <td> =>

18 years agoFix reply header log format %{header}<h. Was logging the request headers...
hno [Fri, 18 May 2007 01:59:41 +0000 (01:59 +0000)] 
Fix reply header log format %{header}<h. Was logging the request headers...

18 years agoAuthor: Emilio Casbas <ecasbas@unav.es>
hno [Fri, 18 May 2007 01:55:52 +0000 (01:55 +0000)] 
Author: Emilio Casbas <ecasbas@unav.es>
logformat %rp logging the URL-Path only (excluding hostname)

we need a "%ru" parameter like the httpd native log, that is showing;
/SI/images/servicios/normasdeuso/normas.swf instead of
http://X.X.X.60/SI/images/servicios/normasdeuso/normas.swf

I have done a small patch to have a new "rp" format code in order to
show only the urlpath in the access log.

18 years agoBootstrapped
hno [Mon, 14 May 2007 06:10:36 +0000 (06:10 +0000)] 
Bootstrapped

18 years agoMore magic to have the configuration manual published
hno [Mon, 14 May 2007 04:35:04 +0000 (04:35 +0000)] 
More magic to have the configuration manual published

18 years agoMove the delay pool parameters up before the MISC section (was in the middle of it..)
hno [Mon, 14 May 2007 03:27:50 +0000 (03:27 +0000)] 
Move the delay pool parameters up before the MISC section (was in the middle of it..)

18 years agoUpdate cfgman directory when making snapshots
hno [Mon, 14 May 2007 03:19:25 +0000 (03:19 +0000)] 
Update cfgman directory when making snapshots

18 years agoBootstrapped
hno [Sun, 13 May 2007 17:14:24 +0000 (17:14 +0000)] 
Bootstrapped