From mboxrd@z Thu Jan 1 00:00:00 1970 Delivered-To: chneukirchen@gmail.com Received: by 10.86.23.1 with SMTP id 1cs107099fgw; Thu, 3 Sep 2009 16:02:31 -0700 (PDT) Received-SPF: pass (google.com: domain of grbounce-ceibQwUAAAB4YPBqaDIjI2bFOCxyyh3G=chneukirchen=gmail.com@googlegroups.com designates 10.91.7.4 as permitted sender) client-ip=10.91.7.4; Authentication-Results: mr.google.com; spf=pass (google.com: domain of grbounce-ceibQwUAAAB4YPBqaDIjI2bFOCxyyh3G=chneukirchen=gmail.com@googlegroups.com designates 10.91.7.4 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.91.7.4]) by 10.91.7.4 with SMTP id k4mr6779852agi.2.1252018950119 (num_hops = 1); Thu, 03 Sep 2009 16:02:30 -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:reply-to:sender:precedence :x-google-loop:mailing-list:list-id:list-post:list-help :list-unsubscribe:x-beenthere-env:x-beenthere; bh=nDg0r7iQ15QB+8M6F+4KESARTnoENMXkBEoOCGOH6x8=; b=OqUGgDBS8XgDDc+SCPouPAgZGGfElILXR3z3p3NSZVAHJjjIEeLWcOHHeT8nGS05SG 4KO97h9vKwj+ZPcBBWMFx8UcdzsUXe8ZDtLBbHLSU/44m7fdJbxIR75VPsWZyhYonuLb JbMKdE3AwnWljKc2rI9HE96quLex5bNNrCWiQ= 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:reply-to:sender:precedence :x-google-loop:mailing-list:list-id:list-post:list-help :list-unsubscribe:x-beenthere-env:x-beenthere; b=CZ8rMU6Xh9DffPRsk7UCecBK95wrmkxcmxHzxNYTisGerOFi6FmKJvpHNIe5D4DCcr Qq0d/wfFFfJAHhVrjMzsvotGjsD1wEzU1hKPa57msWeY0nWud8xSON9FQoesmjK/r7iA bg+wwvo2txCMgfDTGabP7eSekHTLGwWHiuPnc= Received: by 10.91.7.4 with SMTP id k4mr1103032agi.2.1252018950037; Thu, 03 Sep 2009 16:02:30 -0700 (PDT) Received: by 10.176.133.2 with SMTP id g2gr1631yqd.0; Thu, 03 Sep 2009 16:02:20 -0700 (PDT) X-Sender: ibc@aliax.net X-Apparently-To: rack-devel@googlegroups.com Received: by 10.204.23.75 with SMTP id q11mr418511bkb.27.1252018938381; Thu, 03 Sep 2009 16:02:18 -0700 (PDT) Received: by 10.204.23.75 with SMTP id q11mr418510bkb.27.1252018938363; Thu, 03 Sep 2009 16:02:18 -0700 (PDT) Return-Path: Received: from mail-fx0-f208.google.com (mail-fx0-f208.google.com [209.85.220.208]) by gmr-mx.google.com with ESMTP id 14si50503fxm.7.2009.09.03.16.02.18; Thu, 03 Sep 2009 16:02:18 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.208 is neither permitted nor denied by best guess record for domain of ibc@aliax.net) client-ip=209.85.220.208; Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 209.85.220.208 is neither permitted nor denied by best guess record for domain of ibc@aliax.net) smtp.mail=ibc@aliax.net Received: by fxm4 with SMTP id 4so310703fxm.16 for ; Thu, 03 Sep 2009 16:02:18 -0700 (PDT) Received: by 10.102.178.9 with SMTP id a9mr4453393muf.91.1252018938175; Thu, 03 Sep 2009 16:02:18 -0700 (PDT) Return-Path: Received: from ibc-laptop.localnet (1.217.218.87.dynamic.jazztel.es [87.218.217.1]) by mx.google.com with ESMTPS id s10sm531047muh.25.2009.09.03.16.02.16 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 03 Sep 2009 16:02:17 -0700 (PDT) From: =?utf-8?q?I=C3=B1aki_Baz_Castillo?= To: rack-devel@googlegroups.com Subject: CommonLogger (and Clogger) generates strange symbols in the response body Date: Fri, 4 Sep 2009 01:02:14 +0200 User-Agent: KMail/1.12.1 (Linux/2.6.28-15-generic; KDE/4.3.1; x86_64; ; ) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <200909040102.14378.ibc@aliax.net> 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 can't understand why the following issue occurs in the response body= =20 when using CommonLogger: =2D---- app_logic.rb ----- class AppLogic def call(env) 200, {"Content-Type" =3D> "text/plain"}, "line1\nline2\nline3\n" end end =2D----------------------- =2D------ run_server.rb ------ require "app_logic.rb" rack_inner_app =3D AppLogic.new rack_app =3D Rack::Builder.new { use Rack::CommonLogger, $stderr run rack_inner_app }.to_app Rack::Handler::Thin.run rack_app =2D--------------------------- The reply I get in the 200 OK response is as follows: =2D------------ HTTP/1.1 200 OK Transfer-Encoding: chunked Content-Type: text/plain Server: OpenXDMS Connection: close 6 line1 6 line2 6 line3 0 =2D------------ As you can see, the number above each real body line is the length of the l= ine=20 below it (in hexadecimal when > 10). If I comment the CommonLogger line, then I get the correct body: =2D------------- line1 line2 line3 =2D------------- It occurs the same if I log to a file and also if I use Clogger instead of= =20 CommonLogger. Is there something wrong in my code? is it the expected behaviour? (I canno= t=20 figure it of course as it breaks the response). Thanks a lot. =2D-=20 I=C3=B1aki Baz Castillo