Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better error handling in MockRequest.env_for w.r.t. input encodings. #2118

Merged
merged 4 commits into from
Aug 28, 2023

Conversation

ioquatix
Copy link
Member

@ioquatix ioquatix commented Aug 28, 2023

Previously, we would try to invoke #set_encoding on all input bodies. Let's be more specific and issue more valuable errors when dealing with non-binary input bodies.

Fixes #2115.

See also #2116.

@ioquatix ioquatix force-pushed the mockrequest-input-stringio-encoding branch from 2e1499a to 3d13b77 Compare August 28, 2023 21:04
@ioquatix ioquatix force-pushed the mockrequest-input-stringio-encoding branch from 0a76d3d to 72e951b Compare August 28, 2023 21:37
@ioquatix ioquatix changed the title Only set_encoding when we wrap a string. Better error handling in MockRequest.env_for w.r.t. input encodings. Aug 28, 2023
@ioquatix ioquatix enabled auto-merge (squash) August 28, 2023 22:59
Copy link
Member

@tenderlove tenderlove left a comment

Choose a reason for hiding this comment

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

LGTM!

@ioquatix ioquatix merged commit 64610db into rack:main Aug 28, 2023
13 of 14 checks passed
@ioquatix ioquatix deleted the mockrequest-input-stringio-encoding branch August 28, 2023 23:02
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.

None yet

2 participants