Parent

Methods

Heroku::Kensa::PostProxy

Public Class Methods

new(sso) click to toggle source
# File lib/heroku/kensa/post_proxy.rb, line 4
def initialize(sso)
  @params = sso.query_params
  @sso = sso
  super :Port => sso.proxy_port, :AccessLog => WEBrick::Log.new(StringIO.new),
          :Logger => WEBrick::Log.new(StringIO.new)
end

Public Instance Methods

service(req, res) click to toggle source
# File lib/heroku/kensa/post_proxy.rb, line 11
def service(req, res)
  res.status = 200
  res.body =       <html>        <head>          <script type="text/javascript">            window.onload = function() { document.forms[0].submit() }          </script>        </head>        <body>          <form action="#{@sso.post_url}" method="POST">            #{ @params.map do |key, value|                %|<input type="hidden" name="#{key}" value="#{value}" />|               end.join("\n")               }          </form>        </body>      </html>
  res["Content-Length"] = res.body.size
  @status = :Shutdown
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.