integration: Don't send Link header field for resource under /css/
This commit is contained in:
parent
80743ddc7b
commit
ff60cc6b71
|
@ -8,6 +8,7 @@ import (
|
|||
"io"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"strings"
|
||||
"syscall"
|
||||
"testing"
|
||||
)
|
||||
|
@ -494,7 +495,9 @@ func TestH2H1SNI(t *testing.T) {
|
|||
func TestH2H1ServerPush(t *testing.T) {
|
||||
st := newServerTester(nil, t, func(w http.ResponseWriter, r *http.Request) {
|
||||
// only resources marked as rel=preload are pushed
|
||||
if !strings.HasPrefix(r.URL.Path, "/css/") {
|
||||
w.Header().Add("Link", "</css/main.css>; rel=preload, </foo>, </css/theme.css>; rel=preload")
|
||||
}
|
||||
})
|
||||
defer st.Close()
|
||||
|
||||
|
|
Loading…
Reference in New Issue