From mboxrd@z Thu Jan 1 00:00:00 1970 Delivered-To: chneukirchen@gmail.com Received: by 10.204.72.79 with SMTP id l15cs318571bkj; Tue, 23 Jun 2009 12:08:02 -0700 (PDT) Return-Path: Received-SPF: pass (google.com: domain of grbounce-ceibQwUAAAB4YPBqaDIjI2bFOCxyyh3G=chneukirchen=gmail.com@googlegroups.com designates 10.150.154.6 as permitted sender) client-ip=10.150.154.6; Authentication-Results: mr.google.com; spf=pass (google.com: domain of grbounce-ceibQwUAAAB4YPBqaDIjI2bFOCxyyh3G=chneukirchen=gmail.com@googlegroups.com designates 10.150.154.6 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.154.6]) by 10.150.154.6 with SMTP id b6mr876225ybe.21.1245784081667 (num_hops = 1); Tue, 23 Jun 2009 12:08:01 -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:content-transfer-encoding:received:date :in-reply-to:x-ip:references:user-agent:x-http-useragent: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=qFf5N8c2OVHOZ3IbfttJTTHKfoWyXyq0vJm+EjgtXtM=; b=FEAYyHR5p8D608QysOYjgJA4KwH3ez/lqdZHZweAtOPRZERhlBd/JSwy02wwss/6X7 I8P2R4AGzSz0rhPe2CDBDuNzbYG3uMGhyBmQKvajCVSujiMKBT2BH6oWTWWi+1EZkSsF /q5niPiSKPAtaV0cDBGwcFfxw6kydBbE4ux8k= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlegroups.com; s=beta; h=x-sender:x-apparently-to:mime-version:content-type :content-transfer-encoding:date:in-reply-to:x-ip:references :user-agent:x-http-useragent: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=yl9nCfomZhjA2JdSzlIrhYYJfdBKYDXnHxjIxaCs2UpCmTyN6GTfWxNhper8G8ILXs 9kwc68pRCkmCimYV3DWt0OnjRxCSf1K1XS+YiODtN+r8GbyDlNJl/4wpg0EBgXZWJbNf sKwTWfsVYa+l1HW6Y6MzfEMj9VVC6QwB9neSw= Received: by 10.150.154.6 with SMTP id b6mr117376ybe.21.1245784081474; Tue, 23 Jun 2009 12:08:01 -0700 (PDT) Received: by 10.177.45.36 with SMTP id x36gr1466yqj.0; Tue, 23 Jun 2009 12:07:48 -0700 (PDT) X-Sender: lasso@lassoweb.se X-Apparently-To: rack-devel@googlegroups.com Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Received: by 10.151.112.12 with SMTP id p12mr115009ybm.1.1245782426873; Tue, 23 Jun 2009 11:40:26 -0700 (PDT) Date: Tue, 23 Jun 2009 11:40:26 -0700 (PDT) In-Reply-To: <9c00d3e00906230645p7249dc2el24783433d5820be3@mail.gmail.com> X-IP: 91.95.12.16 References: <4A3CB978.6000100@lassoweb.se> <9c00d3e00906230645p7249dc2el24783433d5820be3@mail.gmail.com> User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; sv-SE; rv:1.9.1b4) Gecko/20090427 Fedora/3.5-0.20.beta4.fc11 Firefox/3.5b4,gzip(gfe),gzip(gfe) Message-ID: Subject: Re: Suggestion: Uppercase extensions should be downcased From: Lars Olsson To: Rack Development X-Google-Approved: james.britt@gmail.com via email at 2009-06-23 19:07:47 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 On 23 Juni, 15:45, Michael Fellinger wrote: > On Sat, Jun 20, 2009 at 7:27 PM, Lars Olsson wrote: > > > Hello! > > > While working with some files created on Windows in Ramaze i discoved > > that the web server returned the wrong content-type in some cases. I > > tracked this down to the mime_type function in rack. > > > (from file rack/lib/rack/mime.rb) > > def mime_type(ext, fallback=3D'application/octet-stream') > > =A0 =A0MIME_TYPES.fetch(ext, fallback) > > end > > > This gives me trouble when the file extension includes uppercase letter= s > > as nothing in MIME_TYPES is matching. I think the code should be change= d to: > > > def mime_type(ext, fallback=3D'application/octet-stream') > > =A0 =A0MIME_TYPES.fetch(ext.downcase, fallback) > > end > > > which makes extensions like .JPG work again. > > OK, pushed a patch for that. > > -- > ^ manveru Thanks! /lasso