Skip to content

Commit 9b4df8d

Browse files
committed
bug: append missed warnings
1 parent 1e06ed8 commit 9b4df8d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

location.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ nextDirective:
146146
Message: ErrUnrecognized,
147147
})
148148
}
149+
warnings = append(warnings, warns...)
149150
}
150151

151152
r := caddyhttp.Route{}

server.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,15 +108,14 @@ nextDirective:
108108

109109
locationMatcherSet := append(matcherSets[:], matchConfMap)
110110
subroutes, warns, err := ss.locationContext(matchConfMap, dir.Block)
111+
warnings = append(warnings, warns...)
111112
if err != nil || len(subroutes) == 0 {
112-
warnings = append(warnings, warns...)
113113
return warnings, err
114114
}
115115
var matcherSetsEnc caddyhttp.RawMatcherSets
116116
// encode the matchers then set the result as raw matcher config
117117
matcherSetsEnc, err = encodeMatcherSets(locationMatcherSet)
118118
if err != nil {
119-
warnings = append(warnings, warns...)
120119
return warnings, err
121120
}
122121
// set the matcher to route

0 commit comments

Comments
 (0)