]> git.ipfire.org Git - thirdparty/squid.git/log
thirdparty/squid.git
18 years agoFix a debugs typo in 32-bit-only fs code
hno [Fri, 17 Aug 2007 04:03:32 +0000 (04:03 +0000)] 
Fix a debugs typo in 32-bit-only fs code

18 years agoImprove deny_info documentation a bit on how to know which acl to use
hno [Thu, 16 Aug 2007 22:12:29 +0000 (22:12 +0000)] 
Improve deny_info documentation a bit on how to know which acl to use

18 years agoGlue to deal better with >2GB objects on 32-bit file platforms incapable of storing...
hno [Thu, 16 Aug 2007 19:46:20 +0000 (19:46 +0000)] 
Glue to deal better with >2GB objects on 32-bit file platforms incapable of storing them

18 years agoBug 2045 fix: Do not memset StoreEntry as it comes with a virtual table.
rousskov [Wed, 15 Aug 2007 21:07:41 +0000 (21:07 +0000)] 
Bug 2045 fix: Do not memset StoreEntry as it comes with a virtual table.

18 years agoMake haveControlChannel check for both cases of channel closure
amosjeffries [Wed, 15 Aug 2007 12:56:19 +0000 (12:56 +0000)] 
Make haveControlChannel check for both cases of channel closure
  - proper: via doneWitHServer()
  - improper: where only Control has died

18 years agoFix compile errors in mem_hdr_test
amosjeffries [Wed, 15 Aug 2007 10:08:30 +0000 (10:08 +0000)] 
Fix compile errors in mem_hdr_test

18 years agoFix compile error in Store unit-tests
amosjeffries [Wed, 15 Aug 2007 10:00:56 +0000 (10:00 +0000)] 
Fix compile error in Store unit-tests

18 years agoBootstrapped
hno [Wed, 15 Aug 2007 06:10:53 +0000 (06:10 +0000)] 
Bootstrapped

18 years agoMade storeKeyText definition profile match its declaration in protos.h
rousskov [Wed, 15 Aug 2007 04:30:35 +0000 (04:30 +0000)] 
Made storeKeyText definition profile match its declaration in protos.h
as reported by Amos Jeffries.

18 years agoFix build errors on HP Tru64 Unix and may be others
serassio [Wed, 15 Aug 2007 01:17:43 +0000 (01:17 +0000)] 
Fix build errors on HP Tru64 Unix and may be others

- xusleep.c: on Tru64 timeval is defined in sys/time.h
- move the definition of ISO C99 Standard printf() macros for 64 bit
  integers from squid.h to squid_types.h

18 years agoBootstrapped
serassio [Tue, 14 Aug 2007 23:07:38 +0000 (23:07 +0000)] 
Bootstrapped

18 years agoForward port from 2.6 of definition of ISO C99 Standard printf() macros for 64 bit...
serassio [Tue, 14 Aug 2007 23:05:47 +0000 (23:05 +0000)] 
Forward port from 2.6 of definition of ISO C99 Standard printf() macros for 64 bit integers

18 years agoWindows port: Added strtoll() needed by large object support.
serassio [Tue, 14 Aug 2007 22:12:40 +0000 (22:12 +0000)] 
Windows port: Added strtoll() needed by large object support.
Forward port of 2.6 code.

18 years agoFix typo in Makefile causing metric loads of link errors
amosjeffries [Tue, 14 Aug 2007 17:55:15 +0000 (17:55 +0000)] 
Fix typo in Makefile causing metric loads of link errors

18 years agoTypo leftover in large-obj from debug() > debugs() conversion
amosjeffries [Tue, 14 Aug 2007 17:06:18 +0000 (17:06 +0000)] 
Typo leftover in large-obj from debug() > debugs() conversion

18 years agoFix pointer use before NULL check. Coverity located.
amosjeffries [Tue, 14 Aug 2007 16:29:15 +0000 (16:29 +0000)] 
Fix pointer use before NULL check. Coverity located.

18 years agoFix build error on Visual Studio and gcc 3.3
serassio [Tue, 14 Aug 2007 16:09:23 +0000 (16:09 +0000)] 
Fix build error on Visual Studio and gcc 3.3

Patch by Alex Rousskov
See http://www.codecomments.com/archive292-2005-2-396222.html

18 years agoFix typo into squid3-largeobj
serassio [Tue, 14 Aug 2007 16:05:27 +0000 (16:05 +0000)] 
Fix typo into squid3-largeobj

18 years agoCloses Bugs 1953, 2047, 2051 - improved details for cache_peer options
amosjeffries [Tue, 14 Aug 2007 09:46:12 +0000 (09:46 +0000)] 
Closes Bugs 1953, 2047, 2051 - improved details for cache_peer options

18 years agobug 1952 - defaultsite documentation update.
amosjeffries [Tue, 14 Aug 2007 09:17:21 +0000 (09:17 +0000)] 
bug 1952 - defaultsite documentation update.

18 years agoFix some compile errors in unit-tests after large-obj import.
amosjeffries [Tue, 14 Aug 2007 08:14:44 +0000 (08:14 +0000)] 
Fix some compile errors in unit-tests after large-obj import.

18 years agoRemove invalid size_t cast
hno [Tue, 14 Aug 2007 00:35:24 +0000 (00:35 +0000)] 
Remove invalid size_t cast

18 years agoFix a few more broken or missing casts
hno [Tue, 14 Aug 2007 00:25:14 +0000 (00:25 +0000)] 
Fix a few more broken or missing casts

18 years agoAuthor: wessels & Christos Tsantilas
hno [Mon, 13 Aug 2007 23:20:50 +0000 (23:20 +0000)] 
Author: wessels & Christos Tsantilas
Import squid3-largeobj branch, fixing proxying and caching of >2GB objects

this patch converts all variables referring to object sizes & offsets to
64-bits, and gets rid of a lot of related casts.

The cache format is also updated to use 64-bit offsets, using a format
compatible with Squid-2.6.

18 years agoBug #2016 fix: Prevent BodyPipe async calls from getting seemingly
rousskov [Mon, 13 Aug 2007 22:48:20 +0000 (22:48 +0000)] 
Bug #2016 fix: Prevent BodyPipe async calls from getting seemingly
out of order and causing truncated responses, especially with ICAP.

When BodyPipe consumer is gone, all async calls for that consumer must not
reach the next consumer (if any). Similarly, we should not schedule async calls
when no consumer has been registered yet.

Otherwise, the calls may go out of order if _some_ calls are dropped due to
the ultimate destination being temporary NULL. The new code does not schedule
async calls until consumer is registered. The new code also keeps track of the
number of outstanding events and skips that number if the consumer leaves.

TODO:  when AscyncCall support is improved, should we just schedule calls
directly to consumer? It could be a much cleaner solution than counting
pending calls and skipping them when needed.

18 years agoAdded missing 'const' to haveControlChannel() definition
serassio [Mon, 13 Aug 2007 16:31:19 +0000 (16:31 +0000)] 
Added missing 'const' to haveControlChannel() definition

18 years agoAdd NULL pointer checks around bug 1560 checks in FTP.
amosjeffries [Mon, 13 Aug 2007 16:17:51 +0000 (16:17 +0000)] 
Add NULL pointer checks around bug 1560 checks in FTP.
Will also double as edge-case safety check for the entire function

18 years agoBug #1560: ftpSendPasv: getsockname(-1,..): (9) Bad file descriptor
serassio [Mon, 13 Aug 2007 16:00:38 +0000 (16:00 +0000)] 
Bug #1560: ftpSendPasv: getsockname(-1,..): (9) Bad file descriptor

Fix wrong definition of haveControlChannel() in previous commit

18 years agoRan indent.
serassio [Mon, 13 Aug 2007 14:56:36 +0000 (14:56 +0000)] 
Ran indent.

18 years agoAdded/updated .cvsignore files
serassio [Mon, 13 Aug 2007 14:28:28 +0000 (14:28 +0000)] 
Added/updated .cvsignore files

18 years agoBug 1560: ftpSendPasv: getsockname(-1,..): (9) Bad file descriptor
hno [Mon, 13 Aug 2007 08:39:06 +0000 (08:39 +0000)] 
Bug 1560: ftpSendPasv: getsockname(-1,..): (9) Bad file descriptor

missing returns could cause the ftp state machine to attempt to continue
after terminal failure.

18 years agoFix bug 1560 : Bad filedescriptor in ftpSend actions.
amosjeffries [Mon, 13 Aug 2007 05:57:28 +0000 (05:57 +0000)] 
Fix bug 1560 : Bad filedescriptor in ftpSend actions.

This was caused by some FTP operations failing and calling the ftpFail
properly, but then going on to call an ftpSend.
It may also occur when a ftpSend event is scheduled prior to the server
control channel dying or being closed.

This patch adds a function haveControlChannel(const char *caller_name)
which displays a debug notice at level 3 and returns false if the server
control channels are not available. This is now called by each Sending
operation before it begins.

18 years agoBootstrapped
hno [Sun, 12 Aug 2007 18:33:12 +0000 (18:33 +0000)] 
Bootstrapped

18 years agoWindows port: Allow build of eDirectory Digest helper using Visual Studio
serassio [Sun, 12 Aug 2007 14:40:01 +0000 (14:40 +0000)] 
Windows port: Allow build of eDirectory Digest helper using Visual Studio

18 years agoWindows port: Allow build of eDirectory Digest helper using Visual Studio, also impro...
serassio [Sun, 12 Aug 2007 02:45:40 +0000 (02:45 +0000)] 
Windows port: Allow build of eDirectory Digest helper using Visual Studio, also improved portability of LDAP Digest helper

18 years agoWindows port: Allow build on Windows of eDirectory Digest helper
serassio [Sun, 12 Aug 2007 00:51:41 +0000 (00:51 +0000)] 
Windows port: Allow build on Windows of eDirectory Digest helper

18 years agoWindows port: workaround for fatal build error using latest MinGW
serassio [Sat, 11 Aug 2007 19:27:27 +0000 (19:27 +0000)] 
Windows port: workaround for fatal build error using latest MinGW

Using the latest MinGW (gcc 3.4.5 + mingw-runtime 3.13) we cannot build with
-Wmissing-prototypes -Wmissing-declarations gcc options due to some heavy
tricks contained in own MinGW include files.

18 years agoFix build error when IP_TOS is not defined.
serassio [Sat, 11 Aug 2007 18:13:26 +0000 (18:13 +0000)] 
Fix build error when IP_TOS is not defined.

18 years agoMore RFCs relevant to Squid.
amosjeffries [Sat, 11 Aug 2007 09:30:35 +0000 (09:30 +0000)] 
More RFCs relevant to Squid.

18 years agoAdd the Squid code version to squidclient usage/help display.
amosjeffries [Fri, 10 Aug 2007 15:07:01 +0000 (15:07 +0000)] 
Add the Squid code version to squidclient usage/help display.
Very useful for testing.

18 years agoBug 2034 fix, v4: Separate handling of virgin server responses and ICAP-adapted
rousskov [Fri, 10 Aug 2007 05:30:52 +0000 (05:30 +0000)] 
Bug 2034 fix, v4: Separate handling of virgin server responses and ICAP-adapted
responses. Both can be active at the same time. Only one can become final and
get into the store entry.

Also, do not abort ICAP transactions when the virgin response ends prematurely.
Keep going because the ICAP initiator may still want to know the ICAP reaction
to the now-truncated virgin message.

This version passes a few basic tests, but may need more work and does need
polishing. For example, the common code should be factored out from
ICAPModXact::noteBodyProductionEnded and ICAPModXact::noteBodyProducerAborted.

18 years agoPolished WCCPv1 and v2 debug statements.
rousskov [Wed, 8 Aug 2007 20:47:41 +0000 (20:47 +0000)] 
Polished WCCPv1 and v2 debug statements.

18 years agoScripts for splitting and merging cf.data.pre files
hno [Wed, 8 Aug 2007 13:38:33 +0000 (13:38 +0000)] 
Scripts for splitting and merging cf.data.pre files

18 years agoImported verify_errorpages from Squid-2
hno [Wed, 8 Aug 2007 13:00:43 +0000 (13:00 +0000)] 
Imported verify_errorpages from Squid-2

18 years agoBug #2000 fix: Use StoreEntryStreamBuf::overflow() profile that matches
rousskov [Wed, 8 Aug 2007 02:02:51 +0000 (02:02 +0000)] 
Bug #2000 fix: Use StoreEntryStreamBuf::overflow() profile that matches
std::streambuf::overflow() profile for virtual method overriding to work.

Some GCC (or libstdc++) versions distinguished "char" used by our old
StoreEntryStreamBuf::overflow() from "int_type" used by their std::streambuf.
In such cases, overflow() overriding would not work and overflowed data would
not be appended to the store entry because the default overflow() does
nothing. This happened on Debian 4.1.2 lenny/sid (unstable) with
gcc version 4.1.3 20070629 (prerelease).

The fix works for a few recent GCC libstdc++ libraries I have tested with but
may cause Squid compilation, check, or runtime failures with libraries using
different std::streambuf::overflow() profiles. If that happens, ./configure
may need to detect the correct profile.  Alternatively, we can supply an
overflow() wrapper for multiple profiles in hope that one will match
std::streambuf::overflow (ick!).

Amos Jeffries <squid3@treenet.co.nz> reported and helped fix this bug.

18 years agoDo not assume that store stream cannot flush its contents into the store entry
rousskov [Wed, 8 Aug 2007 01:45:51 +0000 (01:45 +0000)] 
Do not assume that store stream cannot flush its contents into the store entry
unless we call the flush method. Depending on stream implementation, it is
possible that the stream will flush while we add data to it and before we
call flush().

Added more store stream output cases, including floating point numbers and
their formatting.

18 years agoBug #2000 pre-fix: Polish StoreEntryStream style.
rousskov [Wed, 8 Aug 2007 01:41:56 +0000 (01:41 +0000)] 
Bug #2000 pre-fix: Polish StoreEntryStream style.

This change should not have significant runtime effects. It makes
StoreEntryStream code a little easier to understand and brings it a little
closer to Squid3 coding style guidelines.

18 years agoFix, check for NULL pointer before state object cleanup and free.
amosjeffries [Sat, 4 Aug 2007 09:19:12 +0000 (09:19 +0000)] 
Fix, check for NULL pointer before state object cleanup and free.

Coverity checker picked up, StatefulRequest pointer having child fields
and CBDATA cleaned up then itself freed, even if it was NULL to start with.

18 years agoFix assert checking value too late. First use occurs in debugs.
amosjeffries [Sat, 4 Aug 2007 09:12:11 +0000 (09:12 +0000)] 
Fix assert checking value too late. First use occurs in debugs.

18 years agoFix typo, assert checking wrong value.
amosjeffries [Sat, 4 Aug 2007 09:08:36 +0000 (09:08 +0000)] 
Fix typo, assert checking wrong value.

18 years agoAdd pointer validation in helperStatefulHandleRead check for callback data.
amosjeffries [Fri, 3 Aug 2007 08:22:52 +0000 (08:22 +0000)] 
Add pointer validation in helperStatefulHandleRead check for callback data.

Coverity checker detected a NULL pointer dereference.
Existing logics to handle missing callback data were present, but the if()
tests were incomplete and unable to catch this case.

18 years agoAdd assert()s to validate state in Auth Digest
amosjeffries [Fri, 3 Aug 2007 08:16:59 +0000 (08:16 +0000)] 
Add assert()s to validate state in Auth Digest

Coverity checker picked up a number of cases where casting might (rarely)
cause a NULL pointer and a dereference occured afterwards.
This patch adds several assert statements to cause squid to abort at the
source of these errors rather than segfault later.
No code logic has been changed in any way.

18 years agoAdd assert()s to validate state in Basic Auth
amosjeffries [Fri, 3 Aug 2007 08:11:17 +0000 (08:11 +0000)] 
Add assert()s to validate state in Basic Auth

Coverity checker picked up a number of cases where casting might (rarely)
cause a NULL pointer and a dereference occured afterwards.
This patch adds several assert statements to cause squid to abort at the
source of these errors rather than segfault later.
No code logic has been changed in any way.

18 years agoAdd assert()s to validate state in Auth Negotiate
amosjeffries [Fri, 3 Aug 2007 08:07:34 +0000 (08:07 +0000)] 
Add assert()s to validate state in Auth Negotiate

Coverity checker picked up a number of cases where casting might (rarely)
cause a NULL pointer and a dereference occured afterwards.
This patch adds several assert statements to cause squid to abort at the
source of these errors rather than segfault later.
No code logic has been changed in any way.

18 years agoAdd assert()'s to check for NULL pointers in NTLM auth.
amosjeffries [Fri, 3 Aug 2007 07:57:30 +0000 (07:57 +0000)] 
Add assert()'s to check for NULL pointers in NTLM auth.

Coverity checker picked up a number of cases where casting might (rarely)
cause a NULL pointer and a dereference occured afterwards.
This patch adds several assert statements to cause squid to abort at the
source of these errors rather than segfault later.
No code logic has been changed in any way.

18 years agoFix another memory leak in basic auth MSNT session helper
amosjeffries [Fri, 3 Aug 2007 07:29:18 +0000 (07:29 +0000)] 
Fix another memory leak in basic auth MSNT session helper

Coverity detected.

18 years agoFix memory leaks in NTLM session helper RFCNB_Call(...)
amosjeffries [Fri, 3 Aug 2007 07:21:17 +0000 (07:21 +0000)] 
Fix memory leaks in NTLM session helper RFCNB_Call(...)

Coverity checker identified that the connect structures were not being
free'd on any of the error cases.

This patch adds several calls to free(con) to prevent the leaks.
It also adds a call to close any partial connections properly when
RFCNB_Session_Req fails. Previously it would leave the open TCP
connection hanging and return a NULL pointer.

18 years agoAdd new section to squid.conf: ERROR PAGE CUSTOMISATION
amosjeffries [Fri, 3 Aug 2007 04:58:15 +0000 (04:58 +0000)] 
Add new section to squid.conf: ERROR PAGE CUSTOMISATION

Moves existing error page rerlated options from MISC section to their own.
Options moved are:
  deny_info, error_directory, email_err_data, err_html_text

18 years agoFix wrong Squid version displayed for Squid3 configuration manual
amosjeffries [Fri, 3 Aug 2007 04:44:39 +0000 (04:44 +0000)] 
Fix wrong Squid version displayed for Squid3 configuration manual

version is hard-coded into the cfg-help script.
Was displaying Squid-2.HEAD as the version for the 3.0 build.

18 years agoPartial bug #2034 fix: Inform BodyPipe of the body size when known.
rousskov [Fri, 3 Aug 2007 01:32:22 +0000 (01:32 +0000)] 
Partial bug #2034 fix: Inform BodyPipe of the body size when known.

This fix helps the ICAP client to detect aborts and to announce the end of the
HTTP message to the ICAP server.

A bigger problem is that the HTTP side is using the adapted response to make
decisions about the origin server connection. That bug still needs to be
fixed.

18 years agoFix compile error introduced earlier 'unknown assert()'.
amosjeffries [Thu, 2 Aug 2007 17:35:07 +0000 (17:35 +0000)] 
Fix compile error introduced earlier 'unknown assert()'.

My bad this time. Sorry for the noise.

18 years agoImport fix for DNS-unpack reporting phantom errors, tested in IPv6 branch.
amosjeffries [Thu, 2 Aug 2007 17:26:39 +0000 (17:26 +0000)] 
Import fix for DNS-unpack reporting phantom errors, tested in IPv6 branch.

18 years agoAdd check for cast error in AuthBasicUserRequest::authenticate()
amosjeffries [Thu, 2 Aug 2007 10:18:14 +0000 (10:18 +0000)] 
Add check for cast error in AuthBasicUserRequest::authenticate()

18 years agoFix AuthBasicUserRequest::authenticated() assert checking the wrong value.
amosjeffries [Thu, 2 Aug 2007 10:15:26 +0000 (10:15 +0000)] 
Fix AuthBasicUserRequest::authenticated() assert checking the wrong value.

Was testing dynamic_cast input for NULL after the fact, should have been
 testing the output to include NULL from cast error as well as NULL input.

18 years agoFix invalid use of a pointer in src/auth/negotiate/auth_negotiate.cc.
amosjeffries [Thu, 2 Aug 2007 10:01:46 +0000 (10:01 +0000)] 
Fix invalid use of a pointer in src/auth/negotiate/auth_negotiate.cc.

Another auth function looking up the auth header and scanning it even if
 none was returned. This patch adds NULL tests before scanning.

18 years agoCoverity detected a code-path in helpers/ntlm_auth/SMB/ntlm_auth.c
amosjeffries [Thu, 2 Aug 2007 08:52:01 +0000 (08:52 +0000)] 
Coverity detected a code-path in helpers/ntlm_auth/SMB/ntlm_auth.c
 that dereferences NULL credentials.
Added an assert to check for the condition in real-use.
Possibly need to add a default case to the switch on line 360.

18 years agoFix memory leak in cachemgr detected by Coverity checker.
amosjeffries [Thu, 2 Aug 2007 08:24:55 +0000 (08:24 +0000)] 
Fix memory leak in cachemgr detected by Coverity checker.

18 years agoInitialize local of comm_remove_close_handler() properly to track error
amosjeffries [Thu, 2 Aug 2007 08:18:33 +0000 (08:18 +0000)] 
Initialize local of comm_remove_close_handler() properly to track error
(NULL) in all occurances.

18 years agoPrevent manipulation of a pointer if it is NULL in NTLM auth.
amosjeffries [Thu, 2 Aug 2007 08:08:25 +0000 (08:08 +0000)] 
Prevent manipulation of a pointer if it is NULL in NTLM auth.

Coverity checker detected.
AuthNTLMUserRequest::authenticate attempted to locate the auth header.
If there is no header resulting it would still attempt to scan its ptr
 down the header text. This prevents the scanning occuring on NULL.

18 years agoFix memory leaks in MSNT session helper RFCNB_Call(...)
amosjeffries [Thu, 2 Aug 2007 07:52:01 +0000 (07:52 +0000)] 
Fix memory leaks in MSNT session helper RFCNB_Call(...)

Coverity checker identified that the connect structures were not being
  free'd on any of the error cases.
This patch adds several calls to free(con) to prevent the leaks.
It also adds a call to close any partial connections properly when
  RFCNB_Session_Req fails. Previously it would leave the open TCP
  connection hanging and return a NULL pointer.

18 years agoFix possible NULL-pointer dereference in cacheDir display
amosjeffries [Thu, 2 Aug 2007 07:20:47 +0000 (07:20 +0000)] 
Fix possible NULL-pointer dereference in cacheDir display
Picked up by Coverity checker.

18 years agoFix fancy use of enum values causing memory over-read later in code.
amosjeffries [Thu, 2 Aug 2007 07:16:51 +0000 (07:16 +0000)] 
Fix fancy use of enum values causing memory over-read later in code.

18 years agoReplace VERY unsafe pointer operations (free THEN unlink) with safe code.
amosjeffries [Thu, 2 Aug 2007 05:30:03 +0000 (05:30 +0000)] 
Replace VERY unsafe pointer operations (free THEN unlink) with safe code.

18 years agoFix hanging pointer detected by Coverity checker.
amosjeffries [Thu, 2 Aug 2007 05:21:07 +0000 (05:21 +0000)] 
Fix hanging pointer detected by Coverity checker.

18 years agoAdd default destructor for AuthBasicConfig
amosjeffries [Thu, 2 Aug 2007 05:12:33 +0000 (05:12 +0000)] 
Add default destructor for AuthBasicConfig

Fixes memory leaks of AuthBasicConfig field.

18 years agoReduce application abort to using max level IFF level given is >max
amosjeffries [Thu, 2 Aug 2007 05:04:23 +0000 (05:04 +0000)] 
Reduce application abort to using max level IFF level given is >max

18 years agoAdditional array security in HttpHeader::clean()
amosjeffries [Thu, 2 Aug 2007 04:52:45 +0000 (04:52 +0000)] 
Additional array security in HttpHeader::clean()

Coverity pointed out a possible over-run on statHistCount[].
This enforces that the index enums are zero-based same as the array.

18 years agoTypo picked up by Coverity checker.
amosjeffries [Thu, 2 Aug 2007 04:36:02 +0000 (04:36 +0000)] 
Typo picked up by Coverity checker.

Would lead to memory overruns when built with older compilers.
New compilers can retrieve type properly in most cases.

18 years agoPolished ICAP debugging so that users can see fatal ICAP service failures
rousskov [Thu, 2 Aug 2007 02:51:06 +0000 (02:51 +0000)] 
Polished ICAP debugging so that users can see fatal ICAP service failures
(and not much more) at debug level 2. This may help identify why a service
is suspended.

18 years agoAuthor: Henrik Nordstrom <henrik@henriknordstrom.net>
rousskov [Wed, 1 Aug 2007 10:36:47 +0000 (10:36 +0000)] 
Author: Henrik Nordstrom <henrik@henriknordstrom.net>
Bug #1872: Date parsing error causing HTTP objects to get unexpectedly cached
and fresh ICAP OPTIONS rejected.

Applied Henrik's patch from Squid2 patchset #11161. The bug was affecting ICAP
Options TTLs, marking some ICAP services with soon-to-expire options as being
down. Original patch text is below.

An unexpected and undesired sideeffect of the earlier change to accept dates
far in the future was that the date calculations suddenly got daylight savings
sensitive due to mktime() automatically adjusting the supplied date. This has the
unfortunate effect that if Squid is running in a timezone with daylight savings
things may get cached longer than they should.

18 years agoBug 2024 fix: Do not optimize StoreEntry::write call away for zero-size
rousskov [Wed, 1 Aug 2007 10:18:08 +0000 (10:18 +0000)] 
Bug 2024 fix: Do not optimize StoreEntry::write call away for zero-size
data because StoreEntry::write invokes client-side handlers for response
headers, even if there is no body data to write.

18 years agoBug #2029 fix: When ICAP produces a response before the entire
rousskov [Wed, 1 Aug 2007 10:16:00 +0000 (10:16 +0000)] 
Bug #2029 fix: When ICAP produces a response before the entire
virgin response is read, do not abort the transaction.

The code needed to be re-arranged to make sure that virgin response body
is not appended to the store when adapted body is written there. The
changes resulted in a cleaner code, where virgin data never enters the
store if ICAP adaptation was started, and adapted data is always
written to the store. More polishing work is needed here.

18 years agoBootstrapped
hno [Tue, 31 Jul 2007 06:10:14 +0000 (06:10 +0000)] 
Bootstrapped

18 years agoCosmetic fix of the eventloop dump when there is "now" events in the queue,
hno [Mon, 30 Jul 2007 21:05:42 +0000 (21:05 +0000)] 
Cosmetic fix of the eventloop dump when there is "now" events in the queue,
making the test case work again.

18 years agoSome debugging logs seem to indicate that asynchronous calls are fired
rousskov [Fri, 27 Jul 2007 10:40:51 +0000 (10:40 +0000)] 
Some debugging logs seem to indicate that asynchronous calls are fired
out of order. The code cannot (and probably should not) handle that.

This out-of-order calls may be happening because async calls are implemented
using time-based events, and events are using wall clock (current_dtime)
when looking for the right place in the event queue. The wall clock may
go backwards, placing a later call earlier in the event queue.

This change forces async call-looking events to use absolute timestamp of
zero, so nothing (including a later async call) can get in front of them.

18 years agoAdded an assertion to avoid segmentation faults in clientSocketRecipient.
rousskov [Fri, 27 Jul 2007 03:17:01 +0000 (03:17 +0000)] 
Added an assertion to avoid segmentation faults in clientSocketRecipient.
I can trigger this assertion, but have not investigated the bug yet.

18 years agoRemember the ICAP OPTIONS fetching transaction so that we can clear/destroy
rousskov [Tue, 24 Jul 2007 22:43:33 +0000 (22:43 +0000)] 
Remember the ICAP OPTIONS fetching transaction so that we can clear/destroy
it when it is done, to avoid ICAPOptXactLauncher leak. Use the transaction
pointer instead of the boolean 'waiting' flag.

18 years agoThe _queued_write objects dequeued for writing were not deleted,
rousskov [Tue, 24 Jul 2007 22:15:32 +0000 (22:15 +0000)] 
The _queued_write objects dequeued for writing were not deleted,
causing a memory leak when 'ufs' filesystem was in use.

18 years agoFixed source code indentation.
rousskov [Tue, 24 Jul 2007 04:30:20 +0000 (04:30 +0000)] 
Fixed source code indentation.

18 years agoAuthor: Christos Tsantilas <chtsanti@users.sourceforge.net>
rousskov [Tue, 24 Jul 2007 01:58:46 +0000 (01:58 +0000)] 
Author: Christos Tsantilas <chtsanti@users.sourceforge.net>
Bug #1971 fix, part 2, take B, v4: Polish HttpStateData::readReply() layout
to weed out bugs.

Moved processReplyHeader post-processing from readReply into newly added
continueAfterParsingHeader() method. Either deleted unreachable code in
readReply or re-arranged it to become reachable in continueAfterParsingHeader.

Start ICAP ACL checks only after the response header has been successfully
processed. The old code would start ICAP ACL checks for transactions that
would be aborted immediately after the check is scheduled.

Set eof when we read zero bytes. Doing so as a stand-alone step and referring
to 'eof' member from there on makes readReply code a little more clear.

Set reply member when HTTP header parser fails in processReplyHeader() so that
the caller has more information about the parsing error.

persistentConnStatus() now returns COMPLETE_NONPERSISTENT_MSG if we reach eof.
The old code would just call serverComplete() in readReply() instead, making
it a yet another special case there.

We are not done with ICAP if an ICAP ACL check is pending. This change
affects FTP as well and allows us to process more errors with ICAP.

Commented that persistentConnStatus() may be called for ICAP-adapted responses
that do not have a notion of a persistent connection. Why does this work?

These changes were inspired by Christos Tsantilas comments and patches but
the new bugs are mine.

18 years agoReversed bug #2011 fix because it may slow down ICAP, BodyPipe, and other code
rousskov [Tue, 24 Jul 2007 01:55:21 +0000 (01:55 +0000)] 
Reversed bug #2011 fix because it may slow down ICAP, BodyPipe, and other code
using zero-delay events to implement "asynchronous" calls.

The code should probably be rewritten (a) to avoid any waiting/blocking when
there are ready events and (b) to allow waiting longer when there are no ready
events.

18 years agoRemoved the "reply" parameter and "this->reply = reply" assignment from
rousskov [Mon, 23 Jul 2007 22:55:31 +0000 (22:55 +0000)] 
Removed the "reply" parameter and "this->reply = reply" assignment from
Server::setReply() because the actual parameter was always "reply". The
code setReply() replaced did not have the assignment either.

Eventually, the setReply() method needs to be renamed because the reply is
already set when we call it.

18 years agoBug #2006: Shield FwdState::abort from FwdState going away under it's feets by a...
hno [Sat, 21 Jul 2007 22:32:03 +0000 (22:32 +0000)] 
Bug #2006: Shield FwdState::abort from FwdState going away under it's feets by a comm close handler

18 years agoBootstrapped
hno [Fri, 20 Jul 2007 06:10:42 +0000 (06:10 +0000)] 
Bootstrapped

18 years agoBug #2011: Adjust event loop timeouts to default to 1 second
hno [Thu, 19 Jul 2007 19:33:18 +0000 (19:33 +0000)] 
Bug #2011: Adjust event loop timeouts to default to 1 second

18 years agoBug #1921: ftp.cc(3309) ICAP cannot keep up with FTP; lost 1448/1448 bytes.
hno [Thu, 19 Jul 2007 18:07:41 +0000 (18:07 +0000)] 
Bug #1921: ftp.cc(3309) ICAP cannot keep up with FTP; lost 1448/1448 bytes.

This patch adds a little buffering before the BodyPipe, allowing more
data to be temporarily stuffed than what fits in the pipe. Needed for
FTP directory listings and other sources with no byte-exact flow control.

The patch also moves most ICAP dependencies from the protocol implementations
to the shared ServerStateData parent, allowing them all to share logics.

18 years agoVarious cleanups to make GCC happy
hno [Thu, 19 Jul 2007 09:36:04 +0000 (09:36 +0000)] 
Various cleanups to make GCC happy

18 years agoand make getpwnam helper use ANSI-C prototypes
hno [Thu, 19 Jul 2007 09:06:12 +0000 (09:06 +0000)] 
and make getpwnam helper use ANSI-C prototypes

18 years agoMake local functions static to make gcc a little happier
hno [Thu, 19 Jul 2007 09:04:47 +0000 (09:04 +0000)] 
Make local functions static to make gcc a little happier

18 years agoFix "make clean" in helpers/basic_auth/DB/
hno [Thu, 19 Jul 2007 08:54:21 +0000 (08:54 +0000)] 
Fix "make clean" in helpers/basic_auth/DB/