summaryrefslogtreecommitdiff
path: root/modules/caddyhttp/fileserver
diff options
context:
space:
mode:
authorMatthew Holt <mholt@users.noreply.github.com>2019-09-10 19:21:52 -0600
committerMatthew Holt <mholt@users.noreply.github.com>2019-09-10 19:21:52 -0600
commit2459c292a4d6fb0552eb9be3cecd955093ed853b (patch)
tree5f10e9c5d8e9250e83f7282e8d57d386cb54e8a6 /modules/caddyhttp/fileserver
parent0cf592fa2e0d2fff8e9379095bbe17f7c8cbd4f2 (diff)
caddyfile: Improve Dispenser.NextBlock() to support nesting
Diffstat (limited to 'modules/caddyhttp/fileserver')
-rw-r--r--modules/caddyhttp/fileserver/caddyfile.go2
-rw-r--r--modules/caddyhttp/fileserver/matcher.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/modules/caddyhttp/fileserver/caddyfile.go b/modules/caddyhttp/fileserver/caddyfile.go
index b7cb311..b50c166 100644
--- a/modules/caddyhttp/fileserver/caddyfile.go
+++ b/modules/caddyhttp/fileserver/caddyfile.go
@@ -43,7 +43,7 @@ func parseCaddyfile(h httpcaddyfile.Helper) (caddyhttp.MiddlewareHandler, error)
return nil, h.ArgErr()
}
- for h.NextBlock() {
+ for h.NextBlock(0) {
switch h.Val() {
case "hide":
fsrv.Hide = h.RemainingArgs()
diff --git a/modules/caddyhttp/fileserver/matcher.go b/modules/caddyhttp/fileserver/matcher.go
index fde086e..4a7f657 100644
--- a/modules/caddyhttp/fileserver/matcher.go
+++ b/modules/caddyhttp/fileserver/matcher.go
@@ -69,7 +69,7 @@ func (MatchFile) CaddyModule() caddy.ModuleInfo {
//
func (m *MatchFile) UnmarshalCaddyfile(d *caddyfile.Dispenser) error {
for d.Next() {
- for d.NextBlock() {
+ for d.NextBlock(0) {
switch d.Val() {
case "root":
if !d.NextArg() {