This project is archived and is in readonly mode.

#5186 ✓stale
Creston Jamison

TypeError using Rails 2.3.8 and HTTPS/SSL with WEBrick

Reported by Creston Jamison | July 23rd, 2010 @ 03:05 PM

Starting with Rails 2.3.6 and higher (Rails 2.3.5 and lower are fine) using WEBrick with HTTPS / SSL (using self-signed certificate) results in a "Not Found" error in the browser and a #<TypeError: can't convert nil into String> in the WEBrick log.

The rails development log does not display any errors:

Processing UserSessionsController#new (for 127.0.0.1 at 2010-07-23 09:45:48) [GET]
  Parameters: {"action"=>"new", "controller"=>"user_sessions"}
Rendering template within layouts/application
Rendering user_sessions/new
Completed in 84ms (View: 46, DB: 2) | 200 OK [https://www.example.com/login]

Here is the browser's error message:

Not Found
`/login' not found.
WEBrick/1.3.1 (Ruby/1.8.7/2008-08-11) OpenSSL/0.9.8g at www.example.com:443

Here is WEBrick's output:

#<TypeError: can't convert nil into String>
["/usr/lib/ruby/1.8/cgi.rb:555:in `+'", "/usr/lib/ruby/1.8/cgi.rb:555:in `header'", "/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.8/lib/action_controller/cgi_process.rb:55:in `dispatch_cgi'", "/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.8/lib/action_controller/dispatcher.rb:101:in `dispatch_cgi'", "/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.8/lib/action_controller/dispatcher.rb:27:in `dispatch'", "/usr/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/webrick_server.rb:103:in `handle_dispatch'", "/usr/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/webrick_server.rb:74:in `service'", "/usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'", "/usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'", "/usr/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'", "/usr/lib/ruby/1.8/webrick/server.rb:162:in `start'", "/usr/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'", "/usr/lib/ruby/1.8/webrick/server.rb:95:in `start'", "/usr/lib/ruby/1.8/webrick/server.rb:92:in `each'", "/usr/lib/ruby/1.8/webrick/server.rb:92:in `start'", "/usr/lib/ruby/1.8/webrick/server.rb:23:in `start'", "/usr/lib/ruby/1.8/webrick/server.rb:82:in `start'", "script/server_ssl:49:in `dispatch'", "script/server_ssl:57"]
[2010-07-23 09:45:48] ERROR `/login' not found.
127.0.0.1 - - [23/Jul/2010:09:45:48 EDT] "GET /login HTTP/1.1" 404 295
http://www.example.com/ -> /login

My environment:

  • 9.04 Ubuntu Linux
  • Ruby 1.8.7
  • WEBrick 1.3.1

Has anyone experienced this error or know how I might be able to resolve it?

Edited by Rohit Arondekar for formating.

Comments and changes to this ticket

  • Santiago Pastorino

    Santiago Pastorino February 2nd, 2011 @ 04:35 PM

    • State changed from “new” to “open”

    This issue has been automatically marked as stale because it has not been commented on for at least three months.

    The resources of the Rails core team are limited, and so we are asking for your help. If you can still reproduce this error on the 3-0-stable branch or on master, please reply with all of the information you have about it and add "[state:open]" to your comment. This will reopen the ticket for review. Likewise, if you feel that this is a very important feature for Rails to include, please reply with your explanation so we can consider it.

    Thank you for all your contributions, and we hope you will understand this step to focus our efforts where they are most helpful.

  • Santiago Pastorino

    Santiago Pastorino February 2nd, 2011 @ 04:35 PM

    • State changed from “open” to “stale”
  • andrea.salicetti

    andrea.salicetti March 5th, 2011 @ 01:11 PM

    Same problem on
    * Mac OS X (Snow Leopard) * Ruby REE 1.8.7 (ruby 1.8.7 (2011-02-18 patchlevel 334) [i686-darwin10.6.0], MBARI 0x6770, Ruby Enterprise Edition 2011.03) * WEBrik 1.3.1

    Here is WEBrick' output:
    #<TypeError: can't convert nil into String> ["/Users/andrea/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/1.8/cgi.rb:555:in +'", "/Users/andrea/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/1.8/cgi.rb:555:inheader'", "/Users/andrea/.rvm/gems/ree-1.8.7-2011.03/gems/actionpack-2.3.11/lib/action_controller/cgi_process.rb:55:in dispatch_cgi'", "/Users/andrea/.rvm/gems/ree-1.8.7-2011.03/gems/actionpack-2.3.11/lib/action_controller/dispatcher.rb:101:indispatch_cgi'", "/Users/andrea/.rvm/gems/ree-1.8.7-2011.03/gems/actionpack-2.3.11/lib/action_controller/dispatcher.rb:27:in dispatch'", "/Users/andrea/.rvm/gems/ree-1.8.7-2011.03/gems/rails-2.3.11/lib/webrick_server.rb:103:inhandle_dispatch'", "/Users/andrea/.rvm/gems/ree-1.8.7-2011.03/gems/rails-2.3.11/lib/webrick_server.rb:74:in service'", "/Users/andrea/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/1.8/webrick/httpserver.rb:104:inservice'", "/Users/andrea/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/1.8/webrick/httpserver.rb:65:in run'", "/Users/andrea/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/1.8/webrick/server.rb:173:instart_thread'", "/Users/andrea/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/1.8/webrick/server.rb:162:in start'", "/Users/andrea/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/1.8/webrick/server.rb:162:instart_thread'", "/Users/andrea/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/1.8/webrick/server.rb:95:in start'", "/Users/andrea/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/1.8/webrick/server.rb:92:ineach'", "/Users/andrea/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/1.8/webrick/server.rb:92:in start'", "/Users/andrea/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/1.8/webrick/server.rb:23:instart'", "/Users/andrea/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/1.8/webrick/server.rb:82:in start'", "script/ssl_server:49:indispatch'", "script/ssl_server:57"] [2011-03-05 13:53:34] ERROR `/user_session/new' not found. 127.0.0.1 - - [05/Mar/2011:13:53:34 CET] "GET /user_session/new HTTP/1.1" 404 301
    Referer -> /user_session/new
    [2011-03-05 13:53:56] ERROR OpenSSL::SSL::SSLError: SSL_accept SYSCALL returned=5 errno=0 state=SSLv3 read client certificate A

    /Users/andrea/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/1.8/openssl/ssl-internal.rb:166:in `accept'
    

    [2011-03-05 13:58:57] ERROR OpenSSL::SSL::SSLError: SSL_accept SYSCALL returned=5 errno=0 state=SSLv3 read client certificate A

    /Users/andrea/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/1.8/openssl/ssl-internal.rb:166:in `accept'
    

    [2011-03-05 14:00:05] ERROR OpenSSL::SSL::SSLError: SSL_accept SYSCALL returned=5 errno=0 state=SSLv3 read client certificate A

    /Users/andrea/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/1.8/openssl/ssl-internal.rb:166:in `accept'
    

    [2011-03-05 14:02:22] ERROR OpenSSL::SSL::SSLError: SSL_accept SYSCALL returned=5 errno=0 state=SSLv3 read client certificate A

    /Users/andrea/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/1.8/openssl/ssl-internal.rb:166:in `accept'
    

    Did you resolved at the end?

  • andrea.salicetti

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>

People watching this ticket

Pages