Guest User

Untitled

a guest
May 21st, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.05 KB | None | 0 0
  1. From ec928af08fd854e7cdf8f80e99766b1c1e479000 Mon Sep 17 00:00:00 2001
  2. From: Jocelyn De La Rosa <jocelyn.delarosa@smartjog.com>
  3. Date: Wed, 11 Jan 2012 18:09:20 +0100
  4. Subject: [PATCH 2/2] Prevent the use of busy object for backend conditional request
  5.  
  6. ---
  7. bin/varnishd/cache_hash.c |    3 ++-
  8.  1 files changed, 2 insertions(+), 1 deletions(-)
  9.  
  10. diff --git a/bin/varnishd/cache_hash.c b/bin/varnishd/cache_hash.c
  11. index ec1e894..1018e3e 100644
  12. --- a/bin/varnishd/cache_hash.c
  13. +++ b/bin/varnishd/cache_hash.c
  14. @@ -418,7 +418,8 @@ HSH_Lookup(struct sess *sp, struct objhead **poh)
  15.                   * - it has a Last-Modified and/or an ETag header.
  16.                   * If there are several, use the least expired one.
  17.                   */
  18. -               if (EXP_Keep(sp, o) >= sp->t_req
  19. +       if ((o->objcore->flags & OC_F_BUSY) == 0 &&
  20. +           EXP_Keep(sp, o) >= sp->t_req
  21.                     && (http_GetHdr(o->http, H_Last_Modified, &p)
  22.                         || http_GetHdr(o->http, H_ETag, &p)))
  23.                     if (stale_o == NULL ||
  24. --
  25. 1.7.2.5
Add Comment
Please, Sign In to add comment