Skip to content

Conversation

rsmeral
Copy link
Contributor

@rsmeral rsmeral commented Jan 19, 2025

Description

aiohttp's ClientResponse.raw_headers is supposed to be "unconverted bytes".

Pook was setting the keys and values of raw_headers as string instead of bytes.

This was causing issues in clients which expect the headers to be bytes, for example aiobotocore tries to decode() header names and values which then fails with AttributeError: 'str' object has no attribute 'decode'.
See https://github.com/aio-libs/aiobotocore/blob/master/aiobotocore/endpoint.py#L41-L56

PR Checklist

  • I've added tests for any code changes
  • I've documented any new features

@sarayourfriend
Copy link
Collaborator

Thanks again @rsmeral. I'll review this later today or sometime tomorrow 🙂

@rsmeral
Copy link
Contributor Author

rsmeral commented May 6, 2025

Hi @sarayourfriend, the tests seem to be passing. Anything else I can do to help get it merged, so that we can get it out in the next release? Thanks!

@sarayourfriend sarayourfriend merged commit 64feed0 into h2non:master Jun 16, 2025
9 checks passed
@sarayourfriend
Copy link
Collaborator

Sorry for the delay, @rsmeral. Things got busy in life and this fell off my radar. I've merged and will release this fix along with another later today.

@rsmeral
Copy link
Contributor Author

rsmeral commented Jun 16, 2025

Thanks, and no worries at all!

@rsmeral
Copy link
Contributor Author

rsmeral commented Jun 23, 2025

Hi @sarayourfriend, do you perhaps have a rough ETA for the release? Not pushing – just want to adjust our plans. Thanks!

@sarayourfriend
Copy link
Collaborator

@rsmeral finally got around to this, released as v2.1.4: https://github.com/h2non/pook/releases/tag/v2.1.4

I mention in the release notes there, but I'm very sorry for the delay in this release. I've had a spate of things that keep coming up over the last 6 months (including most recently a broken hand) that have made this difficult to get around to. As mentioned in the notes, I will have some time to look into ways to improve the release process for pook so this doesn't happen again in the future.

Thanks again as always for your contributions to the project 🙏

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