mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-24 09:18:31 +02:00
fix accesslog and serialization
This commit is contained in:
@@ -123,7 +123,7 @@ func (f JSONFormatter) Format(line *bytes.Buffer, req *http.Request, res *http.R
|
||||
entry.Error = res.Status
|
||||
}
|
||||
|
||||
if entry.ContentType != "" {
|
||||
if entry.ContentType == "" {
|
||||
// try to get content type from request
|
||||
entry.ContentType = req.Header.Get("Content-Type")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user