From mboxrd@z Thu Jan 1 00:00:00 1970 Delivered-To: chneukirchen@gmail.com Received: by 10.25.143.21 with SMTP id r21csp1212479lfd; Sun, 28 Jun 2015 13:46:58 -0700 (PDT) X-Received: by 10.52.126.11 with SMTP id mu11mr10004037vdb.8.1435524418451; Sun, 28 Jun 2015 13:46:58 -0700 (PDT) Return-Path: Received: from mail-vn0-x237.google.com (mail-vn0-x237.google.com. [2607:f8b0:400c:c0f::237]) by mx.google.com with ESMTPS id ke9si36988423vdb.55.2015.06.28.13.46.57 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 28 Jun 2015 13:46:58 -0700 (PDT) Received-SPF: pass (google.com: domain of rack-devel+bncBD75LW742ECRBQF2YGWAKGQEGUGPG7A@googlegroups.com designates 2607:f8b0:400c:c0f::237 as permitted sender) client-ip=2607:f8b0:400c:c0f::237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of rack-devel+bncBD75LW742ECRBQF2YGWAKGQEGUGPG7A@googlegroups.com designates 2607:f8b0:400c:c0f::237 as permitted sender) smtp.mail=rack-devel+bncBD75LW742ECRBQF2YGWAKGQEGUGPG7A@googlegroups.com; dkim=pass header.i=@googlegroups.com; dmarc=fail (p=NONE dis=NONE) header.from=gmail.com Received: by mail-vn0-x237.google.com with SMTP id f7sf37666545vnb.1; Sun, 28 Jun 2015 13:46:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20120806; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-type:x-original-sender:x-original-authentication-results :reply-to:precedence:mailing-list:list-id:x-spam-checked-in-group :list-post:list-help:list-archive:sender:list-subscribe :list-unsubscribe; bh=ognohbqXZp5nAvbOjI5/sBmHSgSrkX5AOJpf4tzqhe8=; b=mLWEcaxdN99e3VzJby5dCNCzsQMPuo8YZF18krlFSjyPiRG2AG4ArmmuZFXz39DBzl JonquWM3ijSrE65FdKUA4VTeNFf1fndSFCsJwkX0chZLgH6ykKXUSSa+Vg/wWEUEBoWx URVhpfuKI2E2Zsa+fNX+6ncJKtMrVic7ucq7aFRsdwOZJmSPK5VvOkxvkfi04PcL65cZ vOK/lLyajpAW30CaTFNDsqxp6NmdaQcxdBTvUYIMbyCkeyIO8xncztCwn/25hB1caFN2 +lUl+WKgQ0wUtw+FLyYveqmaBcZK6dWbG0YQ8pPO/ZtP3qVr2xRD4aWZ1GW6vd3Ylxic K0Yw== X-Received: by 10.50.23.71 with SMTP id k7mr112010igf.6.1435524417052; Sun, 28 Jun 2015 13:46:57 -0700 (PDT) X-BeenThere: rack-devel@googlegroups.com Received: by 10.107.47.7 with SMTP id j7ls1807037ioo.41.gmail; Sun, 28 Jun 2015 13:46:56 -0700 (PDT) X-Received: by 10.66.90.230 with SMTP id bz6mr15424275pab.40.1435524416433; Sun, 28 Jun 2015 13:46:56 -0700 (PDT) Received: from mail-ie0-x22d.google.com (mail-ie0-x22d.google.com. [2607:f8b0:4001:c03::22d]) by gmr-mx.google.com with ESMTPS id f17si485165igt.0.2015.06.28.13.46.56 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 28 Jun 2015 13:46:56 -0700 (PDT) Received-SPF: pass (google.com: domain of jftucker@gmail.com designates 2607:f8b0:4001:c03::22d as permitted sender) client-ip=2607:f8b0:4001:c03::22d; Received: by mail-ie0-x22d.google.com with SMTP id uq6so4368386iec.2 for ; Sun, 28 Jun 2015 13:46:56 -0700 (PDT) X-Received: by 10.107.156.140 with SMTP id f134mr15404373ioe.34.1435524416315; Sun, 28 Jun 2015 13:46:56 -0700 (PDT) MIME-Version: 1.0 References: <6816caae-e47e-4e9d-9897-70c2069200a0@googlegroups.com> <20150417204337.GA8711@dcvr.yhbt.net> <20150604021157.GA20396@dcvr.yhbt.net> In-Reply-To: From: James Tucker Date: Sun, 28 Jun 2015 20:46:46 +0000 Message-ID: Subject: Re: Close body object after socket hijacking or not? To: rack-devel@googlegroups.com, Hongli Lai Cc: Eric Wong Content-Type: multipart/alternative; boundary=001a1141b044e6a80405199a127b X-Original-Sender: jftucker@gmail.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of jftucker@gmail.com designates 2607:f8b0:4001:c03::22d as permitted sender) smtp.mail=jftucker@gmail.com; dmarc=pass (p=NONE dis=NONE) header.from=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: X-Spam-Checked-In-Group: rack-devel@googlegroups.com X-Google-Group-Id: 486215384060 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , --001a1141b044e6a80405199a127b Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Rack::Lock is a hack. Users wanting to operate with hijack should really not be doing this under Rack::Lock. Rack::Lock adds "server" (-like) semantics in the middle of the middleware stack, and can break conventions required between the app and the server for things like hijack. Regarding the calling of close, yes, this should be done. Rack::Lock is the most "visible" requirement to do this, but servers that support all of HTTP/1.1 (i.e. pipelining) will require this. It should be noted that some popular articles missed that this is what rack.hijack? is about, among other things. Sorry I missed this thread for so long, but I've been doing other things. Implementors with questions should feel free to cc me directly if I'm not picking up on stuff, I'll help where I can. On Thu, Jun 4, 2015 at 5:38 AM Marc-Andr=C3=A9 Cournoyer wrote: > Indeed, no support for hijacking planned in Thin atm. > > On Thu, Jun 4, 2015 at 2:53 AM, Hongli Lai wrote: > >> On Thu, Jun 4, 2015 at 4:11 AM, Eric Wong wrote: >> > Where does thin do this? I can see puma doing it, but it doesn't look >> > like thin supports hijack at all. >> > >> > git clone git://github.com/macournoyer/thin && cd thin && git grep -i >> hijack >> > >> >> You are right. It seems I am mistaken about this and got confused with >> another related aspect I was researching. >> >> I was researching >> https://github.com/ngauthier/tubesock/issues/10#issuecomment-72539461 >> and came to the conclusion that the bug doesn't occur in the same way >> on Thin, and somehow I got confused later on to conclude that Thin >> supports hijacking. >> > > > > -- > M-A > http://macournoyer.com > > -- > > --- > You received this message because you are subscribed to the Google Groups > "Rack Development" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to rack-devel+unsubscribe@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > --=20 ---=20 You received this message because you are subscribed to the Google Groups "= Rack Development" group. To unsubscribe from this group and stop receiving emails from it, send an e= mail to rack-devel+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/d/optout. --001a1141b044e6a80405199a127b Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Rack::Lock is a hack. Users wanting to operate with hijack= should really not be doing this under Rack::Lock.

Rack:= :Lock adds "server" (-like) semantics in the middle of the middle= ware stack, and can break conventions required between the app and the serv= er for things like hijack.

Regarding the calling o= f close, yes, this should be done. Rack::Lock is the most "visible&quo= t; requirement to do this, but servers that support all of HTTP/1.1 (i.e. p= ipelining) will require this. It should be noted that some popular articles= missed that this is what rack.hijack? is about, among other things.
<= div>
Sorry I missed this thread for so long, but I've bee= n doing other things. Implementors with questions should feel free to cc me= directly if I'm not picking up on stuff, I'll help where I can.

On Thu, Jun 4, 201= 5 at 5:38 AM Marc-Andr=C3=A9 Cournoyer <macournoyer@gmail.com> wrote:
Indeed, no support for hijacking planned in Thi= n atm.
On Thu, Jun 4, 2015 at 2:53 AM, Hongli Lai <= honglilai@gmail.com> wrote:
On Thu, Jun 4, 2015 at 4:11 AM, Eric Wong <e@80x24.org> wrote:
> Where does thin do this?=C2=A0 I can see puma doing it, but it doesn&#= 39;t look
> like thin supports hijack at all.
>
> git clone git://github.com/macournoyer/thin && cd thin && g= it grep -i hijack
> <no output from git grep>

You are right. It seems I am mistaken about this and got confused wi= th
another related aspect I was researching.

I was researching
https://github.com/ngauthier/tubesock/issues/10#is= suecomment-72539461
and came to the conclusion that the bug doesn't occur in the same way on Thin, and somehow I got confused later on to conclude that Thin
supports hijacking.



--

--

---
You received this message because you are subscribed to the Google Groups &= quot;Rack Development" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to rack-devel+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--

---
You received this message because you are subscribed to the Google Groups &= quot;Rack Development" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to rack-dev= el+unsubscribe@googlegroups.com.
For more options, visit http= s://groups.google.com/d/optout.
--001a1141b044e6a80405199a127b--