From: joshuamiller <elefantstn@gmail.com>
To: Rack Development <rack-devel@googlegroups.com>
Subject: Re: Multipart Form-Data problem on Rack 1.1, not on Rack 1.0.1
Date: Wed, 26 May 2010 18:26:42 -0700 (PDT) [thread overview]
Message-ID: <bfd3a479-e726-4e83-b0ca-3609a299517d@c22g2000vbb.googlegroups.com> (raw)
In-Reply-To: <e72aa346-881f-4861-a946-1c69c0e79120@c11g2000vbe.googlegroups.com>
To answer my own question here, the problem seems to have come from
the last multipart boundary ending like --boundary instead of --
boundary-- which slightly broke something in Passenger's param
parsing, and the 1.0.1 behavior (from before the Content-Type change)
silently allowed it, whereas the 1.1 behavior got stuck. Might be
worth making sure @env['rack.request.form_hash'] exists before
returning it, but the specific problem here was definitely on the
client end.
On May 26, 6:31 pm, joshuamiller <elefant...@gmail.com> wrote:
> 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.
prev parent reply other threads:[~2010-05-27 1:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-26 22:31 Multipart Form-Data problem on Rack 1.1, not on Rack 1.0.1 joshuamiller
2010-05-27 1:26 ` joshuamiller [this message]
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=bfd3a479-e726-4e83-b0ca-3609a299517d@c22g2000vbb.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).