Skip to content

Fix logz#2180

Merged
duckduckgrayduck merged 2 commits into
masterfrom
disable_logz
May 21, 2026
Merged

Fix logz#2180
duckduckgrayduck merged 2 commits into
masterfrom
disable_logz

Conversation

@duckduckgrayduck
Copy link
Copy Markdown
Contributor

I think it's because we are trying to read the stream twice.
In Documentcloud this line isn't included. It was removed at some point. See first commit:

MuckRock/documentcloud@97da837
and then it was removed in the very next commit :
MuckRock/documentcloud@2e56f87

@duckduckgrayduck duckduckgrayduck temporarily deployed to muckrock-pip-disable-lo-duxqkf May 20, 2026 17:39 Inactive
@mitchelljkotler
Copy link
Copy Markdown
Member

It is how body is read, from that same commit:

MuckRock/documentcloud@2e56f87#diff-2d43b533e5e5146521e5968e544ebab651478b39949450eeb629a8351cd031f0R13-R45

I would just copy the middleware code from DocumentCloud - it reads body before the call and caches it in _local_body to avoid this exception

Copy link
Copy Markdown
Member

@mitchelljkotler mitchelljkotler left a comment

Choose a reason for hiding this comment

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

I would just copy the middleware code from DocumentCloud - it reads body before the call and caches it in _local_body to avoid this exception

@duckduckgrayduck duckduckgrayduck temporarily deployed to muckrock-pip-disable-lo-duxqkf May 20, 2026 20:12 Inactive
@duckduckgrayduck duckduckgrayduck merged commit 8303745 into master May 21, 2026
3 checks 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.

2 participants