forked from forgejo/forgejo
Macaron 1.5 (#12596)
* update macaron to v1.5 of fork * update macaron to v1.5 of fork * test gzip PR * add push method impl to context_tests * use proper gzip commit Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
parent
211321fb93
commit
c5d5d63c9c
53 changed files with 2622 additions and 665 deletions
10
vendor/gitea.com/macaron/gzip/gzip.go
generated
vendored
10
vendor/gitea.com/macaron/gzip/gzip.go
generated
vendored
|
@ -6,6 +6,7 @@ package gzip
|
|||
|
||||
import (
|
||||
"bufio"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"net"
|
||||
|
@ -331,6 +332,15 @@ func (proxy *ProxyResponseWriter) Flush() {
|
|||
proxy.internal.Flush()
|
||||
}
|
||||
|
||||
// Push implements http.Pusher for HTTP/2 Push purposes
|
||||
func (proxy *ProxyResponseWriter) Push(target string, opts *http.PushOptions) error {
|
||||
pusher, ok := proxy.internal.(http.Pusher)
|
||||
if !ok {
|
||||
return errors.New("the ResponseWriter doesn't support the Pusher interface")
|
||||
}
|
||||
return pusher.Push(target, opts)
|
||||
}
|
||||
|
||||
// Hijack implements http.Hijacker. If the underlying ResponseWriter is a
|
||||
// Hijacker, its Hijack method is returned. Otherwise an error is returned.
|
||||
func (proxy *ProxyResponseWriter) Hijack() (net.Conn, *bufio.ReadWriter, error) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue