rack-devel archive mirror (unofficial) https://groups.google.com/group/rack-devel
 help / color / mirror / Atom feed
From: Hongli Lai <hongli@phusion.nl>
To: Rack Development <rack-devel@googlegroups.com>
Subject: Re: How to change the body of a POST?
Date: Mon, 21 Sep 2009 00:46:29 -0700 (PDT)	[thread overview]
Message-ID: <543f81d8-0f16-4ffb-8a3c-26110bdb4186@l31g2000vbp.googlegroups.com> (raw)
In-Reply-To: <bd4d39940909161350p4203610sf78a3871a45ec129@mail.gmail.com>


On Sep 16, 10:50 pm, Gustavo Luiz Duarte <gustav...@gmail.com> wrote:
> Hi,
>
> I want to write a rack middleware to intercept an HTTP POST request,
> change its body, and pass it to rails.
> The body is XML (REST) and I intend to change it using XSLT.
> I couldn't find a way to do it.
> I tried to change env['rack.input'], but no success as it has no
> impact in the controller's params (the way I access the xml structure
> inside the controller).
> Is it possible to do it with Rack? Should it be? How?

It should be possible if you substitute env['rack.input'] with your
own before the web framework has accessed it.

      reply	other threads:[~2009-09-21  7:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-16 20:50 How to change the body of a POST? Gustavo Luiz Duarte
2009-09-21  7:46 ` Hongli Lai [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=543f81d8-0f16-4ffb-8a3c-26110bdb4186@l31g2000vbp.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).