From mboxrd@z Thu Jan 1 00:00:00 1970 Delivered-To: chneukirchen@gmail.com Received: by 10.229.225.21 with SMTP id iq21cs47922qcb; Tue, 30 Nov 2010 16:52:37 -0800 (PST) Return-Path: Received-SPF: pass (google.com: domain of rack-devel+bncCIDu1sPnGBDSuNbnBBoE08IKWQ@googlegroups.com designates 10.216.239.10 as permitted sender) client-ip=10.216.239.10; Authentication-Results: mr.google.com; spf=pass (google.com: domain of rack-devel+bncCIDu1sPnGBDSuNbnBBoE08IKWQ@googlegroups.com designates 10.216.239.10 as permitted sender) smtp.mail=rack-devel+bncCIDu1sPnGBDSuNbnBBoE08IKWQ@googlegroups.com; dkim=pass header.i=rack-devel+bncCIDu1sPnGBDSuNbnBBoE08IKWQ@googlegroups.com Received: from mr.google.com ([10.216.239.10]) by 10.216.239.10 with SMTP id b10mr1265102wer.6.1291164756694 (num_hops = 1); Tue, 30 Nov 2010 16:52:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=beta; h=domainkey-signature:received:x-beenthere:received:received:received :received:received-spf:received:received:mime-version:received :in-reply-to:references:from:date:message-id:subject:to :x-original-sender:x-original-authentication-results:reply-to :precedence:mailing-list:list-id:list-post:list-help:list-archive :sender:list-subscribe:list-unsubscribe:content-type; bh=jlThUzP74RTfL6hlK+N0wkukHMzOLXZFmoRJtbbnEWw=; b=fz+DGVr/AwulvFw9OKAr8SCO2Oc+0c7d9d/l5fpdqMLK6LItcdrGNeyAHkbvGoHcse s8YC+BiR0G2HURS48pNsc5rbteWJw554Zm8aN/ST3BbZCMAGn/aT5FU0OeBFQhCVV3bS a/rKZrMhIcoE9EXxLDVqu3J5OqcBBDJoGMkpM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlegroups.com; s=beta; h=x-beenthere:received-spf:mime-version:in-reply-to:references:from :date:message-id:subject:to:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:sender:list-subscribe :list-unsubscribe:content-type; b=ZW3ZDENW1B7DtpccEv/t6hcV+E/gfJ5LHMmW0/2+TJ9A3UfRAA/CvTny/EeBUHK6DB U4QaB8+dx9vg7Z5zzIgASe6IamZrDtf3gR+VdzBk2NIdNq8/kyoue+I9+pvd3TLR2oug Yw/o3VtC0tTuJMoffBkESNsLJim9vTjwC6OC4= Received: by 10.216.239.10 with SMTP id b10mr295616wer.6.1291164754269; Tue, 30 Nov 2010 16:52:34 -0800 (PST) X-BeenThere: rack-devel@googlegroups.com Received: by 10.227.6.216 with SMTP id a24ls1460047wba.2.p; Tue, 30 Nov 2010 16:52:33 -0800 (PST) Received: by 10.227.128.4 with SMTP id i4mr399444wbs.13.1291164752647; Tue, 30 Nov 2010 16:52:32 -0800 (PST) Received: by 10.227.128.4 with SMTP id i4mr399443wbs.13.1291164752595; Tue, 30 Nov 2010 16:52:32 -0800 (PST) Received: from mail-ww0-f45.google.com (mail-ww0-f45.google.com [74.125.82.45]) by gmr-mx.google.com with ESMTP id y33si17526wbd.6.2010.11.30.16.52.31; Tue, 30 Nov 2010 16:52:31 -0800 (PST) Received-SPF: pass (google.com: domain of john.firebaugh@gmail.com designates 74.125.82.45 as permitted sender) client-ip=74.125.82.45; Received: by wwb29 with SMTP id 29so341826wwb.2 for ; Tue, 30 Nov 2010 16:52:31 -0800 (PST) Received: by 10.216.231.146 with SMTP id l18mr1553936weq.52.1291164751391; Tue, 30 Nov 2010 16:52:31 -0800 (PST) MIME-Version: 1.0 Received: by 10.216.2.213 with HTTP; Tue, 30 Nov 2010 16:52:11 -0800 (PST) In-Reply-To: <77B5E57A-44A8-4911-B28F-FAF45062E0BF@finn.de> References: <77B5E57A-44A8-4911-B28F-FAF45062E0BF@finn.de> From: John Firebaugh Date: Tue, 30 Nov 2010 16:52:11 -0800 Message-ID: Subject: Re: Rack::Response#body vs ActionDispatch::Response#body To: rack-devel@googlegroups.com, rubyonrails-core@googlegroups.com X-Original-Sender: john.firebaugh@gmail.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of john.firebaugh@gmail.com designates 74.125.82.45 as permitted sender) smtp.mail=john.firebaugh@gmail.com; dkim=pass (test mode) header.i=@gmail.com Reply-To: rack-devel@googlegroups.com Precedence: list Mailing-list: list rack-devel@googlegroups.com; contact rack-devel+owners@googlegroups.com List-ID: List-Post: , List-Help: , List-Archive: Sender: rack-devel@googlegroups.com List-Subscribe: , List-Unsubscribe: , Content-Type: text/plain; charset=ISO-8859-1 On Tue, Nov 30, 2010 at 3:27 PM, Konstantin Haase wrote: > Why not override #close in ActionDispatch::Response to avoid this issue? I agree that would fix this particular issue. My reluctance with that is that AD::Response#body would remain a dangerous method on its own, because it does not obey the semantics established by the base class. It's a Liskov Substitution Principle violation -- AD::Response cannot be safely substituted where Rack::Response is expected.