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

Ensure http method is always lowercase #6

Closed
wants to merge 1 commit into from

Conversation

webmat
Copy link
Contributor

@webmat webmat commented Sep 2, 2022

Hello! I've noticed that most of my http metrics have method lowercase (like yabeda-rails' metrics), but sometimes I have metrics where method is uppercase. I assume this is a difference per http library.

Here I'm suggesting a trivial change that would ensure it's always lowercase, to match yabeda-rails. Is there appetite for this kind of normalization?

This is a backwards incompatible change with regards to the metrics themselves. I can work to make the behaviour configurable if you want, although I think this would over-complicate things.

@webmat webmat changed the title Ensure http method is always downcased Ensure http method is always lowercase Sep 2, 2022
@Envek Envek closed this in 3de1683 Dec 14, 2023
Envek pushed a commit that referenced this pull request Dec 14, 2023
Per RFC 7231 HTTP verbs are defined as case-sensitive and standard ones are in uppercase.
See https://www.rfc-editor.org/rfc/rfc7231#section-4.1

Resolves #6
@Envek
Copy link
Member

Envek commented Dec 14, 2023

Hey, thanks for the pull request and sorry for the late reply.

As per RFC 7231 HTTP verbs are defined as case-sensitive and standard ones are in uppercase.
See https://www.rfc-editor.org/rfc/rfc7231#section-4.1

So I made the opposite to your implementation: upcased http verbs.

Released in 0.2.1.

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