Changeset 3129d0


Ignore:
Timestamp:
2009-12-14 14:03:08 (4 years ago)
Author:
Poul-Henning Kamp <phk@…>
Branches:
master, 3.0, 4.0, experimental-ims
Children:
fc6e4b
Parents:
ad0e17
git-author:
Poul-Henning Kamp <phk@…> (2009-12-14 14:03:08)
git-committer:
Poul-Henning Kamp <phk@…> (2009-12-14 14:03:08)
Message:

Execute vcl_hash{} right after vcl_recv{}, so that vcl_pipe{} and vcl_pass{}
can trust the result to exist.

git-svn-id:  http://www.varnish-cache.org/svn/trunk/varnish-cache@4392 d4fa192b-c00b-0410-8231-f00ffab90ce4

File:
1 edited

Legend:

Unmodified
Added
Removed
  • bin/varnishd/cache_center.c

    r6736b5 r3129d0  
    776776        CHECK_OBJ_NOTNULL(sp->vcl, VCL_CONF_MAGIC); 
    777777 
    778         if (sp->obj == NULL) { 
    779                 HSH_BeforeVclHash(sp); 
    780                 VCL_hash_method(sp); 
    781                 assert(sp->handling == VCL_RET_HASH); 
    782                 HSH_AfterVclHash(sp); 
    783         } 
    784778 
    785779        oc = HSH_Lookup(sp, &oh); 
     
    10161010cnt_recv(struct sess *sp) 
    10171011{ 
     1012        unsigned recv_handling; 
    10181013 
    10191014        CHECK_OBJ_NOTNULL(sp, SESS_MAGIC); 
     
    10311026 
    10321027        VCL_recv_method(sp); 
     1028        recv_handling = sp->handling; 
     1029 
    10331030        if (sp->restarts >= params->max_restarts) { 
    10341031                if (sp->err_code == 0) 
     
    10371034                return (0); 
    10381035        } 
     1036 
     1037        HSH_BeforeVclHash(sp); 
     1038        VCL_hash_method(sp); 
     1039        assert(sp->handling == VCL_RET_HASH); 
     1040        HSH_AfterVclHash(sp); 
    10391041 
    10401042        if (!strcmp(sp->http->hd[HTTP_HDR_REQ].b, "HEAD")) { 
     
    10451047 
    10461048        sp->sendbody = 0; 
    1047         switch(sp->handling) { 
     1049        switch(recv_handling) { 
    10481050        case VCL_RET_LOOKUP: 
    10491051                /* XXX: discard req body, if any */ 
Note: See TracChangeset for help on using the changeset viewer.