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

Remove check for ::Rack::Request.instance_methods.include?(:each_header) at load time #2778

Merged

Conversation

GustavoCaso
Copy link
Member

Fixes #2724

The easiest solution rather than checking for the existence of each_header method for a rack request is to simply use request.env.each_with_object.

Removing that code fixes the load time issue when using dd-trace-rb on a non rack base application

@GustavoCaso GustavoCaso requested a review from a team April 12, 2023 13:14
@github-actions github-actions bot added appsec Application Security monitoring product integrations Involves tracing integrations labels Apr 12, 2023
Copy link
Contributor

@lloeki lloeki left a comment

Choose a reason for hiding this comment

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

LGTM!

@GustavoCaso GustavoCaso merged commit efa9fb6 into master Apr 13, 2023
152 checks passed
@GustavoCaso GustavoCaso deleted the appsec-do-notcheck-for-rack-request-to-define-a-method branch April 13, 2023 08:40
@github-actions github-actions bot added this to the 1.11.0 milestone Apr 13, 2023
@lloeki lloeki modified the milestones: 1.11.0, 1.11.0.beta1 Apr 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
appsec Application Security monitoring product integrations Involves tracing integrations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NameError: uninitialized constant Rack::Request
2 participants