From ff60cc6b712a5343bb3f3e82c542bebce549fd7e Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Wed, 8 Apr 2015 16:09:02 +0900 Subject: [PATCH] integration: Don't send Link header field for resource under /css/ --- integration-tests/nghttpx_http2_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/integration-tests/nghttpx_http2_test.go b/integration-tests/nghttpx_http2_test.go index fc1daf54..909816c3 100644 --- a/integration-tests/nghttpx_http2_test.go +++ b/integration-tests/nghttpx_http2_test.go @@ -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", "; rel=preload, , ; rel=preload") + if !strings.HasPrefix(r.URL.Path, "/css/") { + w.Header().Add("Link", "; rel=preload, , ; rel=preload") + } }) defer st.Close()