Skip to content
This repository was archived by the owner on Feb 16, 2026. It is now read-only.

vcl-built-in-code.rst needs practical examples and clearer structure explanation #4432

@SashankBhamidi

Description

@SashankBhamidi

doc/sphinx/users-guide/vcl-built-in-code.rst explains the concatenation model but doesn't help users decide when to override vcl_builtin_* vs when to use vcl_req_* hooks.

This came up in #4430 (comment) - the file has one example of using vcl_req_cookie (line 46) but no explanation of when you'd use that pattern vs overriding vcl_builtin_recv.

Gaps:

No guidance on choosing patterns
The docs show vcl_req_cookie can override cookie handling but don't explain when you'd override vcl_builtin_recv instead. Users have to read builtin.vcl source to figure this out.

No mention of recursion check
Nowhere does it say that calling vcl_builtin_* from your own vcl_builtin_* won't compile. Users hit this error and don't know why.

Only one practical example
The pipe mode example (lines 189-214) is the only recent practical example. The vcl_req_cookie one (line 46) is there but not explained as a pattern. Need examples showing:

  • When to use vcl_req_* vs overriding vcl_builtin_*
  • What the recursion error looks like

The vcl_refresh_* section (lines 77-172) is detailed but dense. Most users looking for basic guidance won't read that far.

Ref: #4372

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions