Skip to content

Instantly share code, notes, and snippets.

@aishfenton
Created June 14, 2011 00:27
Show Gist options
  • Save aishfenton/1024086 to your computer and use it in GitHub Desktop.
Save aishfenton/1024086 to your computer and use it in GitHub Desktop.
evma_httpserver broken with SSL
require 'eventmachine'
require 'evma_httpserver'
class MyHttpServer < EventMachine::Connection
include EventMachine::HttpServer
def post_init
super
ssl_dir = File.join(File.dirname(__FILE__), "ssl")
server_key = File.join(ssl_dir, "server.key")
cert_chain = File.join(ssl_dir, "server.crt")
start_tls(:private_key_file => server_key, :cert_chain_file => cert_chain)
end
def process_http_request
puts "BEGIN PROCESSING -- NEVER REACHES HERE"
end
end
EM.run {
EM.start_server '0.0.0.0', 8080, MyHttpServer
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment