- 11 Dec, 2019 3 commits
-
-
Dridi Boukelmoune authored
They fit within 80 columns.
-
Dridi Boukelmoune authored
Instead, the comma is emitted when there is indeed an extra argument. This change was initially submitted in #3147 and is needed when the extra argument may vary for a given symbol. More specifically, when a method symbol may be shared by several instance symbols, it becomes really difficult to find a spot where that extra comma might be added. Removing it from the extra argument itself makes this easier once we reach the point where method symbols are unique (per object) instead of repeated (per instance).
-
Dridi Boukelmoune authored
At the end of the VGC we output the contents of the symbol table inside a C comment. It might look like this: /* * Symbol Table * * reserved VOID 41 41 acl * reserved VOID 41 41 backend * action VOID 40 41 ban * var HTTP 0 99 bereq * var BACKEND 0 99 bereq.backend * [...] */ All columns are currently aligned because we know all the native VCL types and only the last column with the symbol names has unpredictable and arbitrary entries lengths. However, considering the following snippet: new fb = directors.fallback(); The involved symbols will look like: object VOID 41 41 directors.fallback instance INSTANCE 41 41 fb func VOID 40 41 fb.add_backend func BACKEND 40 41 fb.backend func VOID 40 41 fb.remove_backend In the future VMOD objects will likely grow their own types and for the same snippet we may have this instead: object directors.fallback 41 41 directors.fallback method VOID 40 41 directors.fallback.add_backend method BACKEND 40 41 directors.fallback.backend method VOID 40 41 directors.fallback.remove_backend instance directors.fallback 41 41 fb This change was initially submitted as part of #3147, but was considered trivial and fast-track-able by PHK.
-
- 09 Dec, 2019 9 commits
-
-
Poul-Henning Kamp authored
-
Poul-Henning Kamp authored
-
Poul-Henning Kamp authored
-
Poul-Henning Kamp authored
responses to varnishadm. Part of fix for: #3148
-
Dridi Boukelmoune authored
It should currently result in 1:1 RST code, and might be output slightly differently to accomodate a help screen, without changing the semantic of the RST code.
-
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?
-
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
-
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.
-
Dridi Boukelmoune authored
And avoid magic ASCII numbers when we could use character literals instead.
-
- 06 Dec, 2019 4 commits
-
-
Dridi Boukelmoune authored
-
Dridi Boukelmoune authored
-
Dridi Boukelmoune authored
-
Nils Goroll authored
-
- 03 Dec, 2019 2 commits
-
-
Nils Goroll authored
-
Dridi Boukelmoune authored
-
- 02 Dec, 2019 19 commits
-
-
Poul-Henning Kamp authored
mgt_cli_askchild() as opposed to directly through mcf_askchild()), a truncated CLI response is not a failure. Fixes #3038
-
Dridi Boukelmoune authored
Refs 45af9764
-
Nils Goroll authored
I actually did consider this before, but thought we should keep it because we are currently dicussing to add a CTX to vmod object destructors. But this piece of code is unrelated and at any rate the argument can be added back when we need it. in short: @Dridi is right
-
Nils Goroll authored
-
Nils Goroll authored
VCC generates a call to VPI_vcl_select() before returning to the fsm. We basically conducted half a rollback in VPI_vcl_slect and a rull rollback in the fsm. De-duplicate this dance and assert in the fsm that our request looks rolled back.
-
Nils Goroll authored
... which is the vcl the topreq started on
-
Nils Goroll authored
It is unclear to me what the original intention was, but at any rate, the privs are not vcl-specific and the vcl argument was not used. The motivation for this change is the follow up commit "cleanup implicit rollback for return(vcl(...))": For this commit, it would be unclear which vcl to roll back with, but as it actually does not matter, I think this change is warranted.
-
Nils Goroll authored
As the FSM will fail for this case, we should not run the code in the first place.
-
Dridi Boukelmoune authored
Multiple calls to the synthetic() function result in the accumulation of all body parts. The ability to set a [be]resp body accidentally resulted in the same behavior. In other words writing `set resp.body = "string";` in VCL behaves as if `set resp.body += "string";` was written instead. This patch introduces an enum to distinguish between the two desired actions and enables both syntaxes without touching the behavior of the synthetic() function.
-
Dridi Boukelmoune authored
-
Dridi Boukelmoune authored
And avoid the indentation of characters in vcc_assign_expr(). Fixes #3079 Closes #3100
-
Dridi Boukelmoune authored
-
Dridi Boukelmoune authored
At this point we should probably consider renaming the arithmetic table to something also more general.
-
Dridi Boukelmoune authored
Refs #3100
-
Dridi Boukelmoune authored
It uses a similar trick as VCC expressions to find where the symbol name belongs. Refs #3100
-
Dridi Boukelmoune authored
First, gather everything needed, then generate the C code. This avoids a bit of code duplication and makes the error handling more natural, right after the attempt at generating a matching expression. Refs #3100
-
Poul-Henning Kamp authored
Avoid VSB_printf for static strings Done with the following semantic patch for Coccinelle: @@ expression vsb, fmt; @@ - VSB_printf(vsb, fmt); + VSB_cat(vsb, fmt); This patch is available in the Varnish source tree.
-
Poul-Henning Kamp authored
vtc_haproxy: enable mcli with a separate flag from worker mode Support for the master cli in worker mode was added with commit 86e65f1 using the same flag as worker mode (-W). This is a problem with haproxy 1.8 because it has worker mode but no mcli. This patch adds -S to enable mcli for haproxy in a vtc. and: The two patches in attachment fix a bug in the haproxy CLI handling and add the support for the haproxy master CLI in VTest. Could you merge them? Thanks You can also find in attachment a vtc file which use this new feature. Submitted by: William Lallemand <wlallemand@haproxy.com>
-
Poul-Henning Kamp authored
-
- 29 Nov, 2019 2 commits
-
-
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.
-
Dridi Boukelmoune authored
-
- 28 Nov, 2019 1 commit
-
-
Nils Goroll authored
Ref #3145 / 287dc4a6
-