Skip to content

v1.3.4

Choose a tag to compare

@djthorpe djthorpe released this 25 Jan 11:38
· 17 commits to main since this release
03d710a

What's Changed

Error handling improvements: Replaced usage of custom error types (e.g., ErrBadParameter, ErrUnexpectedResponse) with standardized errors from the httpresponse package throughout client.go, resulting in more consistent and HTTP-aware error reporting. [1] [2] [3] [4] [5]

Redirects: Implemented manual redirect handling in the do function: follows up to 10 redirects, preserves method and headers for GET/HEAD, and strips sensitive headers (Authorization, Cookie) when redirecting to a different host for improved security. [1] [2]

Tracing and observability: Updated tracing logic to use the otel package instead of pkgotel, ensuring spans are created and finished correctly for each HTTP request and redirect. [1] [2] [3]

Content type and unmarshaling: Enhanced content type validation and error reporting, returning specific HTTP errors when unsupported media types are encountered. Improved custom unmarshaler handling to fall back to default decoding if "not implemented" is returned. [1] [2] [3]

Full Changelog: v1.3.3...v1.3.4