On Nov 5, 2008, at 11:37 AM, Poul-Henning Kamp wrote:

In message <[EMAIL PROTECTED]>, Tim Kientzle wri
tes:

* I'll need code to actually read and store the POST body in memory
  (including updates to the PASS handler and other places to
  use the in-memory data when it's available)

We sort of have this as point 15 on our shoppinglist:

        (http://varnish.projects.linpro.no/wiki/PostTwoShoppingList)

The first part looks trickier.  Has anyone here tried anything
similar? Any pointers (particular source files I should pay attention
to or memory-management issues I should keep in mind)?

It's pretty straightforward really:  allocate an (non-hashed)
object, add storage to it and store the contents there.

You can see pretty much all the code you need in cache_fetch.c and
for it to go into the tree as a patch, I would insist that the
code gets generalized so we use the same code in both directions,
rather than have two copies.

The attached patch is a first step in that direction.  It generalizes
the existing fetch_straight and fetch_chunked so that the same
code is used in both directions.  This is mostly just code
refactoring, although it does add support for chunked upload.

"make check" still succeeds after this change; I haven't tried
to add any new tests for this yet.

My biggest concern is that I might have changed some of the return
values here.  I'm not yet clear on what return conventions varnish
is using internally.

Attachment: varnish2.0.1-generalize-fetch.patch
Description: Binary data


_______________________________________________
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc

Reply via email to