1. 16 Nov, 2021 3 commits
    • Martin Blix Grydeland's avatar
      Rename active_vcl to mgt_vcl_active · 9228395e
      Martin Blix Grydeland authored
      It is very easy to confuse the child process' vcl_active and the
      management process' active_vcl variables.
      
      Rename mgt's active_vcl to mgt_vcl_active, following the naming scheme
      used elsewhere.
      9228395e
    • Martin Blix Grydeland's avatar
      Enforce invariant on vcl_active in the child process · d13663f5
      Martin Blix Grydeland authored
      Add a ASSERT_VCL_ACTIVE() macro that asserts that vcl_active either is
      NULL or points to a VCL that is warm.
      
      Sprinkle this macro in the various calls throughout the child process that
      are involved in VCL handling.
      
      Patch by: @alveelde
      d13663f5
    • AlveElde's avatar
      Do not select active VCL automatically in the child process · 4f9785ec
      AlveElde authored
      Do not select the first VCL present as the active VCL in the child
      process. Instead it should always use what the mgt process tells it
      through the explicit 'vcl.use' commands it will send.
      
      Previously, the child could select a cold VCL as the active VCL if that
      happened to be the first one present to it during restarts. This could
      lead to asserts as that is not an allowed state.
      4f9785ec
  2. 15 Nov, 2021 1 commit
  3. 08 Nov, 2021 5 commits
    • Nils Goroll's avatar
      VCL_REGEX: Support concatenation of constant strings · 8a4a7cc6
      Nils Goroll authored
      For the REGEX type, we now peek ahead after the first CSTR token if a '+'
      operator follows and, if yes, create the pattern as a concatenation.
      
      Fixes #3726
      8a4a7cc6
    • Nils Goroll's avatar
      Use backend none more · 5e1589bf
      Nils Goroll authored
      5e1589bf
    • Nils Goroll's avatar
      Split out dns-dependent test · 464dad5e
      Nils Goroll authored
      Conflicts:
      	bin/varnishtest/tests/v00022.vtc
      464dad5e
    • Nils Goroll's avatar
      vcc: Fix dynamic calls to built-in SUBs and properly check evaluation context · 2fd71469
      Nils Goroll authored
      As a follow-up issue from #3719, it was noticed that dynamic calls to
      built-in SUBs did not work.
      
      This issue was caused by more (struct symbol) members missing
      initialization in VCC_New().
      
      In turn, it became apparent that the evaluation context check in
      vcc_expr5() as tested in v00020.vtc only worked by accident, and only
      for built-in subs because (struct symbol).eval was NULL for built-in
      subs.
      
      We fix SUB type expression evaluation with a type specific evaluation
      function which allows expression evaluation from explicit SUB contexts
      only.
      
      Fixes #3720
      2fd71469
    • Nils Goroll's avatar
      vcc: do not overwrite SUB symbol properties when call'ing · f5798fd1
      Nils Goroll authored
      vcc_act_call() implements use-before-define semantics. To do so, it
      needs to instantiate SUB symbols if they do not exist.
      
      However, it wrongly called VCC_GlobalSymbol() also for existing
      symbols, overwriting symbol properties.
      
      In the case of the built-in subs, the symbol's lname (historically)
      still is the unescaped literal name, while user defined subs have
      their name escaped via VCC_GlobalSymbol() -> VCC_PrintCName().
      
      This made the wrong call to VCC_GlobalSymbol() apparent when a
      built-in sub was called with an explicit "call" action.
      
      Besides fixing the VCC_GlobalSymbol() call, we also need to set the
      lname and rname attributes for built-in SUB symbols initialized in
      VCC_New().
      
      Alternatively, we could also have used VCC_GlobalSymbol() there, but
      that would have affected other places where we (still) rely on the
      known name scheme of built-in subs, e.h. EmitStruct(). While the name
      unifaction was nice in general, I found the necessary changes (look up
      SUB symbols) not worth the benefit.
      
      Fixes #3719
      f5798fd1
  4. 28 Sep, 2021 2 commits
  5. 15 Sep, 2021 4 commits
  6. 14 Sep, 2021 6 commits
  7. 13 Sep, 2021 5 commits
  8. 10 Sep, 2021 8 commits
  9. 09 Sep, 2021 3 commits
  10. 08 Sep, 2021 2 commits
    • Nils Goroll's avatar
      Doc polish · 047d0a27
      Nils Goroll authored
      047d0a27
    • Nils Goroll's avatar
      Fix beresp.do_esi docs · 3714f9fa
      Nils Goroll authored
      The variable is independent of req.esi / resp.do_esi:
      
      Whether or not the backend side prepares an object for ESI has nothing
      to do with whether or not the client side processes it.
      3714f9fa
  11. 07 Sep, 2021 1 commit