Commit d34e92ee authored by Matthew Holt's avatar Matthew Holt

checkDirectives must've slipped through the cracks in big merge

Also we're not messing with log flags anymore during parsing. Timestamps could come in handy, plus concurrent logging is going on now.
parent bcea5182
......@@ -29,10 +29,6 @@ const (
func loadConfigs(filename string, input io.Reader) ([]server.Config, error) {
var configs []server.Config
// turn off timestamp for parsing
flags := log.Flags()
log.SetFlags(0)
// Each server block represents similar hosts/addresses, since they
// were grouped together in the Caddyfile.
serverBlocks, err := parse.ServerBlocks(filename, input, true)
......@@ -168,9 +164,6 @@ func loadConfigs(filename string, input io.Reader) ([]server.Config, error) {
}
}
// restore logging settings
log.SetFlags(flags)
return configs, nil
}
......
......@@ -10,6 +10,7 @@ import "io"
// in the order in which they appear.
func ServerBlocks(filename string, input io.Reader, checkDirectives bool) ([]serverBlock, error) {
p := parser{Dispenser: NewDispenser(filename, input)}
p.checkDirectives = checkDirectives
blocks, err := p.parseAll()
return blocks, 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