chore: May 2026 batch#33
Conversation
body[512:] examined bytes *after* position 512 instead of the first 512 bytes. Binary detection (BOM check, control character scan, and http.DetectContentType) operated on the tail of the body rather than the head, which is what the MIME sniffing spec and DetectContentType expect. A body of length 513+ with a leading BOM was misclassified, since the BOM check requires len(body) >= 3 against the start of the slice.
- Removes the locally maintained tls.go maps in favor of the standard library. - tls.CipherSuiteName available since Go 1.14. - tls.VersionName available since Go 1.21.
- Implements Unwrap() on responseRecorder to support http.ResponseController (Go 1.20+). - Let handlers stream via direct w.(http.Flusher) assertions when the underlying writer supports it.
Previously, the response status line was always printed red. Now httpretty picks the color depending on the HTTP status class: 2xx green, 3xx yellow, 4xx red, 5xx bold red, and blue for 1xx.
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
May 2026 maintenance batch.
The library supports the last two major Go releases whenever updated. Now: 1.25 and 1.26.
http.Flusherandhttp.ResponseControllersupport inMiddleware.subjectAltNameline in curl format onprintCertificate.application/gzipas a binary media typetls.VersionNameandtls.CipherSuiteNamefrom the stdlib, deleting the hand-maintainedtlsCiphers/tlsProtocolVersionstables intls.go.Fixes
isBinarywas checking the wrong portion of the body — it slicedbody[512:](skipping the first 512 bytes) instead ofbody[:512], so the binary-detection heuristic looked at the wrong region.printServerResponseContent-Type check now uses the response header (rec.Header()) instead of the request header (req.Header), so binary-response detection keys off the actual response Content-Type.