Skip to content

fix: allow unknown-length unexpected EOF responses#880

Open
StantonMatt wants to merge 1 commit into
gocolly:masterfrom
StantonMatt:stanton/allow-unknown-length-unexpected-eof
Open

fix: allow unknown-length unexpected EOF responses#880
StantonMatt wants to merge 1 commit into
gocolly:masterfrom
StantonMatt:stanton/allow-unknown-length-unexpected-eof

Conversation

@StantonMatt

Copy link
Copy Markdown

Summary

  • Return bytes already read when an unknown-length response ends with io.ErrUnexpectedEOF.
  • Add a regression test for a truncated gzip response that still contains decoded body bytes.

Fixes #511
Follow-up to #512.

Verification

  • go test . -run TestHTTPBackendDoAllowsUnexpectedEOFWithUnknownLength -count=1 -v
  • go test ./... -count=1
  • git diff --check

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.

Interoperability issues with broken gzip responses

1 participant