Rack middleware: `REQUEST_PATH` key does not exist
ben-axnick opened this issue · 1 comments
ben-axnick commented
In my Rails 5 + puma app, it appears as though this is provided as REQUEST_URI
instead. It also looks as though PATH_INFO
is another potential variation on the key. I'd like to propose that:
- We try to use any of
REQUEST_URI
,REQUEST_PATH
,PATH_INFO
, treating them interchangeably - If, for some reason, none of those exist, raise an error
EDIT:
Actually, all that's needed is a s/REQUEST_PATH/PATH_INFO/g
ben-axnick commented
After a bit of reading, the spec says that PATH_INFO
should always be present, REQUEST_PATH
and REQUEST_URI
are non-standard and the former value is somewhat legacy and being phased out. That means we should just check PATH_INFO
unless there is a need to maintain compat with some non-compliant rack application.