rack-devel archive mirror (unofficial) https://groups.google.com/group/rack-devel
 help / color / mirror / Atom feed
From: John Firebaugh <john.firebaugh@gmail.com>
To: rack-devel@googlegroups.com, rubyonrails-core@googlegroups.com
Subject: Re: Rack::Response#body vs ActionDispatch::Response#body
Date: Tue, 30 Nov 2010 16:52:11 -0800	[thread overview]
Message-ID: <AANLkTin=XLRZvz2PM+-SuOB8eh-mP8qWc9aOjyVSe+r1@mail.gmail.com> (raw)
In-Reply-To: <77B5E57A-44A8-4911-B28F-FAF45062E0BF@finn.de>

On Tue, Nov 30, 2010 at 3:27 PM, Konstantin Haase <k.haase@finn.de> 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.

      reply	other threads:[~2010-12-01  0:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-30 22:52 Rack::Response#body vs ActionDispatch::Response#body John Firebaugh
2010-11-30 23:27 ` Konstantin Haase
2010-12-01  0:52   ` John Firebaugh [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='AANLkTin=XLRZvz2PM+-SuOB8eh-mP8qWc9aOjyVSe+r1@mail.gmail.com' \
    --to=rack-devel@googlegroups.com \
    --cc=rubyonrails-core@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).