1. 09 Dec, 2019 4 commits
    • Dridi Boukelmoune's avatar
      Use the varnishstat bindings table for key presses · 8106bbe1
      Dridi Boukelmoune authored
      This has the unfortunate effect of splitting a single switch statement
      into two, however the second one being based on an enum should yield a
      warning if in the future a new binding is added but not handled.
      
      For example a binding involving the <h> key?
      8106bbe1
    • Dridi Boukelmoune's avatar
      Declare varnishstat key bindings in an include table · 8099ffa7
      Dridi Boukelmoune authored
      For starters the include table will be used for two things: handle key
      presses in interactive mode and generate the "Key bindings" manual
      section. The table is so far built to satisfy those two requirements.
      
      It should then be repurposed for a help screen in interactive mode and
      possibly refined to accommodate this third use case.
      
      Refs #2990
      8099ffa7
    • Dridi Boukelmoune's avatar
      Fold varnishstat ncurses top/bottom bindings · 60da5d78
      Dridi Boukelmoune authored
      They have the same effect in practice despite looking different, so the
      simpler option is kept. Also considering vi key bindings <j> and <k>
      documented in the previous commit, <g> and <G> would definitely have the
      same meaning as <HOME> and <END> in this context.
      60da5d78
    • Dridi Boukelmoune's avatar
      Document varnishstat ncurses up/down bindings · e96c01d9
      Dridi Boukelmoune authored
      And avoid magic ASCII numbers when we could use character literals
      instead.
      e96c01d9
  2. 06 Dec, 2019 4 commits
  3. 03 Dec, 2019 2 commits
  4. 02 Dec, 2019 19 commits
  5. 29 Nov, 2019 2 commits
    • Nils Goroll's avatar
      guard against accidental regressions regarding obj · c8585914
      Nils Goroll authored
      enum gethdr_e and VCL_HTTP have a 1:1 relation except for HDR_OBJ which
      does not have a corresponding VCL_HTTP pointer.
      
      As I am about to use a "reverse VRT_selecthttp()" to get from VCL_HTTP
      to enum gethdr_e, I would want to guard against accidental introduction
      of a regression.
      c8585914
    • Dridi Boukelmoune's avatar
      Polish · 935b6bad
      Dridi Boukelmoune authored
      935b6bad
  6. 28 Nov, 2019 5 commits
  7. 26 Nov, 2019 4 commits
    • Emmanuel Hocdet's avatar
      Simplify WS allocation in tlv_string · e74f9e87
      Emmanuel Hocdet authored
      Patch by @ehocdet, commit message edited by @nigoroll:
      
      The root cause of #3131 was misdiagnosed to the extent that, while this
      change had prevented it, the root cause was a bug in WS_ReserveSize()
      fixed in 505b7bd9
      
      The previous tlv_string() code was correct except for the
      fact that error handling should have checked for WS_ReserveSize(ctx->ws,
      len+1) <= len (also spotted by @ehocdet).
      
      Someone had mentioned at some point that we would not want to VRT_fail(),
      but I think this must have been related to the proxy transport code, not
      the proxy vmod.
      
      Ref #3131
      e74f9e87
    • Nils Goroll's avatar
      Add Session Attribute workspace overflow handling · 287dc4a6
      Nils Goroll authored
      Notes:
      
      * for the acceptor, I think it makes sense to keep AN assertion (pun!)
        because varnish is not viable if the session workspace is too small
        to even hold the attributes initialized in the acceptor.
      
        If this was an issue, we should rather revisit the minimum values for
        the session workspace
      
      * for h1 and h2 session setup, I have used XXXAN() because I am not sure
        how we should best handle allocation failures.
      
      * The relevant bit, for now, is the proxy code which may allocate
        arbitrarily long TLV attributes, so this is the code for which we now
        actually handle errors and test that we do
      
      On the vtc: I added the test to o00005.vtc because there existed a
      previous overflow test from 267504b8,
      but that only tested for the one case of a WS overflow which was already
      handled.
      
      Fixes #3145
      287dc4a6
    • Nils Goroll's avatar
      fix copy-pasta vtc description · 815331b3
      Nils Goroll authored
      815331b3
    • Nils Goroll's avatar
      WS_ReserveSize() must not hold a reservation for zero return value · 505b7bd9
      Nils Goroll authored
      This originates from a3d47c25, but
      was overlooked in 4e333597:
      
      When there is insufficient space to fulfil the reservation request, we
      must not leave the workspace reserved.
      
      Fixes #3131
      505b7bd9