mirror of
https://github.com/caddyserver/caddy.git
synced 2025-08-26 11:22:13 +08:00
caddyhttp: Impl ResponseWriter.Unwrap()
, prep for Go 1.20's ResponseController
(#5509)
* feat: add support for ResponseWriter.Unwrap() * cherry-pick Francis' code
This commit is contained in:
@ -66,3 +66,9 @@ func (d *delegator) WriteHeader(code int) {
|
||||
d.status = code
|
||||
d.ResponseWriter.WriteHeader(code)
|
||||
}
|
||||
|
||||
// Unwrap returns the underlying ResponseWriter, necessary for
|
||||
// http.ResponseController to work correctly.
|
||||
func (d *delegator) Unwrap() http.ResponseWriter {
|
||||
return d.ResponseWriter
|
||||
}
|
||||
|
Reference in New Issue
Block a user