rack-devel archive mirror (unofficial) https://groups.google.com/group/rack-devel
 help / color / mirror / Atom feed
From: joshuamiller <elefantstn@gmail.com>
To: Rack Development <rack-devel@googlegroups.com>
Subject: Multipart Form-Data problem on Rack 1.1, not on Rack 1.0.1
Date: Wed, 26 May 2010 15:31:24 -0700 (PDT)	[thread overview]
Message-ID: <e72aa346-881f-4861-a946-1c69c0e79120@c11g2000vbe.googlegroups.com> (raw)

Hi all-

Ran into a problem today posting multipart form-data to Rack 1.1
running on Passenger 2.2.11 on Ruby 1.9.1 p378, where request#POST
returns nil.  The problem seems to come from here (line 142 of lib/
rack/request.rb):

      elsif @env["rack.request.form_input"].eql? @env["rack.input"]
        @env["rack.request.form_hash"]

The two env variables on the first line are both set to this,
according to show_exceptions:

#<PhusionPassenger::Utils::RewindableInput:0xccd8854 @io=#<UNIXSocket:
0xccd9408>, @rewindable_io=#<File:/tmp/RackRewindableInput26185-0>,
@unlinked=false>

But there is no env['rack.request.form_hash']

So def params does this...

    def params
      self.GET.update(self.POST)

and it breaks.  The error goes away when I back Rack down to 1.0.1.  I
tried to figure out where form_input and input get set so I could
rewind and see where the difference is, or where form_hash is supposed
to be set, but I'm stumped.

             reply	other threads:[~2010-05-26 22:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-26 22:31 joshuamiller [this message]
2010-05-27  1:26 ` Multipart Form-Data problem on Rack 1.1, not on Rack 1.0.1 joshuamiller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://groups.google.com/group/rack-devel

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e72aa346-881f-4861-a946-1c69c0e79120@c11g2000vbe.googlegroups.com \
    --to=rack-devel@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).