func TestS3H1BadHost(t *testing.T) {
	st := newServerTesterTLS([]string{"--npn-list=spdy/3.1"}, t, func(w http.ResponseWriter, r *http.Request) {
		t.Errorf("server should not forward this request")
	})
	defer st.Close()

	res, err := st.spdy(requestParam{
		name:      "TestS3H1BadHost",
		authority: `foo\bar`,
	})
	if err != nil {
		t.Fatalf("Error st.spdy() = %v", err)
	}
	if got, want := res.status, 400; got != want {
		t.Errorf("status: %v; want %v", got, want)
	}
}
// TestS3H1BadHost tests that server rejects request including bad
// character in :host header field.

TestS3H1BadHost tests that server rejects request including bad
character in :host header field.
// TestS3H1BadHost tests that server rejects request including bad // character in : host header field .
func TestS3H1BadHost(t *testing.T) {
	st := newServerTesterTLS([]string{"--npn-list=spdy/3.1"}, t, func(w http.ResponseWriter, r *http.Request) {
		t.Errorf("server should not forward this request")
	})
	defer st.Close()
	res, err := st.spdy(requestParam{
		name:      "TestS3H1BadHost",
		authority: `foo\bar`,
	})
	if err != nil {
		t.Fatalf("Error st.spdy() = %v", err)
	}
	if got, want := res.status, 400; got != want {
		t.Errorf("status: %v; want %v", got, want)
	}
}
func TestS3H1BadHost ( t * testing . T ) { st := newServerTesterTLS ( [ ] string { " " } , t , func ( w http . ResponseWriter , r * http . Request ) { t . Errorf ( " " ) } ) defer st . Close ( ) res , err := st . spdy ( requestParam { name : " " , authority : `foo\bar` , } ) if err != nil { t . Fatalf ( " " , err ) } if got , want := res . status , 400 ; got != want { t . Errorf ( " " , got , want ) } }
TestS3H1BadHost tests that server rejects request including bad
character in :host header field.
TestS3H1BadHost tests that server rejects request including bad character in : host header field .