From mboxrd@z Thu Jan 1 00:00:00 1970 Delivered-To: chneukirchen@gmail.com Received: by 10.204.72.79 with SMTP id l15cs272215bkj; Thu, 9 Jul 2009 13:42:32 -0700 (PDT) Return-Path: Received-SPF: pass (google.com: domain of grbounce-ceibQwUAAAB4YPBqaDIjI2bFOCxyyh3G=chneukirchen=gmail.com@googlegroups.com designates 10.150.192.3 as permitted sender) client-ip=10.150.192.3; Authentication-Results: mr.google.com; spf=pass (google.com: domain of grbounce-ceibQwUAAAB4YPBqaDIjI2bFOCxyyh3G=chneukirchen=gmail.com@googlegroups.com designates 10.150.192.3 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.150.192.3]) by 10.150.192.3 with SMTP id p3mr2078540ybf.24.1247172150970 (num_hops = 1); Thu, 09 Jul 2009 13:42:30 -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 :mime-version:content-type:received:date:x-ip:user-agent :x-http-useragent:x-http-via:message-id:subject:from: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=Bd+toLyM12VJQvRGTOj4CHodVoQ4cp+NsjhTddEndpQ=; b=lF11XJA1aAYIb/MLOPGoigs/F4UcIZ9bWUStslNX33BR72c2a2oe17y+LFxvRV4kbK BH0lg+DZZBvt7x5X95+OhnPoXMHGuuW7ArxhjsTmDp2hHMj3OkTZmG0PzMi1E+2NpXno LY3/Ka/nMHyhCmJ6JVx0ZgUC4tR+klyY9ZNmY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlegroups.com; s=beta; h=x-sender:x-apparently-to:mime-version:content-type:date:x-ip :user-agent:x-http-useragent:x-http-via:message-id:subject:from: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=DOdErXSk53KsTSZYOmkHw1yQWzfkmS3bvKPZC3ziGGGVnBhBhRJ5Vb5nKkb6ceJWpy /GAvbFiNcOx3QQyXTRbjmfAlnOCvLPx2I6FPZnhZcI+anJcro8Qnvub8WK/5bqFzdHRR 9AhOlTXwyK+svHVQ6QcEDXxCgdB2wQFZAKmhE= Received: by 10.150.192.3 with SMTP id p3mr309265ybf.24.1247172150782; Thu, 09 Jul 2009 13:42:30 -0700 (PDT) Received: by 10.177.124.26 with SMTP id b26gr1493yqn.0; Thu, 09 Jul 2009 13:42:25 -0700 (PDT) X-Sender: larimer@fantasybowl.com X-Apparently-To: rack-devel@googlegroups.com Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Received: by 10.100.95.19 with SMTP id s19mr319068anb.24.1247170915567; Thu, 09 Jul 2009 13:21:55 -0700 (PDT) Date: Thu, 9 Jul 2009 13:21:55 -0700 (PDT) X-IP: 198.22.122.4 User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.9) Gecko/2009040821 Firefox/3.0.9,gzip(gfe),gzip(gfe) X-HTTP-Via: 1.1 dsp03wsac.na.bestbuy.com:8080 (IronPort-WSA/6.0.0-538) Message-ID: Subject: request path_info being ignored? From: Mark Larimer To: Rack Development X-Google-Approved: kenneth.kalmer@gmail.com via web at 2009-07-09 20:42:24 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 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: def call(env) req = Rack::Request.new(env) req.path_info = "/people/12345/accounts.xml" @app.call(env) end 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=() call, it shows the new value. What am I missing? Thanks. --mark