Sha256: 26c51942402dfc346bea7f777482bb4fd0fc61b73d19f36c46a1d28b969b6995

Contents?: true

Size: 733 Bytes

Versions: 300

Compression:

Stored size: 733 Bytes

Contents

# -*- encoding: binary -*-

require 'digest/sha1'
class FooController < ApplicationController
  def index
    render :text => "FOO\n"
  end

  def xcookie
    cookies["foo"] = "cookie #$$"
    render :text => ""
  end

  def xnotice
    flash[:notice] = "session #$$"
    render :text => ""
  end

  def xpost
    if request.post?
      digest = Digest::SHA1.new
      out = "params: #{params.inspect}\n"
      if file = params[:file]
        loop do
          buf = file.read(4096) or break
          digest.update(buf)
        end
        out << "sha1: #{digest.to_s}\n"
      end
      headers['content-type'] = 'text/plain'
      render :text => out
    else
      render :status => 403, :text => "need post\n"
    end
  end
end

Version data entries

300 entries across 75 versions & 6 rubygems

Version Path
preplay_unicorn-4.3.1.5.ga7df test/rails/app-1.2.3/app/controllers/foo_controller.rb
preplay_unicorn-4.3.1.5.ga7df test/rails/app-2.0.2/app/controllers/foo_controller.rb
preplay_unicorn-4.3.1.5.ga7df test/rails/app-2.2.2/app/controllers/foo_controller.rb
preplay_unicorn-4.3.1.5.ga7df test/rails/app-2.1.2/app/controllers/foo_controller.rb
preplay_unicorn-4.3.1.2.gc450 test/rails/app-2.2.2/app/controllers/foo_controller.rb
preplay_unicorn-4.3.1.2.gc450 test/rails/app-1.2.3/app/controllers/foo_controller.rb
preplay_unicorn-4.3.1.2.gc450 test/rails/app-2.0.2/app/controllers/foo_controller.rb
preplay_unicorn-4.3.1.2.gc450 test/rails/app-2.1.2/app/controllers/foo_controller.rb
unicorn-lb-patch-4.3.1.13.gb7d9 test/rails/app-2.0.2/app/controllers/foo_controller.rb
unicorn-lb-patch-4.3.1.13.gb7d9 test/rails/app-2.1.2/app/controllers/foo_controller.rb
unicorn-lb-patch-4.3.1.13.gb7d9 test/rails/app-1.2.3/app/controllers/foo_controller.rb
unicorn-lb-patch-4.3.1.13.gb7d9 test/rails/app-2.2.2/app/controllers/foo_controller.rb
unicorn-lb-patch-4.3.1.11.g21b8.dirty test/rails/app-2.1.2/app/controllers/foo_controller.rb
unicorn-lb-patch-4.3.1.11.g21b8.dirty test/rails/app-2.0.2/app/controllers/foo_controller.rb
unicorn-lb-patch-4.3.1.11.g21b8.dirty test/rails/app-1.2.3/app/controllers/foo_controller.rb
unicorn-lb-patch-4.3.1.11.g21b8.dirty test/rails/app-2.2.2/app/controllers/foo_controller.rb
unicorn-heroku-4.3.1.1.gc608.dirty test/rails/app-2.1.2/app/controllers/foo_controller.rb
unicorn-heroku-4.3.1.1.gc608.dirty test/rails/app-1.2.3/app/controllers/foo_controller.rb
unicorn-heroku-4.3.1.1.gc608.dirty test/rails/app-2.2.2/app/controllers/foo_controller.rb
unicorn-heroku-4.3.1.1.gc608.dirty test/rails/app-2.0.2/app/controllers/foo_controller.rb