From mboxrd@z Thu Jan 1 00:00:00 1970 Delivered-To: chneukirchen@gmail.com Received: by 10.204.72.79 with SMTP id l15cs273302bkj; Thu, 9 Jul 2009 14:30:30 -0700 (PDT) Received-SPF: pass (google.com: domain of grbounce-ceibQwUAAAB4YPBqaDIjI2bFOCxyyh3G=chneukirchen=gmail.com@googlegroups.com designates 10.100.95.15 as permitted sender) client-ip=10.100.95.15; Authentication-Results: mr.google.com; spf=pass (google.com: domain of grbounce-ceibQwUAAAB4YPBqaDIjI2bFOCxyyh3G=chneukirchen=gmail.com@googlegroups.com designates 10.100.95.15 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.100.95.15]) by 10.100.95.15 with SMTP id s15mr2264555anb.26.1247175029848 (num_hops = 1); Thu, 09 Jul 2009 14:30:29 -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-spf:authentication-results:received :dkim-signature:domainkey-signature:mime-version:received :in-reply-to:references:from:date:message-id:subject:to:content-type :content-transfer-encoding:reply-to:sender:precedence:x-google-loop :mailing-list:list-id:list-post:list-help:list-unsubscribe :x-beenthere-env:x-beenthere; bh=bhCy47Ibu4aDbDT74LjtknWsGT+aa5yw4hd89EWk01M=; b=qdUaM1cDwE6mEYSZBw6eJuMc9QH1LIDDgLP2BD/Ibc6QYUqUZfJb6x1skI5kieEBd0 a96VDm0eDKdT99ZYklFuoR6/fpmxP3GK8dm8FRNCF2kOrquGUbrqUnRSen4tpJcvZCX+ uHiT7iU2bgj/LMPwMLpEzc2PR/RAgYeflJC9A= 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:in-reply-to :references:from:date:message-id:subject:to:content-type :content-transfer-encoding:reply-to:sender:precedence:x-google-loop :mailing-list:list-id:list-post:list-help:list-unsubscribe :x-beenthere-env:x-beenthere; b=GWThCTmBclPnH82zVvkyOI0+gDRQ8tUfxwX3bOE1kCJkEZBUVV5wN06msyz70kBhFf 1HJREav789vc9k/DUBq+wIQ0UywrmZ292fKirHTd5JHo1mLkW+x40t5/WhoHtDpL03CW 9kXZDWkgvVusu6ooAzlTosP1s17biPO1Zc1DI= Received: by 10.100.95.15 with SMTP id s15mr334365anb.26.1247175029649; Thu, 09 Jul 2009 14:30:29 -0700 (PDT) Received: by 10.176.92.3 with SMTP id p3gr1494yqb.0; Thu, 09 Jul 2009 14:30:23 -0700 (PDT) X-Sender: joshpeek@gmail.com X-Apparently-To: rack-devel@googlegroups.com Received: by 10.86.70.11 with SMTP id s11mr17396fga.3.1247175023441; Thu, 09 Jul 2009 14:30:23 -0700 (PDT) Return-Path: Received: from mail-bw0-f221.google.com (mail-bw0-f221.google.com [209.85.218.221]) by gmr-mx.google.com with ESMTP id 3si16332fgg.15.2009.07.09.14.30.22; Thu, 09 Jul 2009 14:30:22 -0700 (PDT) Received-SPF: pass (google.com: domain of joshpeek@gmail.com designates 209.85.218.221 as permitted sender) client-ip=209.85.218.221; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of joshpeek@gmail.com designates 209.85.218.221 as permitted sender) smtp.mail=joshpeek@gmail.com; dkim=pass (test mode) header.i=@gmail.com Received: by mail-bw0-f221.google.com with SMTP id 21so732155bwz.0 for ; Thu, 09 Jul 2009 14:30:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:from:date:x-google-sender-auth:message-id:subject:to :content-type:content-transfer-encoding; bh=0LXR/jvUVO+wlTsrxJGujXZ4oPc1ydOpB2KyYa3jDhs=; b=eX1w0xcsignfZCOFg5l2Hh+kh2sYB4eepCPDOUNShqOvLvlsfgvvImKRwEpgjOpj8f 4qIsL6W0HF5El3Nkj4XAFmiT/IDFGDOuzeIDE6bXdJ6v5JgFDs0JTvjVAxJn3dCihuKS EHxpFmuClma40r2TmwDFjMH8XB3SLDoguz7Lc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:content-type :content-transfer-encoding; b=J8JrwIU/4gu9xfWtEPSE0Gtj9pyr7NTT8B4TUxTJqtYBXV8UB66BxExIhrazqBCWhK tCrW9kEcd9LtoI1ZWmmoADc3v41AFgpWe+w68Tg75kCKgOytM9u39wNe/rIafllU3QXj LwRH/UANK6P6th9PHvSvRZDzaHekTfYldATto= MIME-Version: 1.0 Received: by 10.204.55.199 with SMTP id v7mr1136566bkg.141.1247175022099; Thu, 09 Jul 2009 14:30:22 -0700 (PDT) In-Reply-To: References: From: Joshua Peek Date: Thu, 9 Jul 2009 16:30:02 -0500 Message-ID: <1c5622660907091430v5ed9455dh6ac3fa9a73eca60b@mail.gmail.com> Subject: Re: request path_info being ignored? To: rack-devel@googlegroups.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 Rails uses request uri instead of path info. I feel this is incorrect, but its the current behavior. You'll need to update REQUEST_URI as well. On Thu, Jul 9, 2009 at 3:21 PM, Mark Larimer wrote= : > > I've got Rack fronting a Rails 2.3.2 app. And I wrote some Rack > middleware to do a simple rewrite of the request url. Here is a > simplified version of the call() method: > > =C2=A0def call(env) > =C2=A0 =C2=A0req =3D Rack::Request.new(env) > =C2=A0 =C2=A0req.path_info =3D "/people/12345/accounts.xml" > =C2=A0 =C2=A0@app.call(env) > =C2=A0end > > When Rack operates on this request and passes control through to the > Rails app, I expect the Rails router to call the index method of the > accounts controller...but instead the path_info that was set in the > middleware method is being completely ignored, and Rails is routing > based on the original path. > > If I look at env['PATH_INFO'] after the req.path_info=3D() call, it > shows the new value. > > What am I missing? > > Thanks. > --mark > --=20 Joshua Peek