fix the example.yml file: HTTP/2 is shown as HTTP/2.0 in the golang http client ...
authorSimon THOBY <simonthoby@live.fr>
Fri, 5 Jun 2020 16:38:55 +0000 (18:38 +0200)
committerGitHub <noreply@github.com>
Fri, 5 Jun 2020 16:38:55 +0000 (17:38 +0100)
Signed-off-by: Simon Thoby <simon.thoby@bleemeo.com>
example.yml
prober/http_test.go

index 3416c74e821f8f14fbe98dfc83f8915d0c1d77a0..f36a2a998d92b505b979d4d53294b28757bfd93a 100644 (file)
@@ -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:
index 29088bf81263cb8656ad446b0b60957f03ecdb14..78f10ca7c5e47ab3361da4360ce779a7e669e3cc 100644 (file)
@@ -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) {