Re: TE question

From: Robert Collins <robert.collins@dont-contact.us>
Date: Tue, 23 Jan 2001 21:34:09 +1100

----- Original Message -----
From: "Joe Cooper" <joe@swelltech.com>
To: "Robert Collins" <robert.collins@itdomain.com.au>; "Squid Dev" <squid-dev@squid-cache.org>
Sent: Tuesday, January 23, 2001 4:54 PM
Subject: TE question

> Hi Robert,
>
> I was hoping you'd take a few moments to clarify something for me in the
> TE code (rbcollins_filters branch from CVS fetched this afternoon).
> Forgive me if the question is a litte thick headed, as I'm learning as I go.
>
> This bit in client_side.c:httpRequestFree has me puzzled:
>
> while (http->te_translations) {
> TE_list *tf = http->te_translations;
> http->te_translations = http->te_translations->next;
> xfree (tf);
> }

each request has a list of transfer-encodings to apply. They are request specific (it doesn't make sense to gzip tar.gz files for
instance). That code loops through the list and frees the memory taken up by the list.

> This is just running through a do nothing loop, incrementing through all
> of the http-> te_translations in the list, right? If I'm missing
> something and this is doing something, please tell me what's happening,
> as I can't see it. (Have I mentioned that I'm learning as I go? ;-)

It's freeing memory used - see above.

> I'm guessing this just hasn't really been written yet, since you've just
> begun work on the client_side.

That's original code by Patrick McManus. Don't blame me:-]. Actually the code there is correct. I'll be moving it to
transfer-encoding.c at some point though. (I'm grouping all the functions there so I can update client to handle te as well.)

> I'm digging back in now, but I wanted to ask when I ran across it so I
> wouldn't forget about it. I'm sure I'll be back with more questions as
> I get deeper into client_side and as I tackle http.

Sure. Go for it.

> Anything I should be aware of, before actually trying to work within
> your filters framework?

Yup. The client_side hooks that you need are not committed yet. I've had a very busy week and a half, and my best intentions counted
for naught regarding getting that usable :-]

On the plus side I've got it nearly ready to go, I just need to finish getting the bare minimum in place (you need a terminating
filter that gets the data back into the main squid request/response path, and client_side currently has two distinct functions for
writing to the client socket. I'm trying to keep the ability to use direct writes without membuffers, but it adds a little
complexity).

I'll mail up here when I've committed enough of a filter framework for you to roll your own easily.

Rob
Received on Tue Jan 23 2001 - 03:34:05 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:13:25 MST