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

Version Path
excon-0.10.1 tests/rackups/ssl.ru
excon-0.10.0 tests/rackups/ssl.ru
excon-0.9.6 tests/rackups/ssl.ru
excon-0.9.5 tests/rackups/ssl.ru
excon-0.9.4 tests/rackups/ssl.ru
excon-0.9.3 tests/rackups/ssl.ru
excon-0.9.2 tests/rackups/ssl.ru
excon-0.9.1 tests/rackups/ssl.ru
excon-0.9.0 tests/rackups/ssl.ru
excon-0.8.0 tests/rackups/ssl.ru
excon-0.7.12 tests/rackups/ssl.ru
excon-0.7.11 tests/rackups/ssl.ru
excon-0.7.10 tests/rackups/ssl.ru
excon-0.7.9 tests/rackups/ssl.ru
excon-0.7.8 tests/rackups/ssl.ru
excon-0.7.7 tests/rackups/ssl.ru
excon-0.7.6 tests/rackups/ssl.ru
excon-0.7.5 tests/rackups/ssl.ru
excon-0.7.4 tests/rackups/ssl.ru
excon-0.7.3 tests/rackups/ssl.ru