forked from quic-go/quic-go
http3: add compatibility with net/http.ResponseController (#3790)
* feat: compatibility with "net/http".ResponseController * better deadline tests * don't run deadline tests on Go 1.19 * skip deadline tests on Go 1.19
This commit is contained in:
22
integrationtests/self/go120_test.go
Normal file
22
integrationtests/self/go120_test.go
Normal file
@@ -0,0 +1,22 @@
|
||||
//go:build go1.20
|
||||
|
||||
package self_test
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"time"
|
||||
)
|
||||
|
||||
var go120 = true
|
||||
|
||||
func setReadDeadline(w http.ResponseWriter, deadline time.Time) error {
|
||||
rc := http.NewResponseController(w)
|
||||
|
||||
return rc.SetReadDeadline(deadline)
|
||||
}
|
||||
|
||||
func setWriteDeadline(w http.ResponseWriter, deadline time.Time) error {
|
||||
rc := http.NewResponseController(w)
|
||||
|
||||
return rc.SetWriteDeadline(deadline)
|
||||
}
|
||||
Reference in New Issue
Block a user