From 261b0eb586e91646842154a103e6137f1974c4b3 Mon Sep 17 00:00:00 2001 From: Simon THOBY Date: Fri, 5 Jun 2020 18:38:55 +0200 Subject: [PATCH] fix the example.yml file: HTTP/2 is shown as HTTP/2.0 in the golang http client (#633) Signed-off-by: Simon Thoby --- example.yml | 2 +- prober/http_test.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/example.yml b/example.yml index 3416c74..f36a2a9 100644 --- a/example.yml +++ b/example.yml @@ -3,7 +3,7 @@ modules: prober: http timeout: 5s http: - valid_http_versions: ["HTTP/1.1", "HTTP/2"] + valid_http_versions: ["HTTP/1.1", "HTTP/2.0"] valid_status_codes: [] # Defaults to 2xx method: GET headers: diff --git a/prober/http_test.go b/prober/http_test.go index 29088bf..78f10ca 100644 --- a/prober/http_test.go +++ b/prober/http_test.go @@ -74,8 +74,8 @@ func TestValidHTTPVersion(t *testing.T) { }{ {[]string{}, true}, {[]string{"HTTP/1.1"}, true}, - {[]string{"HTTP/1.1", "HTTP/2"}, true}, - {[]string{"HTTP/2"}, false}, + {[]string{"HTTP/1.1", "HTTP/2.0"}, true}, + {[]string{"HTTP/2.0"}, false}, } for i, test := range tests { ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { -- 2.25.1