fix error reporting of timeout when getting invalid response, switch build to go 1.22.2 #914
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #913 relies on fortio/log#60
Also bump go version in build image as 1.22.2 (and 1.21.9) were just released
tested using the bad server from #913 (comment)
and
before
10:01:03.409 [ERR] Read error, err={"Op":"read","Net":"tcp","Source":{"IP":"127.0.0.1","Port":59061,"Zone":""},"Addr":{"IP":"127.0.0.1","Port":3000,"Zone":""},"Err":{}}, size=107, dest={"IP":"127.0.0.1","Port":3000,"Zone":""}, url="http://localhost:3000/foo", thread=0, run=0
after
12:56:28.318 r1 [ERR] http_client.go:1096> Timeout error (incomplete/invalid response), err="read tcp 127.0.0.1:63786->127.0.0.1:3000: i/o timeout", size=107, header_len=0, dest={"IP":"127.0.0.1","Port":3000,"Zone":""}, url="http://localhost:3000", thread=0, run=0
add header_len so it's easier to tell that CR+LF wasn't yet found and explicit message for timeout as well