fix: code review findings — 6 bugs + README update#16
Merged
Conversation
Add --har flag, WebSocket support, body decompression, pre-built binaries, Homebrew install instructions, and updated Go version requirement (1.24+). https://claude.ai/code/session_01PPLEf2tHHFhw9rpW8dpdA3
- tui: add m.cursor bounds check in refreshDetail to prevent index panic
- websocket: close clientConn in downstream splice goroutine so upstream
EOF unblocks the client-read goroutine (eliminates goroutine leak)
- logResponse: guard time.Since(start) against zero start time so HAR/
record duration is 0 rather than ~2026 years when reqID is missing
- har: use len(body) for Content.Size and BodySize instead of
resp.ContentLength, which is -1 for chunked transfer encoding
- record/replay: use IndexAny("/?#") to split host from rest of URL so
query strings on path-less URLs are preserved when --replay-target is set
- cert: add net.IPv6loopback to per-host certificate SAN list so tools
connecting via ::1 pass TLS verification
https://claude.ai/code/session_01PPLEf2tHHFhw9rpW8dpdA3
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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.
变更内容
Bug 修复(6 项)
tui.gorefreshDetail未检查cursor >= len(entries),可能触发 index panicwebsocket.goclientConn,上行 goroutine 永久泄漏clientConn.Close()main.gologResponse中start为零值时time.Since返回 ~2026 年,写入错误的 HAR/record durationstart.IsZero()守卫har.goresp.ContentLength为 -1,导致 HAR 中content.size错误int64(len(body))record.gohttps://host?q=1)使用--replay-target时查询字符串丢失IndexAny("/?#")分割 hostmain.go127.0.0.1,通过::1连接时 TLS 验证失败net.IPv6loopback文档
测试计划
go build ./...编译通过go test -race -count=1 -timeout 120s ./...全部通过(38 个测试用例)https://claude.ai/code/session_01PPLEf2tHHFhw9rpW8dpdA3
Generated by Claude Code