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

fix instrumentation to support puma >= 6.2 (#600) #601

Merged
merged 1 commit into from
Sep 5, 2023
Merged

fix instrumentation to support puma >= 6.2 (#600) #601

merged 1 commit into from
Sep 5, 2023

Conversation

ukdave
Copy link
Contributor

@ukdave ukdave commented Sep 1, 2023

Tests are failing on Puma 6.2 (and newer) when instrumentation is enabled. This seems to be caused by PR #3072 in Puma which changes how it handles responses. If the response body (3rd argument) is a file-like object, which Asset is, then it appears to be getting the file path and reading the original contents which then doesn't match the modified Content-Length header for the instrumented version.

This commit fixes the issue by returning the instrumented source as a string rather then the Asset object.

Tests are failing on Puma 6.2 (and newer) when instrumentation is
enabled. This seems to be caused by PR #3072 in Puma which changes how
it handles responses. If the body (3rd argument) is a file-like object
(which Asset is) then it appears to be getting the file path and reading
the original contents which then doesn't match the modified
Content-Length header for the instrumented version.

This commit fixes the issue by returning the instrumented source as a
string rather then the Asset object.
@mathieujobin mathieujobin merged commit 4d7cfbf into jejacks0n:master Sep 5, 2023
10 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