Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Failed to create error_path on failsafe_response_body

#570

In ActionController::Dispatcher,

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

Reported by tmtysk · July 8th, 2008 @ 04:25 AM

State: resolved
Milestone: 2.x
Assigned to: nobody
Importance: none

Activity

  1. Pratik
    Pratik
    • State changed from new to incomplete

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

    Thanks.

    July 8th, 2008 @ 01:08 PM

  2. tmtysk
    tmtysk

    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.

    July 8th, 2008 @ 03:56 PM

  3. Kieran P
    Kieran P

    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.

    July 23rd, 2008 @ 10:59 PM

  4. CancelProfileIsBroken
    CancelProfileIsBroken
    • 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

    August 3rd, 2009 @ 03:01 PM

  5. Cristi Balan
    Cristi Balan

    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...

    August 8th, 2009 @ 04:05 PM

  6. Kieran P
    Kieran P
    • 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.

    August 8th, 2009 @ 10:12 PM

  7. CancelProfileIsBroken
    CancelProfileIsBroken
    • 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

    August 8th, 2009 @ 10:22 PM