This project is archived and is in readonly mode.

#570 ✓resolved
tmtysk

Failed to create error_path on failsafe_response_body

Reported by tmtysk | July 8th, 2008 @ 04:25 AM | in 2.x

In ActionController::Dispatcher,

It cannot get correct error_page_path such as "#{RAILS_ROOT}/public/500.html", if it occurred some errors in dispatching.

Comments and changes to this ticket

  • Pratik

    Pratik July 8th, 2008 @ 01:08 PM

    • State changed from “new” to “incomplete”

    Could you please add a failing test case to your patch ?

    Thanks.

  • tmtysk

    tmtysk July 8th, 2008 @ 03:56 PM

    Hi, Pratik.

    I don't know how to write a test-case for Dispatcher, but I could confirm a failing case by following procedures below.

    1) Set using MemCacheStore as SessionStorage.

    2) Start rails application by 'script/server -p3000'

    3) Run a following rspec examples:

    describe "ActionController::Dispatcher" do

    it "should render a text in '/public/500.html' when specified invalid session_id" do

    `curl "http://localhost:3000/?_sess='"`.include?("We're sorry, but something went wrong (500)").should be_true

    end

    end

    Before patched, Dispatcher could NOT get '500.html' as error_path, got '500 .html', so it failed test case.

    Thanks.

  • Kieran P

    Kieran P July 23rd, 2008 @ 10:59 PM

    We've encountered this problem ourselves. After a little research, a ticket relating to this problem was found on the old bug tracker. See

    http://dev.rubyonrails.org/ticke...

    Basically, its looking for '500 .html' rather than '500.html'. Changing [0..3] to [0...3] has fixed the problem.

  • CancelProfileIsBroken

    CancelProfileIsBroken August 3rd, 2009 @ 03:01 PM

    • Tag changed from 2.0-stable, 2.1, actionpack, bug, dispatcher, edge, patch to 2.0-stable, 2.1, actionpack, bug, bugmash, dispatcher, edge, patch
  • Cristi Balan

    Cristi Balan August 8th, 2009 @ 04:05 PM

    not reproducible

    Patch does not apply and looking at the dispatcher tests, there already seems to be a test for this behaviour:

    http://github.com/rails/rails/blob/9aaeb18781f329bf04c3174898bb8f32...

  • Kieran P

    Kieran P August 8th, 2009 @ 10:12 PM

    • Tag changed from 2.0-stable, 2.1, actionpack, bug, bugmash, dispatcher, edge, patch to 2.0-stable, 2.1, actionpack, bug, bugmash, dispatcher, edge, patch, resolved

    This bug is no longer an issue (was fixed in a 2.1.x release IIRC).

    Also, 2-3-stable no longer uses the same code anyway (http://github.com/rails/rails/blob/2-3-stable/actionpack/lib/action....

    Someone can probably close this ticket now.

  • CancelProfileIsBroken

    CancelProfileIsBroken August 8th, 2009 @ 10:22 PM

    • State changed from “incomplete” to “resolved”
    • Tag changed from 2.0-stable, 2.1, actionpack, bug, bugmash, dispatcher, edge, patch, resolved to 2.0-stable, 2.1, actionpack, bug, dispatcher, edge, patch, resolved

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Attachments

Pages