Skip to content

PATH_INFO can never be empty.#2114

Merged
dentarg merged 1 commit intomainfrom
empty-path_info
Aug 2, 2025
Merged

PATH_INFO can never be empty.#2114
dentarg merged 1 commit intomainfrom
empty-path_info

Conversation

@ioquatix
Copy link
Copy Markdown
Contributor

Fixes #2113.

@ioquatix
Copy link
Copy Markdown
Contributor Author

Copy link
Copy Markdown
Member

@dentarg dentarg left a comment

Choose a reason for hiding this comment

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

Seems OK

@dentarg dentarg added the bug label Aug 2, 2025
@dentarg dentarg merged commit fa99a21 into main Aug 2, 2025
56 checks passed
@dentarg dentarg deleted the empty-path_info branch August 2, 2025 10:07
dentarg added a commit to dentarg/sinatra that referenced this pull request Oct 10, 2025
This reverts commit fa99a21.

It causes problems, if you have an app like this

    class FooApp < Sinatra::Base
      get "/" do
        "hello foo"
      end
    end

and map it like this in config.ru

    map("/foo") { run FooApp.new }

GET /foo returns 404, which was not the case before.
GET /foo/ does reach the app.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Empty PATH_INFO is (probably) invalid and will (probably) fail in Rack 3.2.

2 participants