caddy/caddyconfig/httpcaddyfile
Matthew Holt e51e56a494
httpcaddyfile: Fix nested blocks; add handle directive; refactor
The fix that was initially put forth in #2971 was good, but only for
up to one layer of nesting. The real problem was that we forgot to
increment nesting when already inside a block if we saw another open
curly brace that opens another block (dispenser.go L157-158).

The new 'handle' directive allows HTTP Caddyfiles to be designed more
like nginx location blocks if the user prefers. Inside a handle block,
directives are still ordered just like they are outside of them, but
handler blocks at a given level of nesting are mutually exclusive.

This work benefitted from some refactoring and cleanup.
2020-01-16 17:08:52 -07:00
..
addresses.go caddyfile: Less strict URL parsing; allows placeholders 2020-01-09 12:35:53 -07:00
addresses_fuzz.go fuzz: introduce continuous fuzzing for Caddy (#2723) 2019-10-25 18:52:16 -06:00
addresses_test.go caddyfile: Less strict URL parsing; allows placeholders 2020-01-09 12:35:53 -07:00
builtins.go httpcaddyfile: Fix nested blocks; add handle directive; refactor 2020-01-16 17:08:52 -07:00
directives.go httpcaddyfile: Fix nested blocks; add handle directive; refactor 2020-01-16 17:08:52 -07:00
httptype.go httpcaddyfile: Fix nested blocks; add handle directive; refactor 2020-01-16 17:08:52 -07:00
httptype_test.go httpcaddyfile: Fix nested blocks; add handle directive; refactor 2020-01-16 17:08:52 -07:00
options.go httpcaddyfile: Replace 'handler_order' option with 'order' 2020-01-16 12:09:54 -07:00
parser_test.go v2: Implement Caddyfile enhancements (breaking changes) (#2960) 2020-01-09 14:00:32 -07:00