rack-devel archive mirror (unofficial) https://groups.google.com/group/rack-devel
 help / color / mirror / Atom feed
From: Julien <julien.genestoux@gmail.com>
To: Rack Development <rack-devel@googlegroups.com>
Subject: Extract several POST Params with the same name
Date: Mon, 19 Oct 2009 18:32:00 -0700 (PDT)	[thread overview]
Message-ID: <72080a3b-08b6-4e21-8071-ffac95a8e531@e18g2000vbe.googlegroups.com> (raw)


Hi everyone,

In the context of creating a Hub for PubSubHubbub using Rails, it
seems that our app must be able to handle POST queries with multiple
occurences of params with the same name. (Please see this disucssion :
http://groups.google.com/group/pubsubhubbub/browse_thread/thread/bc971f0a4a99c446)

Right now, when I perform a call to my Rails app (which uses Rack)
with 2 params hub.mode having different values:

hub.mode=subscribe&hub.topic=http&hub.callback=http2&hub.verify=sync&hub.verify=async

Then, it seems that my app only sees that "last value", and params
["hub.verify"] = async.


I am not sure this is Rack's responsibility, but whil debugging I was
able to see that Rack had access to the right data in env
["rack.input"] and was able to "hack" that by forcing params
["hub.verify"] to be an arary containing both values.

Do you think that the HTTP params parser could be "fixed" to work with
that?

Thanks,

                 reply	other threads:[~2009-10-20  3:21 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=72080a3b-08b6-4e21-8071-ffac95a8e531@e18g2000vbe.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).