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
able-neo4j-1.0.0 vendor/bundle/jruby/1.9/gems/excon-0.45.4/tests/rackups/redirecting.ru
excon-0.49.0 tests/rackups/redirecting.ru
excon-0.48.0 tests/rackups/redirecting.ru
excon-0.47.0 tests/rackups/redirecting.ru
excon-0.46.0 tests/rackups/redirecting.ru
vagrant-cloudstack-1.2.0 vendor/bundle/gems/excon-0.45.4/tests/rackups/redirecting.ru
excon-0.45.4 tests/rackups/redirecting.ru
vagrant-cloudstack-1.1.0 vendor/bundle/gems/excon-0.45.3/tests/rackups/redirecting.ru
excon-0.45.3 tests/rackups/redirecting.ru
excon-0.45.2 tests/rackups/redirecting.ru
excon-0.45.1 tests/rackups/redirecting.ru
excon-0.45.0 tests/rackups/redirecting.ru
excon-0.44.4 tests/rackups/redirecting.ru
excon-0.44.3 tests/rackups/redirecting.ru