From mboxrd@z Thu Jan 1 00:00:00 1970 Delivered-To: chneukirchen@gmail.com Received: by 10.142.191.1 with SMTP id o1cs207084wff; Tue, 8 Dec 2009 21:55:52 -0800 (PST) Received: from mr.google.com ([10.91.164.38]) by 10.91.164.38 with SMTP id r38mr11594019ago.5.1260338150951 (num_hops = 1); Tue, 08 Dec 2009 21:55:50 -0800 (PST) Received: by 10.91.164.38 with SMTP id r38mr1325146ago.5.1260338149353; Tue, 08 Dec 2009 21:55:49 -0800 (PST) X-BeenThere: rack-devel@googlegroups.com Received: by 10.90.244.1 with SMTP id r1ls106009agh.1.p; Tue, 08 Dec 2009 21:55:48 -0800 (PST) Received: by 10.90.24.14 with SMTP id 14mr11600274agx.13.1260338148217; Tue, 08 Dec 2009 21:55:48 -0800 (PST) Received: by 10.90.24.14 with SMTP id 14mr11600273agx.13.1260338148192; Tue, 08 Dec 2009 21:55:48 -0800 (PST) Return-Path: Received: from mail-yx0-f140.google.com (mail-yx0-f140.google.com [209.85.210.140]) by gmr-mx.google.com with ESMTP id 18si706821yxe.8.2009.12.08.21.55.48; Tue, 08 Dec 2009 21:55:48 -0800 (PST) Received-SPF: pass (google.com: domain of bosko.milekic@gmail.com designates 209.85.210.140 as permitted sender) client-ip=209.85.210.140; Received: by mail-yx0-f140.google.com with SMTP id 4so10666292yxe.32 for ; Tue, 08 Dec 2009 21:55:48 -0800 (PST) MIME-Version: 1.0 Received: by 10.150.27.29 with SMTP id a29mr1012789yba.28.1260338147926; Tue, 08 Dec 2009 21:55:47 -0800 (PST) Date: Tue, 8 Dec 2009 21:55:47 -0800 (PST) In-Reply-To: X-IP: 96.22.111.152 References: User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_8; en-us) AppleWebKit/531.21.8 (KHTML, like Gecko) Version/4.0.4 Safari/531.21.10,gzip(gfe),gzip(gfe) Message-ID: <1f03994d-cf83-4f3f-af03-d1eb64565191@b15g2000yqd.googlegroups.com> Subject: Re: RQFR: multipart bug From: Bosko Milekic To: Rack Development X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of bosko.milekic@gmail.com designates 209.85.210.140 as permitted sender) smtp.mail=bosko.milekic@gmail.com X-Original-Sender: bosko.milekic@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: X-Thread-Url: http://groups.google.com/group/rack-devel/t/ce7315f79cf0cdfc X-Message-Url: http://groups.google.com/group/rack-devel/msg/fa4586f1e46aa72 Sender: rack-devel@googlegroups.com List-Unsubscribe: , List-Subscribe: , Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Nov 11, 3:53=A0pm, Bosko Milekic wrote: > On Nov 6, 1:01=A0pm, Christian Neukirchen > wrote: > > > > Introduce failing test case for multipart parser when it slices > > > exactly on a boundary and patch multipart parser so it passes it - > > > the failing test case comes with a sample payload specific to the > > > fact that the default bufsize used by the multipart parser is > > > exactly 16384. =A0should this default be changed, the test will no > > > longer apply. > > >http://github.com/bloom/rack/commit/8f4bfced74e7a07d0f0f47705b763c7ef... > > Obviously I'll +1 here, but I'm clearly biased. :-) > > In all honesty, though, I think the "correct" thing to do is rewrite > the multi-parser method, which is really non obvious and not exactly > what one would call idiomatic ruby, but since this is much easier said > than done, I'm all for patching the edge case. =A0Took a while to > isolate this, especially since only Safari was sending payloads that > happened to, in very specific and isolated cases, fall exactly on the > end of the boundary at the 16384 byte offset. > > Best, > Bosko FWIW: Feel free to pull bloom/rack. gdi contributed a cleaner fix and tests and we've been running this in production for a month now. Best, Bosko