Skip to content

Fix check for io.Copy errors#24

Merged
rueian merged 1 commit into
mainfrom
codex/modify-condition-in-pagefetcher.download
Jun 8, 2025
Merged

Fix check for io.Copy errors#24
rueian merged 1 commit into
mainfrom
codex/modify-condition-in-pagefetcher.download

Conversation

@rueian

@rueian rueian commented Jun 8, 2025

Copy link
Copy Markdown
Member

Summary

  • fix error check when draining download body

Testing

  • go test ./... (fails: Get ... Forbidden)

https://chatgpt.com/codex/tasks/task_e_68461a2fd8b4832480e468bf2e691583

@codecov

codecov Bot commented Jun 8, 2025

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
page.go 0.00% 0 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@rueian rueian merged commit a149c9f into main Jun 8, 2025
1 of 2 checks passed
Comment thread page.go
defer func(resp *http.Response) {
// Drain the body to allow connection reuse.
if _, copyErr := io.Copy(io.Discard, resp.Body); err != nil {
if _, copyErr := io.Copy(io.Discard, resp.Body); copyErr != nil {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm terribly sorry 😭

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants