Project

General

Profile

Feature #13714

Add https support to "httpd" function inside of "un.rb"

Added by flavio (Flavio Castelli) about 2 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
[ruby-core:81901]

Description

As you know it's possible to run a minimalistic http server using the "httpd" function defined inside of the "un.rb" file:

ruby -run -e httpd . -p 5000

Unfortunately it's not possible to start a minimalistic https server. The following patch allows this feature:

ruby -run -e httpd . -p 5000 --bind-address=0.0.0.0 --ssl-certificate ~/secure/minimal.pem --ssl-private-key ~/secure/minimal.key

Files

add-https-support-to-httpd-function.rb (1.15 KB) add-https-support-to-httpd-function.rb Patch implementing the feature - against trunk flavio (Flavio Castelli), 07/04/2017 04:08 PM

Associated revisions

Revision 2c59dd61
Added by nobu (Nobuyoshi Nakada) about 2 years ago

un.rb: support https

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59265 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 59265
Added by nobu (Nobuyoshi Nakada) about 2 years ago

un.rb: support https

Revision 59265
Added by nobu (Nobuyoshi Nakada) about 2 years ago

un.rb: support https

Revision 59265
Added by nobu (Nobuyoshi Nakada) about 2 years ago

un.rb: support https

Revision 650e7580
Added by rhe about 2 years ago

un.rb: use OpenSSL::PKey.read instead of OpenSSL::PKey::RSA.new

Also, error out if --ssl-private-key option is not given, since
specifying only the certificate makes no sense. [Feature #13714]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59268 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 59268
Added by rhenium (Kazuki Yamaguchi) about 2 years ago

un.rb: use OpenSSL::PKey.read instead of OpenSSL::PKey::RSA.new

Also, error out if --ssl-private-key option is not given, since
specifying only the certificate makes no sense. [Feature #13714]

Revision 59268
Added by rhe about 2 years ago

un.rb: use OpenSSL::PKey.read instead of OpenSSL::PKey::RSA.new

Also, error out if --ssl-private-key option is not given, since
specifying only the certificate makes no sense. [Feature #13714]

Revision 59268
Added by rhe about 2 years ago

un.rb: use OpenSSL::PKey.read instead of OpenSSL::PKey::RSA.new

Also, error out if --ssl-private-key option is not given, since
specifying only the certificate makes no sense. [Feature #13714]

History

Updated by shevegen (Robert A. Heiler) about 2 years ago

Guess it makes sense.

#2

Updated by nobu (Nobuyoshi Nakada) about 2 years ago

  • Status changed from Open to Closed

Applied in changeset trunk|r59265.


un.rb: support https

Also available in: Atom PDF