Sha256: 97dac8d2069333a70de96fbe5040450a2cbfbcba08d3df07a2e9c1886b6c55b6

Contents?: true

Size: 422 Bytes

Versions: 34

Compression:

Stored size: 422 Bytes

Contents

require 'sinatra'
require 'json'
require File.join(File.dirname(__FILE__), 'webrick_patch')

class App < Sinatra::Base
  set :environment, :production
  enable :dump_errors

  post('/first') do
    redirect "/second"
  end

  get('/second') do
    post_body = request.body.read
    if post_body == "" && request["CONTENT_LENGTH"].nil?
      "ok"
    else
      JSON.pretty_generate(request.env)
    end
  end
end

run App

Version data entries

34 entries across 32 versions & 4 rubygems

Version Path
excon-0.64.0 tests/rackups/redirecting.ru
excon-0.63.0 tests/rackups/redirecting.ru
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/excon-0.62.0/tests/rackups/redirecting.ru
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/excon-0.62.0/tests/rackups/redirecting.ru
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/excon-0.62.0/tests/rackups/redirecting.ru
excon-0.62.0 tests/rackups/redirecting.ru
excon-0.61.0 tests/rackups/redirecting.ru
excon-0.60.0 tests/rackups/redirecting.ru
excon-0.59.0 tests/rackups/redirecting.ru
excon-0.58.0 tests/rackups/redirecting.ru
excon-0.57.1 tests/rackups/redirecting.ru
excon-0.57.0 tests/rackups/redirecting.ru
excon-0.56.0 tests/rackups/redirecting.ru
excon-0.55.0 tests/rackups/redirecting.ru
excon-0.54.0 tests/rackups/redirecting.ru
excon-0.53.0 tests/rackups/redirecting.ru
excon-0.52.0 tests/rackups/redirecting.ru
excon-0.51.0 tests/rackups/redirecting.ru
excon-0.50.1 tests/rackups/redirecting.ru
excon-0.50.0 tests/rackups/redirecting.ru