mirror of
https://gitee.com/openharmony/third_party_nghttp2
synced 2024-11-23 07:50:02 +00:00
integration: Fix issues reported by the go vet
tool.
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
This commit is contained in:
parent
8c0ea56bb8
commit
61efa15a14
@ -211,7 +211,7 @@ func TestH1H1GracefulShutdown(t *testing.T) {
|
||||
want := io.EOF
|
||||
b := make([]byte, 256)
|
||||
if _, err := st.conn.Read(b); err == nil || err != want {
|
||||
t.Errorf("st.conn.Read(): %v; want %v, %v", err, want)
|
||||
t.Errorf("st.conn.Read(): %v; want %v", err, want)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1204,10 +1204,10 @@ func TestH2H1ProxyProtocolV1TCP6(t *testing.T) {
|
||||
func TestH2H1ProxyProtocolV1Unknown(t *testing.T) {
|
||||
st := newServerTester([]string{"--accept-proxy-protocol", "--add-x-forwarded-for", "--add-forwarded=for", "--forwarded-for=ip"}, t, func(w http.ResponseWriter, r *http.Request) {
|
||||
if got, notWant := r.Header.Get("X-Forwarded-For"), "192.168.0.2"; got == notWant {
|
||||
t.Errorf("X-Forwarded-For: %v")
|
||||
t.Errorf("X-Forwarded-For: %v; want something else", got)
|
||||
}
|
||||
if got, notWant := r.Header.Get("Forwarded"), "for=192.168.0.2"; got == notWant {
|
||||
t.Errorf("Forwarded: %v")
|
||||
t.Errorf("Forwarded: %v; want something else", got)
|
||||
}
|
||||
})
|
||||
defer st.Close()
|
||||
|
Loading…
Reference in New Issue
Block a user