Commit ff60cc6b authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

integration: Don't send Link header field for resource under /css/

parent 80743ddc
......@@ -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
w.Header().Add("Link", "</css/main.css>; rel=preload, </foo>, </css/theme.css>; rel=preload")
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()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment