mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-18 14:39:49 +02:00
fix(access_logger): nil panic when stdout only, improve concurrency safety
This commit is contained in:
@@ -52,10 +52,7 @@ func ValidateVars(s string) error {
|
||||
|
||||
func ExpandVars(w *ResponseModifier, req *http.Request, src string, dstW io.Writer) error {
|
||||
dst := ioutils.NewBufferedWriter(dstW, 1024)
|
||||
defer func() {
|
||||
dst.Flush()
|
||||
dst.Release()
|
||||
}()
|
||||
defer dst.Close()
|
||||
|
||||
for i := 0; i < len(src); i++ {
|
||||
ch := src[i]
|
||||
|
||||
Reference in New Issue
Block a user