From mboxrd@z Thu Jan 1 00:00:00 1970 Delivered-To: chneukirchen@gmail.com Received: by 10.204.72.79 with SMTP id l15cs187433bkj; Sat, 20 Jun 2009 07:52:23 -0700 (PDT) Received-SPF: pass (google.com: domain of grbounce-ceibQwUAAAB4YPBqaDIjI2bFOCxyyh3G=chneukirchen=gmail.com@googlegroups.com designates 10.90.54.5 as permitted sender) client-ip=10.90.54.5; Authentication-Results: mr.google.com; spf=pass (google.com: domain of grbounce-ceibQwUAAAB4YPBqaDIjI2bFOCxyyh3G=chneukirchen=gmail.com@googlegroups.com designates 10.90.54.5 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.90.54.5]) by 10.90.54.5 with SMTP id c5mr4927272aga.18.1245509542253 (num_hops = 1); Sat, 20 Jun 2009 07:52:22 -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 :received:received:received-spf:authentication-results:received :x-virus-scanned:received:received:message-id:date:from:user-agent :mime-version:content-type:to:subject:x-enigmail-version :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=ONPqJIWbF0NhiQbLs9bxpt8XOJxWZylNRvRAsp2XWSg=; b=FoorNb7VFFlT4xgxw+3loz9Xn/uYprEhMPTKTYC/tXl/IMIQVhZxfKvUQwMqhB4KFh jxQbPPs8zu122NuFyvpnaw7w9CuYMYmjGTHpZQk5dsBUo9na/TjGwt/Ol8AG5qlY5dHH 9rA6Nt4H/h4xgd3vOt4QRViO7iugjI76Ryj18= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlegroups.com; s=beta; h=x-sender:x-apparently-to:received-spf:authentication-results :x-virus-scanned:message-id:date:from:user-agent:mime-version :content-type:to:subject:x-enigmail-version: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=uRmUoa9lpP/WG6XgBYOCiGB1y2QtbaN+V2RRLx6dHpTdKJrMEZ7JS36o14jahKvjKP CgffRYFPB9OQg0zLX4ZbfDbRRFcB3pX4JRKIB9zTRs3xkRdSzhXWnlhbugYlFtXKWg0c XC/dBZMxhPmmAX+4X/y/Zko5fomRkGEbyLa14= Received: by 10.90.54.5 with SMTP id c5mr634364aga.18.1245509542054; Sat, 20 Jun 2009 07:52:22 -0700 (PDT) Received: by 10.177.37.21 with SMTP id p21gr1464yqj.0; Sat, 20 Jun 2009 07:52:08 -0700 (PDT) X-Sender: lasso@lassoweb.se X-Apparently-To: rack-devel@googlegroups.com Received: by 10.223.113.9 with SMTP id y9mr74641fap.2.1245493628466; Sat, 20 Jun 2009 03:27:08 -0700 (PDT) Return-Path: Received: from atmail.alltele.net (atmail.alltele.net [79.138.0.140]) by gmr-mx.google.com with ESMTP id d8si187924fga.9.2009.06.20.03.27.08; Sat, 20 Jun 2009 03:27:08 -0700 (PDT) Received-SPF: neutral (google.com: 79.138.0.140 is neither permitted nor denied by best guess record for domain of lasso@lassoweb.se) client-ip=79.138.0.140; Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 79.138.0.140 is neither permitted nor denied by best guess record for domain of lasso@lassoweb.se) smtp.mail=lasso@lassoweb.se Received: from localhost (unknown [127.0.0.1]) by atmail.alltele.net (Postfix) with ESMTP id 5FB7E3FF870 for ; Sat, 20 Jun 2009 12:18:16 +0200 (CEST) X-Virus-Scanned: amavisd-new at alltele.net Received: from atmail.alltele.net ([127.0.0.1]) by localhost (atmail.alltele.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8CTFPy096XYP for ; Sat, 20 Jun 2009 12:18:13 +0200 (CEST) Received: from [192.168.1.65] (16.12.95.91.static.gbdn.siw.siwnet.net [91.95.12.16]) (Authenticated sender: lasso@coolbox.se) by atmail.alltele.net (Postfix) with ESMTP id 9CDC13FF856 for ; Sat, 20 Jun 2009 12:18:13 +0200 (CEST) Message-ID: <4A3CB978.6000100@lassoweb.se> Date: Sat, 20 Jun 2009 12:27:04 +0200 From: Lars Olsson User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1b3pre) Gecko/20090513 Fedora/3.0-2.3.beta2.fc11 Lightning/1.0pre Thunderbird/3.0b2 Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 To: rack-devel@googlegroups.com Subject: Suggestion: Uppercase extensions should be downcased X-Enigmail-Version: 0.96a X-Google-Approved: james.britt@gmail.com via email at 2009-06-20 14:52:08 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 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='application/octet-stream') MIME_TYPES.fetch(ext, fallback) end This gives me trouble when the file extension includes uppercase letters as nothing in MIME_TYPES is matching. I think the code should be changed to: def mime_type(ext, fallback='application/octet-stream') MIME_TYPES.fetch(ext.downcase, fallback) end which makes extensions like .JPG work again. Sincerely yours /lasso -- ________________________________________ Lars Olsson lasso@lassoweb.se http://www.lassoweb.se/