From mboxrd@z Thu Jan 1 00:00:00 1970 Delivered-To: chneukirchen@gmail.com Received: by 10.204.72.79 with SMTP id l15cs74236bkj; Thu, 27 Aug 2009 19:32:02 -0700 (PDT) Received-SPF: pass (google.com: domain of grbounce-ceibQwUAAAB4YPBqaDIjI2bFOCxyyh3G=chneukirchen=gmail.com@googlegroups.com designates 10.224.45.7 as permitted sender) client-ip=10.224.45.7; Authentication-Results: mr.google.com; spf=pass (google.com: domain of grbounce-ceibQwUAAAB4YPBqaDIjI2bFOCxyyh3G=chneukirchen=gmail.com@googlegroups.com designates 10.224.45.7 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.224.45.7]) by 10.224.45.7 with SMTP id c7mr1087646qaf.14.1251426721540 (num_hops = 1); Thu, 27 Aug 2009 19:32: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 :received:received:received:received-spf:received:received:received :from:to:subject:date:user-agent:mime-version:content-type :content-transfer-encoding:message-id: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=jSXUJ8wGZ2s37AgpkKBLuhFtgZnC0q3hKwShM14n3tk=; b=lNsr7niwEVYx5M39A2GkoqJXqlx4vvZwxaTVfjjYR9BMKV3TBXMNkAJdI5BBOhwjXS rk14zfrd2hCUkOGixcLgmCnWsJesJ3vpUtc1dfSZipNQXTfS72JL3VN8DPVBWdj42Jpq +GgczxdU2lOodkBwegt82LJafux2nptOzHlHI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlegroups.com; s=beta; h=x-sender:x-apparently-to:received-spf:authentication-results:from :to:subject:date:user-agent:mime-version:content-type :content-transfer-encoding:message-id: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=wjz3RIRFulIdjUqVJ2/AQ5wBHwf+fLAit5mvvAm1xSCzHijlyrJEWQbAQqdQBhUgjA ePrShW40NgO9tyPHtgS35EGB+rppTlzEOdlNx71eo8Rr10fiP2lymQmWPm6r0JeR7B01 FMcErs7KK4CEHWLugnrFJXGx2ghkznUWodIM0= Received: by 10.224.45.7 with SMTP id c7mr196080qaf.14.1251426721418; Thu, 27 Aug 2009 19:32:01 -0700 (PDT) Received: by 10.230.85.163 with SMTP id o35gr1609vbl.0; Thu, 27 Aug 2009 17:29:33 -0700 (PDT) X-Sender: ibc@aliax.net X-Apparently-To: rack-devel@googlegroups.com Received: by 10.211.147.36 with SMTP id z36mr81464ebn.13.1251418101846; Thu, 27 Aug 2009 17:08:21 -0700 (PDT) Received: by 10.211.147.36 with SMTP id z36mr81463ebn.13.1251418101824; Thu, 27 Aug 2009 17:08:21 -0700 (PDT) Return-Path: Received: from mail-ew0-f211.google.com (mail-ew0-f211.google.com [209.85.219.211]) by gmr-mx.google.com with ESMTP id 13si167026ewy.2.2009.08.27.17.08.21; Thu, 27 Aug 2009 17:08:21 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.219.211 is neither permitted nor denied by best guess record for domain of ibc@aliax.net) client-ip=209.85.219.211; Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 209.85.219.211 is neither permitted nor denied by best guess record for domain of ibc@aliax.net) smtp.mail=ibc@aliax.net Received: by ewy7 with SMTP id 7so1688875ewy.31 for ; Thu, 27 Aug 2009 17:08:21 -0700 (PDT) Received: by 10.211.178.14 with SMTP id f14mr10314436ebp.10.1251418101057; Thu, 27 Aug 2009 17:08:21 -0700 (PDT) Return-Path: Received: from ibc-laptop.localnet (10.216.218.87.dynamic.jazztel.es [87.218.216.10]) by mx.google.com with ESMTPS id 28sm425394eye.12.2009.08.27.17.08.20 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 27 Aug 2009 17:08:20 -0700 (PDT) From: =?utf-8?q?I=C3=B1aki_Baz_Castillo?= To: rack-devel@googlegroups.com Subject: How to get the request headers from "env" hash? Date: Fri, 28 Aug 2009 02:08:12 +0200 User-Agent: KMail/1.12.0 (Linux/2.6.28-15-generic; KDE/4.3.0; x86_64; ; ) Mime-Version: 1.0 Content-Type: Text/Plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Message-Id: <200908280208.12951.ibc@aliax.net> X-Google-Approved: james.britt@gmail.com via email at 2009-08-28 00:29:31 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 Hi, I'm just starting with Rack by testing some simple examples. =46or now I just would like to know how to get the request headers, as this= info=20 is not present in "env" hash which just contains: HTTP_HOST =3D> 127.0.0.1:9292 HTTP_ACCEPT =3D> text/html, image/jpeg;q=3D0.9, image/png;q=3D0.9, text/*;q= =3D0.9,=20 image/*;q=3D0.9, */*;q=3D0.8 SERVER_NAME =3D> 127.0.0.1 rack.url_scheme =3D> http REQUEST_PATH =3D> / HTTP_USER_AGENT =3D> Mozilla/5.0 (compatible; Konqueror/4.3; Linux 2.6.28-1= 5- generic; es, en-GB, en-US, en) KHTML/4.3.0 (like Gecko) rack.errors =3D> # HTTP_ACCEPT_LANGUAGE =3D> es, en-GB, en-US, en SERVER_PROTOCOL =3D> HTTP/1.1 rack.version =3D> 01 rack.run_once =3D> false SERVER_SOFTWARE =3D> Mongrel 1.1.5 PATH_INFO =3D> / REMOTE_ADDR =3D> 127.0.0.1 SCRIPT_NAME =3D> rack.multithread =3D> true HTTP_VERSION =3D> HTTP/1.1 rack.multiprocess =3D> false REQUEST_URI =3D> / HTTP_ACCEPT_CHARSET =3D> utf-8, utf-8;q=3D0.5, *;q=3D0.5 SERVER_PORT =3D> 9292 REQUEST_METHOD =3D> GET QUERY_STRING =3D> rack.input =3D> # HTTP_CONNECTION =3D> Keep-Alive HTTP_ACCEPT_ENCODING =3D> x-gzip, x-deflate, gzip, deflate GATEWAY_INTERFACE =3D> CGI/1.2 env["rack.input"] contains a IO object with the request body, but I don't s= ee=20 in the above hash how to get the request headers (any header). Thanks for any help. =2D-=20 I=C3=B1aki Baz Castillo