From mboxrd@z Thu Jan 1 00:00:00 1970 Delivered-To: chneukirchen@gmail.com Received: by 10.86.23.1 with SMTP id 1cs364520fgw; Wed, 16 Sep 2009 13:57:15 -0700 (PDT) Received-SPF: pass (google.com: domain of grbounce-ceibQwUAAAB4YPBqaDIjI2bFOCxyyh3G=chneukirchen=gmail.com@googlegroups.com designates 10.114.16.20 as permitted sender) client-ip=10.114.16.20; Authentication-Results: mr.google.com; spf=pass (google.com: domain of grbounce-ceibQwUAAAB4YPBqaDIjI2bFOCxyyh3G=chneukirchen=gmail.com@googlegroups.com designates 10.114.16.20 as permitted sender) smtp.mail=grbounce-ceibQwUAAAB4YPBqaDIjI2bFOCxyyh3G=chneukirchen=gmail.com@googlegroups.com; dkim=pass header.i=grbounce-ceibQwUAAAB4YPBqaDIjI2bFOCxyyh3G=chneukirchen=gmail.com@googlegroups.com Received: from mr.google.com ([10.114.16.20]) by 10.114.16.20 with SMTP id 20mr5932357wap.12.1253134633870 (num_hops = 1); Wed, 16 Sep 2009 13:57:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=beta; h=domainkey-signature:received:received:x-sender:x-apparently-to :received:received:received:received-spf:received:dkim-signature :domainkey-signature:mime-version:content-type:received:from:date :message-id:subject:to:x-google-approved:reply-to:sender:precedence :x-google-loop:mailing-list:list-id:list-post:list-help :list-unsubscribe:x-beenthere-env:x-beenthere; bh=Q+P0iaw2Bx8ZfOubFXV7Vq/Z3m+hDKWsl6tqotsg9pY=; b=B9oY29/dELfB4kI1wNicYtzkZZaa7ogniFWNfqHju18HwI6EiQfJexwzv124W552Mc g1rkOtHAstFQOJ9YV3W6aBdqxWvncOxQHc4axqD+d/v+coDG/YEuED1r2SA7RQp/mrLB Lxdhc3xM5U5zBPOQwMYzAhKCphP86XN2tiHa4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlegroups.com; s=beta; h=x-sender:x-apparently-to:received-spf:authentication-results :dkim-signature:domainkey-signature:mime-version:content-type:from :date:message-id:subject:to:x-google-approved:reply-to:sender :precedence:x-google-loop:mailing-list:list-id:list-post:list-help :list-unsubscribe:x-beenthere-env:x-beenthere; b=xofgBnRJsLVBE9nEFba2Qx/cGYcp34Ujs8TQvnT0+7053+GCVMIfOF3O25Fr19/18q g0xjKwiVrZ2R3kEWdI4JN6KFHaMOjIGcQZ0SD6BJyHAeV1UaDmShaYY50aQcLyc/g7ug ehiMHxgnPQmOYQ+X5NWpnRaoY4UcV4+cpCQVU= Received: by 10.114.16.20 with SMTP id 20mr840574wap.12.1253134633817; Wed, 16 Sep 2009 13:57:13 -0700 (PDT) Received: by 10.230.12.222 with SMTP id y30gr1670vby.0; Wed, 16 Sep 2009 13:57:11 -0700 (PDT) X-Sender: gustavold@gmail.com X-Apparently-To: rack-devel@googlegroups.com Received: by 10.150.43.18 with SMTP id q18mr5158056ybq.14.1253134233277; Wed, 16 Sep 2009 13:50:33 -0700 (PDT) Received: by 10.150.43.18 with SMTP id q18mr5158055ybq.14.1253134233257; Wed, 16 Sep 2009 13:50:33 -0700 (PDT) Return-Path: Received: from mail-yw0-f196.google.com (mail-yw0-f196.google.com [209.85.211.196]) by gmr-mx.google.com with ESMTP id 18si855909ywh.1.2009.09.16.13.50.32; Wed, 16 Sep 2009 13:50:32 -0700 (PDT) Received-SPF: pass (google.com: domain of gustavold@gmail.com designates 209.85.211.196 as permitted sender) client-ip=209.85.211.196; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of gustavold@gmail.com designates 209.85.211.196 as permitted sender) smtp.mail=gustavold@gmail.com; dkim=pass (test mode) header.i=@gmail.com Received: by mail-yw0-f196.google.com with SMTP id 34so592178ywh.10 for ; Wed, 16 Sep 2009 13:50:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:from:date:message-id :subject:to:content-type; bh=LCuSGH0xlMFMk9gkSxsS5R9V838UJnMliFrn8KPmQ3c=; b=KS8Evv9fi8vTXFLkwNYpl9BQkX2KtQRM/n3N7DKhOvIzjIDMmfO/7NLwgLcn1EGQoi NXijRlDGt2axlK6CCr0YHW26+uxJHsFbi2oA9G9MFZgjyWgSLH9XMCbdTsQh2RS4U6Dz TCCSfdfUKusfCwRQTYnfNAvfSGnfjY2w95ZCE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=DPnB2xW6PV1uPAfhhq5ZjQpJ7Q89VzA/7EH7K/I+x+QnGJX7QfgVLKkgau2lbwT3wB pQac0KK41gW1wSz8vIiAUGtbuEaQpIKdg55eefFj5mZt/pUKwt1+SsWfCCb+ybhBs+Dv beMz2MRe7mUodGRllc4dRjBo8DbeekP2xqFNI= Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Received: by 10.100.192.12 with SMTP id p12mr9360555anf.142.1253134232139; Wed, 16 Sep 2009 13:50:32 -0700 (PDT) From: Gustavo Luiz Duarte Date: Wed, 16 Sep 2009 17:50:12 -0300 Message-ID: Subject: How to change the body of a POST? To: rack-devel@googlegroups.com X-Google-Approved: m.fellinger@gmail.com via web at 2009-09-16 20:57:09 Reply-To: rack-devel@googlegroups.com Sender: rack-devel@googlegroups.com Precedence: bulk X-Google-Loop: groups Mailing-List: list rack-devel@googlegroups.com; contact rack-devel+owner@googlegroups.com List-Id: List-Post: List-Help: List-Unsubscribe: , X-BeenThere-Env: rack-devel@googlegroups.com X-BeenThere: rack-devel@googlegroups.com 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? []'s Gustavo