Skip to content

Add default headers to fix Wayback Machine compatibility#26

Open
saulbert wants to merge 2 commits intomasterfrom
fix-wayback-headers
Open

Add default headers to fix Wayback Machine compatibility#26
saulbert wants to merge 2 commits intomasterfrom
fix-wayback-headers

Conversation

@saulbert
Copy link
Copy Markdown
Collaborator

@saulbert saulbert commented Feb 24, 2026

Summary

  • Send User-Agent, Accept, and Connection headers on every HTTP request via a new _request() method
  • Without these headers, the Wayback Machine serves an HTML wrapper page instead of the archived file content
  • Accept-Encoding is deliberately omitted: it causes urllib3 to try decompressing raw zip range data, which fails

Fixes #23

Test plan

🤖 Generated with Claude Code

saulpw and others added 2 commits February 20, 2026 17:00
Send User-Agent, Accept, and Connection headers on every request.
Without these, the Wayback Machine serves an HTML wrapper page
instead of the archived file content. Fixes #23.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

KeyError: 'content-length' with archive.og wayback zip file

2 participants