chore: May 2026 batch#33
Open
henvic wants to merge 12 commits into
Open
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.
|
|
All alerts resolved. Learn more about Socket for GitHub. This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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.