Squid ICAP client possibly bugs and corrections......

2004-06-28 Thread Christos Tsantilas
Hi squid developers,
I want to report 1-2 small bugs and corrections at squid
icap client interface that are relative with keeped alive
requests to an icap server.
I am using  a (corrected) squid-icap named squid-2.5.STABLE5-icap-6-pre1.
but as I seen this bugs exists and in  squid-icap-2.5-200405131634
icap enabled squid.
1)when icapReadReply3  called after a response request with null-body
(e.g when the content of a web page not changed ...)
then enters the block "if (EBIT_TEST(i..., ENTRY_ABORTED)){".
Squid icap-client has request keeped alive connection and
now the connection not closed. This behaviour  can  cause 
a lot of open connection to an icap server until connections expired.

An addition of  comm_close(fd) in this block can solve the problem.
Moreover if think there is no need for the connection to be closed
in this phase and can keeped alive. So the entire  block :
   if (EBIT_TEST(i..., ENTRY_ABORTED)){
...
   }
in function icapReadReply3 can removed.
2) In file icap_reqmod.c in function icapSendReqMod
when compute the position of entities for
"Encapsulated:" header squid does not include crlf (2 bytes) in 
possition computation.
 This fields are the possition in the header not the size of the header.

 I propose to
 a) add a "crlf" at the end of "icap->request->header"
before Encapsulated header computation
   eg "memBufAppend(&mb_hdr, crlf, 2);" at line 613
and
 b) remove the "memBufAppend(&mb, crlf, 2);" line 637 that adds the 
crlf at the end of
entire buffer.

Regards,
Christos


extended access logging patch

2004-06-28 Thread Michal Matusiak
Hello
This patch implements extended access logging.
You can use "accloggran" option to tell squid when a log record has to
be put into access.log. Default value is 1024 KB (1MB) which means that
after each 1024 kB of data downloaded by client you get one entry. Also
a access.log records has been slightly modified, instead IP you get
IP:port where port is client's agent port.
Patch applies to squid2.5-stable5, to enable this feature use
--enable-extacclog with configure. Before configure you have to run 
bootstrap.sh.

I'm waiting for feedback.
Regards
Michal Matusiak




extacclog-patch.diff.bz2
Description: application/compressed


how to copy body to the new StoreEntry?

2004-06-28 Thread Michal Matusiak
Hi
In our vary support we need to update headers of variants.
But variants are already on the disk and we don't know the way to do
this. The workaround is to create new entry fill it with new header and
body and replace variant with this new entry. Copying of updated header
is easy, we do this with storeEntryReplaceObject(). We don't know how to
copy body of variant to new entry.
Any help will be welcomed.
Regards
Michal Matusiak