Skip to content

Commit

Permalink
fix the example.yml file: HTTP/2 is shown as HTTP/2.0 in the golang h…
Browse files Browse the repository at this point in the history
…ttp client (#633)

Signed-off-by: Simon Thoby <[email protected]>
  • Loading branch information
nightmared authored Jun 5, 2020
1 parent 7fdd3b7 commit 261b0eb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions prober/http_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 261b0eb

Please sign in to comment.