1. 16 Jun, 2020 2 commits
    • Nils Goroll's avatar
      centralize cleanup after fetch errors · 7b40b80d
      Nils Goroll authored
      imples the following changes:
      
      * VDI_Finish() is now always conditional on bo->director_state !=
        DIR_S_NULL, making it idempotent
      
      * introduces additional calls to VFP_Close() from startfetch and
        for the filter_list / VCL_StackVFP error in vbf_stp_fetch(),
        but VFP_Close() is idempotent.
      
      * adds VFP_Close() for VFP_Open() failure in vbf_stp_fetch() which
        I think is actually missing (for the case that some VFPs could
        get opened before the open failure)
      
      * calls VDI_Finish() earlier in vbf_stp_fetchend: I checked the
        code and can not see any issue with this.
      
      motivated by #3009
      
       Conflicts:
      	bin/varnishd/cache/cache_fetch.c
      7b40b80d
    • Nils Goroll's avatar
      make VFP_Close() idempotent · 2d666b03
      Nils Goroll authored
      required for #3009
      2d666b03
  2. 02 Jun, 2020 2 commits
  3. 27 May, 2020 1 commit
    • Dridi Boukelmoune's avatar
      Revert "Formally expose VSB_tofile in libvarnishapi" · fc774933
      Dridi Boukelmoune authored
      This reverts commit 79536662.
      
      It shouldn't be exposed in libvarnishapi the way it is in this change
      because it creates two diverging symbol versions (for systems with
      linker support for symbol versioning) without changing the soname,
      which of course we want to avoid in the first place in a stable branch.
      
      If the requirement comes up we can revisit this topic and ensure both
      binary stability and compatility (upgrade path).
      
      Refs #3268
      fc774933
  4. 25 May, 2020 3 commits
  5. 21 May, 2020 3 commits
  6. 20 May, 2020 10 commits
  7. 19 May, 2020 8 commits
  8. 12 May, 2020 7 commits
    • Martin Blix Grydeland's avatar
      Conditional fetch wait for streaming stale object · f11faf9e
      Martin Blix Grydeland authored
      Wait for the stale object to become fully fetched, so that we can catch
      fetch errors, before we unbusy the new object. This serves two
      purposes. First it helps with request coalescing, and stops long chains of
      IMS-updated short-TTL objects all streaming from a single slow body
      fetch. Second it makes sure that all the object attributes are complete
      when we copy them (this would be an issue for ie OA_GZIPBITS).
      
      This patch OBE's r01646.vtc, and slightly patches r01648.vtc to expect a
      503 instead of a 200 and a broken connection on the failing client.
      
      Fixes: #3089
      
      Conflicts:
          bin/varnishd/cache/cache_fetch.c
      f11faf9e
    • Martin Blix Grydeland's avatar
      Add a SLT_Notice VSL tag · 812ede3e
      Martin Blix Grydeland authored
      This VSL tag will be used for informational messages related to
      exceptional handling of requests.
      
      Conflicts:
          doc/sphinx/reference/vsl.rst
      812ede3e
    • Martin Blix Grydeland's avatar
      Log using SLT_Notice on condfetch streaming delay · ca507177
      Martin Blix Grydeland authored
      Log a notice message when delaying a conditional fetch and the stale
      template object is still streaming.
      
      Conflicts:
          bin/varnishd/cache/cache_fetch.c
          doc/sphinx/reference/vsl.rst
      ca507177
    • Martin Blix Grydeland's avatar
      Keep Age information on passes · bdbe85cf
      Martin Blix Grydeland authored
      When doing a pass, we would remove the Age header from the backend, and
      create a new one based on the time the fetch was initiated. This creates
      problems when calculating the time to live in downstream caches (browser
      cache or layered varnishes).
      
      With this patch, the RFC_2616_Ttl calculation routine is run also for
      passes, where the t_origin field of the object is adjusted for an incoming
      Age header. This makes sure that the Age header generated during delivery
      is correct. The rest of the Ttl calculation is skipped for passes,
      including the logging of SLT_TTL "RFC".
      
      Fixes: varnishcache/varnish-cache#3221
      bdbe85cf
    • Martin Blix Grydeland's avatar
      Use rfc2616_time() to parse Age headers · 3bc22d40
      Martin Blix Grydeland authored
      One time element function to rule and parse them all.
      3bc22d40
    • Martin Blix Grydeland's avatar
      Fixup private rfc2616_time function · cd7ec513
      Martin Blix Grydeland authored
      Change the return value to unsigned, to match with the expected data type
      where it is used.
      
      Handle very large numbers consistently. Currently it was converting from
      unsigned long to int, which would throw away the most significant
      bits. Now overly large integers will be capped at UINT_MAX.
      
      Implement the "allow and ignore decimal point" behaviour that the Age
      header parsing incorporated in rfc2616_time(). This way we will allow a
      decimal points also in max-age and stale-while-revalidate parsing of
      Cache-Control directives.
      cd7ec513
    • Dridi Boukelmoune's avatar
      Expose the master and worker PIDs via the CLI · f7854267
      Dridi Boukelmoune authored
      The change in u00011.vtc is the result of having two commands starting
      with "pi", breaking auto-completion. Fortunately "pin\t" still does the
      trick.
      f7854267
  9. 31 Jan, 2020 4 commits