Ticket #15 (closed bug: fixed)

Opened 8 months ago

Last modified 7 months ago

mongrel squashes helpful exception in register method

Reported by: evanweaver Assigned to: evanweaver
Priority: minor Milestone: 1.2
Component: Mongrel Keywords:
Cc:

Description

When there register method of the Mongrel::HTTPServer class delegates to the classifier, it assumes that a URIClassifier::RegistrationError? means that the uri has already been registered and tries to retrieve the handlers list and push the new one onto the stack of handlers. If a RegistrationError? was raised for some other reason, this fails and throws a 'push' method not found in class Nil. The original exception is lost. Attached is a patch that checks to make sure the handlers return respond to the push method, and reraise the original excpetion if not.

To reproduce this, register an invalid handler, such as one that doesn't begin with '/'.

Change History

03/23/08 22:49:48 changed by evanweaver

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