Ticket #499 (closed defect: duplicate)

Opened 10 months ago

Last modified 10 months ago

unexpected nil when using path_prefix

Reported by: cli..@powerset.com Assigned to:
Priority: medium Milestone: The Future
Component: Merb Keywords:
Cc:

Description

When using the path_prefix option, leaving the trailing slash off of a URI causes an exception. For instance, if an app has path_prefix set like so:

:path_prefix: /myapp

Start the merb app and go to http://localhost:4000/myapp you will get a 500 and a stack trace. Go to http://localhost:4000/myapp/ and it will route to the default controller/action.

The bug appears to happen because the request_uri variable is unexpectedly blank. The attached patch will treat a blank request_uri like a trailing slash.

Attachments

empty_request_uri.patch (1.1 kB) - added by cli..@powerset.com on 02/05/08 20:20:37.

Change History

02/05/08 20:20:37 changed by cli..@powerset.com

  • attachment empty_request_uri.patch added.

02/11/08 13:50:51 changed by shayarne..@gmail.com

  • status changed from new to closed.
  • resolution set to duplicate.