Commit 63ccc626 authored by Matthew Holt's avatar Matthew Holt

Fix parsing bug for one-line Caddyfiles

parent b2549c31
......@@ -51,6 +51,12 @@ func (p *parser) begin() error {
return err
}
if p.eof {
// this happens if the Caddyfile consists of only
// a line of addresses and nothing else
return nil
}
err = p.blockContents()
if err != nil {
return err
......@@ -113,12 +119,6 @@ func (p *parser) blockContents() error {
p.cursor--
}
if p.eof {
// this happens if the Caddyfile consists of only
// a line of addresses and nothing else
return nil
}
err := p.directives()
if err != nil {
return err
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment