Skip to content

Revert "PATH_INFO can never be empty."#2124

Merged
dentarg merged 1 commit intosinatra:mainfrom
dentarg:revert-path-info-fix
Oct 10, 2025
Merged

Revert "PATH_INFO can never be empty."#2124
dentarg merged 1 commit intosinatra:mainfrom
dentarg:revert-path-info-fix

Conversation

@dentarg
Copy link
Copy Markdown
Member

@dentarg dentarg commented 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.

Reported at #2113 (comment)

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.
@dentarg dentarg changed the title Revert "PATH_INFO can never be empty. (#2114)" Revert "PATH_INFO can never be empty." Oct 10, 2025
@dentarg dentarg merged commit 2c7f8db into sinatra:main Oct 10, 2025
28 checks passed
@dentarg dentarg deleted the revert-path-info-fix branch October 11, 2025 16:51
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.

1 participant