OK, data flow walk through:
data hits server, in n chunks of arbitrary size (<SOCK_SIZE)
http.c send the chunks to the store, in m chunks of arbitrary size, which may be greater than SOCK_SIZE (ungzipping for example)
the store then calls client_side.c for each chunk
on chunk m, client_side should set a flag FILTER_EOF (as discussed between moez and I recently) to indicate end of the body.
Now, the store doesn't know when chunk m is reached until after the fact (storeComplete gets called), so client_side *cannot* set
that flag.
What about checking content-length you say? Well transfer encoding for one, and potentially other filters, will invalidate that.
What about catching it in clientWriteComplete. Well yes I can do that and it does work, but it pushes everything through another
loop of code for little reason. So I'm look for ways of improving it.
----- Original Message -----
From: "Adrian Chadd" <adrian@creative.net.au>
To: "Robert Collins" <robert.collins@itdomain.com.au>
Cc: <squid-dev@squid-cache.org>
Sent: Friday, February 02, 2001 7:21 PM
Subject: Re: storeAppend
> On Fri, Feb 02, 2001, Robert Collins wrote:
> > Adrian - I want to be able to call storeAppend with data, and signal to the store that this is the last packet it will recieve.
This
> > is to solve a race condition, where the write goes through the store, to each client, and then after the write is complete, the
EOF
> > is signalled, too late for the client_side routines to flush any buffers as part of their normal operation...
>
> Can you explain this a little more? Why is calling storeComplete()
> or storeAbort() not enough?
>
>
>
> Adrian
>
> --
> Adrian Chadd "Sex Change: a simple job of outside
> <adrian@creative.net.au> to inside plumbing."
> - Some random movie
>
Received on Fri Feb 02 2001 - 06:00:22 MST
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:13:28 MST