Skip to content

fix(request): keep response body readable#228

Open
pkurunner wants to merge 1 commit into
ccfos:mainfrom
pkurunner:codex/fix-request-body-lifetime-20260616
Open

fix(request): keep response body readable#228
pkurunner wants to merge 1 commit into
ccfos:mainfrom
pkurunner:codex/fix-request-body-lifetime-20260616

Conversation

@pkurunner

Copy link
Copy Markdown
Contributor

Summary

  • stop closing http.Response.Body before returning ServerResponse
  • add a regression test that reads the returned response body

Testing

  • gofmt -w internal/request/request.go internal/request/response_body_test.go
  • GOOS=linux GOARCH=amd64 go test -c ./internal/request
  • Not run: go test ./internal/request on Windows is blocked by Unix-only rawhttp syscall usage.

Signed-off-by: yeyangyi <2501210756@stu.pku.edu.cn>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant