r1277 - in trunk/varnish-cache: bin/varnishd include lib/libvcl
Dag-Erling Smørgrav
des at linpro.no
Wed Mar 28 10:27:37 CEST 2007
phk at projects.linpro.no writes:
> Pipe and Pass calls vcl_pipe{} and vcl_pass{} respectively, before
> contacting the backend. I havn't quite decided if they should
> operate on the request header from the client or the one to the
> backend, or both.
I'm working on the documentation, and have a couple of questions
regarding these.
1) VCL_pipe_method() is never called
2) The return value from VCL_pass_method() is ignored unless it is
VCL_RET_ERROR:
> -static int
> -cnt_passbody(struct sess *sp)
> -{
> -
> - sp->wrk->acct.pass++;
> - AN(sp->vbc);
> - PassBody(sp);
> - AZ(sp->vbc);
> - sp->step = STP_DONE;
> + VCL_pass_method(sp);
> + if (sp->handling == VCL_RET_ERROR) {
> + sp->step = STP_ERROR;
> + return (0);
> + }
> + HSH_Prealloc(sp);
> + sp->obj = sp->wrk->nobj;
> + sp->wrk->nobj = NULL;
> + sp->obj->busy = 1;
> + sp->step = STP_FETCH;
> return (0);
> }
3) The default implementations of vcl_pipe() and vcl_pass() end with
"pipe" and "pass", respectively, which one would expect to result
in infinite recursion (though we know from 2) that it doesn't)
> + "sub default_vcl_pipe {\n"
> + " pipe;\n"
> + "}\n"
> + "\n"
> + "sub default_vcl_pass {\n"
> + " pass;\n"
> + "}\n"
4) What is the "hash" keyword supposed to mean?
> + "sub default_vcl_hash {\n"
> + " hash;\n"
> + "}\n"
DES
--
Dag-Erling Smørgrav
Senior Software Developer
Linpro AS - www.linpro.no
More information about the varnish-commit
mailing list