Sha256: 153f7ccca97e69d53f1634b938f42e94fe5726773bd7d516009bdf10655578b2
Contents?: true
Size: 487 Bytes
Versions: 21
Compression:
Stored size: 487 Bytes
Contents
require 'openssl' require 'sinatra' require 'webrick' require 'webrick/https' class App < Sinatra::Base get('/content-length/:value') do |value| headers("Custom" => "Foo: bar") 'x' * value.to_i end post('/body-sink') do request.body.read.size.to_s end end Rack::Handler::WEBrick.run(App, { :Port => 9443, :SSLCertName => [["CN", WEBrick::Utils::getservername]], :SSLEnable => true, :SSLVerifyClient => OpenSSL::SSL::VERIFY_NONE })
Version data entries
21 entries across 21 versions & 1 rubygems