1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-27 23:07:03 +00:00

fix: ctx.Record and then iris.Compression flow

This commit is contained in:
Gerasimos (Makis) Maropoulos
2020-07-30 20:13:59 +03:00
parent 53c6f46941
commit eacbcea653
5 changed files with 119 additions and 18 deletions

View File

@@ -192,8 +192,8 @@ func (w *ResponseRecorder) Clone() ResponseWriter {
return wc
}
// WriteTo writes a response writer (temp: status code, headers and body) to another response writer
func (w *ResponseRecorder) WriteTo(res ResponseWriter) {
// CopyTo writes a response writer (temp: status code, headers and body) to another response writer
func (w *ResponseRecorder) CopyTo(res ResponseWriter) {
if to, ok := res.(*ResponseRecorder); ok {
// set the status code, to is first ( probably an error? (context.StatusCodeNotSuccessful, defaults to >=400).