1. 02 Dec, 2020 1 commit
  2. 30 Nov, 2020 4 commits
    • Nils Goroll's avatar
      silence flexelint on a condition which is known to be always false · e1b0a930
      Nils Goroll authored
      ... unless we f*up, which is the sole purpose of its existence
      e1b0a930
    • Nils Goroll's avatar
      stupid glitch · 462c0f2e
      Nils Goroll authored
      462c0f2e
    • Nils Goroll's avatar
      Utility function for more thorough VRT_CTX sanity checking · f825ef93
      Nils Goroll authored
      this needs to live within the exclusive circle of cache_vcl.h includers, so I
      went for cache_vrt_vcl.c just because of the name.
      f825ef93
    • Nils Goroll's avatar
      Methods for vmod_priv · 681c1199
      Nils Goroll authored
      This is the refactoring we agreed on to enable an alternative
      implementation of #3454. This PR does not yet introduce the copy
      callback needed to add the functionality suggested in #3454.
      
      We replace the .free pointer of struct vmod_priv with a pointer to a
      methods struct with callbacks. As of this commit, it only contains
      the .free callback renamed to .fini. The purpose of the refactoring is
      to allow addition of more callbacks later.
      
      The new struct vmod_priv_methods also contains a .type member pointing
      to a string to contain an arbitrary description of the type of data any
      priv holds which uses these methods.
      
      Implementation:
      
      relevant changes are in cache_vrt_priv.c and vrt.h, other changes are to
      the documentation and bundled vmods.
      
      The implementation is a simple refactoring for indirection of the call
      to the .fini callback via the methods structure.
      681c1199
  3. 27 Nov, 2020 2 commits
  4. 25 Nov, 2020 4 commits
  5. 24 Nov, 2020 5 commits
  6. 23 Nov, 2020 6 commits
    • Nils Goroll's avatar
      clarify first byte timeout FetchError message · 7a12b1c3
      Nils Goroll authored
      For a first byte timeout on a new connection, we emit
      
      	FetchError: first byte timeout
      
      For a first byte timeout being reached on a recycled connection, we
      should keep the error message similar.
      
      Ref eecd409d
      7a12b1c3
    • Nils Goroll's avatar
      silence flexelint · b6d06245
      Nils Goroll authored
      Dridi, phk and myself all stared at this piece of code and see no issue:
      res has been calloc'ed l elements. For any res[i] and res[j] access, i
      and j are less than l, respectively. l is not increased after the
      initial count of elements in s.
      
      Ref 9947307d
      
      Flexelint error:
      
                                 _
      		res[i] = vp;
      mgt/mgt_vcl.c  749  Warning 661: Possible access of out-of-bounds
          pointer (1 beyond end of data) by operator '[' [Reference:
          file mgt/mgt_vcl.c: lines 719, 722, 727, 744, 747, 749]
      mgt/mgt_vcl.c  719  Info 831: Reference cited in prior message
      mgt/mgt_vcl.c  722  Info 831: Reference cited in prior message
      mgt/mgt_vcl.c  727  Info 831: Reference cited in prior message
      mgt/mgt_vcl.c  744  Info 831: Reference cited in prior message
      mgt/mgt_vcl.c  747  Info 831: Reference cited in prior message
      mgt/mgt_vcl.c  749  Info 831: Reference cited in prior message
      b6d06245
    • Dridi Boukelmoune's avatar
      cli: New vcl.deps [-j] command · f7aeba94
      Dridi Boukelmoune authored
      The plain text output is a suitable input for tsort(1), initially
      meant to find the correct discard order, I realized that it would
      be more reliable to let vcl.discard figure that one out.
      
      It wouldn't really work in my initial scenario:
      
          varnishadm vcl.deps |
          <filter some VCLs out> |
          tsort |
          xargs -n 1 varnishadm vcl.discard
      
      The filtering part only worked for direct dependencies but we can
      have two levels with return(vcl).
      
      I'm keeping this command only for setup analysis, the output can
      easily be turned into a graphviz dot file for example.
      f7aeba94
    • Dridi Boukelmoune's avatar
      cli: Teach vcl.discard to operate on multiple VCLs · 9947307d
      Dridi Boukelmoune authored
      To put it simply, let's take a simple CLI script:
      
          vcl.discard vcl1
          vcl.discard vcl2
          [...]
          vcl.discard vclX
      
      We can now achieve the same with a single command:
      
          vcl.discard vcl1 vcl2 ... vclX
      
      But there is slighty more to it, because vcl.discard operates on both
      VCLs and VCL labels, and dependencies can exist between both. So in
      addition to operate on multiple VCLs it also does so in the correct
      order.
      9947307d
    • Dridi Boukelmoune's avatar
      cli: Always mention VCL names in vcl.discard errors · 66db3c5e
      Dridi Boukelmoune authored
      This is going to be useful once vcl.discard can take multiple VCL names
      at once.
      66db3c5e
    • Dridi Boukelmoune's avatar
      cli: Split vcl.discard in two · 1c7294c9
      Dridi Boukelmoune authored
      The first operation consists in checking the ability to discard the
      requested VCL, the second part effectively performs the VCL deletion.
      1c7294c9
  7. 20 Nov, 2020 3 commits
  8. 18 Nov, 2020 13 commits
  9. 16 Nov, 2020 2 commits