Skip to content

Conversation

karenetheridge
Copy link
Contributor

While weird, mixed-case or lower-cased methods are totally legal, and some symbols are permitted too.
The ABNF is here: https://www.rfc-editor.org/rfc/rfc9110#appendix-A

@karenetheridge karenetheridge marked this pull request as draft September 2, 2025 01:11
@karenetheridge karenetheridge force-pushed the ether/preserve-method-casing branch from 34c5b7e to 8214d7f Compare September 2, 2025 02:52
@karenetheridge
Copy link
Contributor Author

I think I've got everything now.

I recognize that this is may be controversial, but even as a breaking change I think it's the right thing to do.

@karenetheridge karenetheridge marked this pull request as ready for review September 2, 2025 02:52
While weird, mixed-case or lower-cased methods are totally legal,
and some symbols are permitted too.
The ABNF is here: https://www.rfc-editor.org/rfc/rfc9110#appendix-A
@karenetheridge karenetheridge force-pushed the ether/preserve-method-casing branch from 8214d7f to 41a0a6b Compare September 2, 2025 03:44
@kraih
Copy link
Member

kraih commented Sep 2, 2025

Yes, this does seem a little controversial to me, but we can put it up to a vote.

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR modifies Mojolicious to respect HTTP request method casing instead of automatically converting methods to uppercase. The change ensures that mixed-case or lowercase HTTP methods (which are valid according to RFC 9110) are preserved throughout the framework.

  • Remove automatic uppercase conversion of HTTP methods in routing and processing
  • Update test cases to use proper casing or test lowercase method handling
  • Preserve method casing in debug output and command-line tools

Reviewed Changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
lib/Mojolicious/Routes/Route.pm Remove uppercase conversion in methods() function
lib/Mojolicious/Routes.pm Preserve method casing in routing logic
lib/Mojo/UserAgent/Transactor.pm Remove uppercase conversion in proxy and redirect handling
lib/Mojo/UserAgent.pm Remove uppercase conversion in connection reuse logic
lib/Mojo/Transaction/HTTP.pm Remove uppercase conversion in HEAD request handling
lib/Mojo/Message/Request.pm Remove uppercase conversion in request line generation
lib/Test/Mojo.pm Preserve method casing in test descriptions
lib/Mojolicious/Command/routes.pm Remove uppercase conversion in routes command output
lib/Mojolicious/resources/templates/mojo/debug.html.ep Remove uppercase conversion in debug template
t/mojolicious/routes.t Update test methods to use uppercase for consistency
t/mojolicious/lite_app.t Update test methods and add lowercase method test case
t/mojo/transactor.t Update test descriptions and methods to reflect new behavior
t/mojo/request.t Add test for method case preservation and update existing tests

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

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