Skip to content

Fix govinfo-bulk: send Accept: application/xml header#42

Merged
v1d0b0t merged 1 commit intomainfrom
fix/govinfo-bulk-accept-header
Apr 3, 2026
Merged

Fix govinfo-bulk: send Accept: application/xml header#42
v1d0b0t merged 1 commit intomainfrom
fix/govinfo-bulk-accept-header

Conversation

@v1d0b0t
Copy link
Copy Markdown
Collaborator

@v1d0b0t v1d0b0t commented Apr 3, 2026

GovInfo returns HTML instead of XML for directory listings unless Accept: application/xml is sent. This caused fetch --source=govinfo-bulk to fail with invalid_listing_payload: GovInfo bulk listing returned HTML instead of XML after the first successful listing.

One-liner fix in fetchText().

Found during smoke test of #40.

GovInfo returns HTML instead of XML for directory listings when
no Accept header is set. This caused the bulk download to fail
after the first successful listing request.
@v1d0b0t v1d0b0t merged commit 3459002 into main Apr 3, 2026
1 check passed
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