Ignore:
Timestamp:
2011-01-27 10:19:42 (3 years ago)
Author:
Poul-Henning Kamp <phk@…>
Branches:
master, 3.0, 4.0, experimental-ims
Children:
81b3dd
Parents:
62e111b
git-author:
Poul-Henning Kamp <phk@…> (2011-01-27 10:19:42)
git-committer:
Poul-Henning Kamp <phk@…> (2011-01-27 10:19:42)
Message:

Further clarify fetch() processing.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • bin/varnishd/cache_center.c

    r62e111b reb9eca  
    469469        char *b; 
    470470        unsigned l, nhttp; 
    471         int varyl = 0; 
     471        int varyl = 0, pass; 
    472472        struct vsb *vary = NULL; 
    473473 
     
    563563                /* This is a pass from vcl_recv */ 
    564564                sp->wrk->cacheable = 0; 
    565         } else if (!sp->wrk->cacheable && sp->objcore != NULL) { 
    566                 AZ(HSH_Deref(sp->wrk, sp->objcore, NULL)); 
    567                 sp->objcore = NULL; 
    568         } 
    569  
    570         /* 
    571          * At this point we are either committed to flesh out the busy 
    572          * object we have in the hash or we have let go of it, if we ever 
    573          * had one. 
    574          */ 
    575  
    576         AZ(sp->wrk->vfp); 
     565                pass = 1; 
     566        } else if (sp->handling == VCL_RET_PASS || !sp->wrk->cacheable) { 
     567                /* pass from vcl_fetch{} -> hit-for-pass */ 
     568                pass = 1; 
     569        } else { 
     570                /* regular object */ 
     571                pass = 0; 
     572        } 
    577573 
    578574        /* 
     
    589585         */ 
    590586 
     587        AZ(sp->wrk->vfp); 
     588 
    591589        /* We do nothing unless the param is set */ 
    592590        if (!params->http_gzip_support) 
     
    633631 
    634632        l = http_EstimateWS(sp->wrk->beresp, 
    635             sp->pass ? HTTPH_R_PASS : HTTPH_A_INS, &nhttp); 
     633            pass ? HTTPH_R_PASS : HTTPH_A_INS, &nhttp); 
    636634 
    637635        /* Create Vary instructions */ 
     
    678676        WS_Assert(sp->obj->ws_o); 
    679677 
    680  
    681678        /* Filter into object */ 
    682679        hp = sp->wrk->beresp; 
     
    686683        http_CopyResp(hp2, hp); 
    687684        http_FilterFields(sp->wrk, sp->fd, hp2, hp, 
    688             sp->pass ? HTTPH_R_PASS : HTTPH_A_INS); 
     685            pass ? HTTPH_R_PASS : HTTPH_A_INS); 
    689686        http_CopyHome(sp->wrk, sp->fd, hp2); 
    690687 
     
    10511048        sp->sendbody = 1; 
    10521049        sp->step = STP_FETCH; 
    1053         sp->pass = 1; 
    10541050        return (0); 
    10551051} 
     
    11391135 
    11401136        sp->disable_esi = 0; 
    1141         sp->pass = 0; 
    11421137        sp->hash_always_miss = 0; 
    11431138        sp->hash_ignore_busy = 0; 
Note: See TracChangeset for help on using the changeset viewer.