wessels [Thu, 12 Jan 2006 05:40:39 +0000 (05:40 +0000)]
Management of {adapated,virgin}->data->header was becoming a problem.
One side might delete the header before the other side was done with it.
This patch moves deletion of ->data->header to MsgPipeData class so that
it goes away only when the MsgPipe goes away.
wessels [Thu, 12 Jan 2006 04:05:50 +0000 (04:05 +0000)]
Fixed a couple of bugs with ClientHttpRequest::doCallouts()
- The "no_cache" rule check was never happening because flags.cachable
was always 0 at that point. clientInterpretRequestHeaders() must
be called before doing the "no_cache" checks.
- ClientRequestContext::checkNoCache had an extra cbdataReference() call
which caused a cbdata leak.
- Converted the *_done flags to bool (instead of single-bit ints).
wessels [Tue, 10 Jan 2006 03:38:44 +0000 (03:38 +0000)]
Added some timeout debugging for ICAP transactions. Since ICAPXaction
doesn't know anything about its derived classes, also added a
HttpMsg::firstLineBuf() method to be used in the debugging of timeouts.
wessels [Fri, 23 Dec 2005 06:09:09 +0000 (06:09 +0000)]
Make Squid more robust in the event of unexpected ICAP server responses,
in particular RESPMOD responses that don't have a res-hdr section,
or a res-body.
wessels [Wed, 14 Dec 2005 00:32:34 +0000 (00:32 +0000)]
Support for Method header in ICAP OPTIONS respose.
Currently the 'icap_service' directive in squid.conf specifies both the
URI and method. The ICAP server also returns the method in the OPTIONS
response. This could create a conflict if the user specifies the wrong
method for a service.
For now we trust the squid.conf value and issue a warning if the OPTIONS
response reports a different method.
wessels [Tue, 13 Dec 2005 07:01:02 +0000 (07:01 +0000)]
I get compile errors on many tests because Squid defines its own assert()
macro. I find that it works better (ie compiles on FreeBSD) when
squid.h is the first include. Then the compiler won't define its own
assert macro if Squid gets there first.
wessels [Fri, 9 Dec 2005 08:02:24 +0000 (08:02 +0000)]
Compile-time bug introduced in recent changes related to
ACLCheckList::fastCheck(). The declaration for checklist was moved
to an inner block, but it was still used outside.
wessels [Fri, 9 Dec 2005 03:08:46 +0000 (03:08 +0000)]
Fixed a bug and some confusion with ACLChecklist::fastCheck()
- Added cbdataReferenceDone(accessList) call to fastCheck() in the
"if finished()" block.
- peerAllowedToUse() was setting accessList = NULL after calling
fastCheck(). Since neither fastCheck() nor peerAllowedToUse()
were calling cbdataReferenceDone(), the cbdata lock_count would
never decrease and eventually hit an assertion.
- In general, the fastCheck() callers do not need to call
cbdataReferenceDone, nor set accessList to NULL. The
cbdataReferenceDone() call should always happen in fastCheck().
If not, it will happen in the ACLCheckList destructor.
- It might be even better if fastCheck() called cbdataReference()
as well, to avoid this situation where locking happens in one
place and unlocking in another. This is future work, however.
wessels [Wed, 7 Dec 2005 06:03:34 +0000 (06:03 +0000)]
Turned pconn.cc into C++ classes. There are now separate persistent
connection pools for client-side, server-side, and now ICAP.
Accounting for persistent connection use still sucks because HTTP
(http.c) and ICAP state structures don't have any way to keep track
of how many times a given TCP connection was used. So we'll keep
abusing fd_entry[] for this purpose.
wessels [Tue, 6 Dec 2005 07:01:23 +0000 (07:01 +0000)]
Bugzilla #1457
My changes to the way that the client-side performed http_access,
redirector, and no_cache checks introduced a serious bug. Using
any proxy authentication would crash Squid.
One problem was that clientAccessCheckDone() should have returned
after generating the error page. Instead it tried to keep going,
as though access were allowed.
The other problem was due to a recently added assertion, which was
incorrect. Instead of asserting, the ClientRequestContext destructor
now releases its lock on the parent ClientHttpRequest if necessary.