mirror of
https://github.com/Xevion/banner.git
synced 2025-12-10 06:06:33 -06:00
Log dumped filename
This commit is contained in:
@@ -277,6 +277,7 @@ func GuessExtension(contentType string) string {
|
|||||||
}
|
}
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
// DumpResponse dumps a response body to a file for debugging purposes
|
// DumpResponse dumps a response body to a file for debugging purposes
|
||||||
func DumpResponse(res *http.Response) {
|
func DumpResponse(res *http.Response) {
|
||||||
contentType := res.Header.Get("Content-Type")
|
contentType := res.Header.Get("Content-Type")
|
||||||
@@ -297,4 +298,6 @@ func DumpResponse(res *http.Response) {
|
|||||||
log.Err(err).Msg("Error copying response body")
|
log.Err(err).Msg("Error copying response body")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
log.Info().Str("filename", filename).Str("content-type", contentType).Msg("Dumped response body")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user