Return-Path: X-Original-To: apmail-httpd-users-archive@www.apache.org Delivered-To: apmail-httpd-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id F1632182D1 for ; Mon, 23 Nov 2015 18:31:11 +0000 (UTC) Received: (qmail 95821 invoked by uid 500); 23 Nov 2015 18:31:07 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 95776 invoked by uid 500); 23 Nov 2015 18:31:06 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 95766 invoked by uid 99); 23 Nov 2015 18:31:06 -0000 Received: from Unknown (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Nov 2015 18:31:06 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 5E21F1A0914 for ; Mon, 23 Nov 2015 18:31:06 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.845 X-Spam-Level: ** X-Spam-Status: No, score=2.845 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_REPLYTO_END_DIGIT=0.25, HTML_MESSAGE=3, RP_MATCHES_RCVD=-0.554, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=yahoo.com Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id E4Cm7OQopDEh for ; Mon, 23 Nov 2015 18:30:51 +0000 (UTC) Received: from nm22-vm3.bullet.mail.gq1.yahoo.com (nm22-vm3.bullet.mail.gq1.yahoo.com [98.136.217.66]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id 60933205A0 for ; Mon, 23 Nov 2015 18:30:50 +0000 (UTC) Received: from [98.137.12.57] by nm22.bullet.mail.gq1.yahoo.com with NNFMP; 23 Nov 2015 18:30:43 -0000 Received: from [98.137.12.220] by tm2.bullet.mail.gq1.yahoo.com with NNFMP; 23 Nov 2015 18:30:43 -0000 Received: from [127.0.0.1] by omp1028.mail.gq1.yahoo.com with NNFMP; 23 Nov 2015 18:30:43 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 593164.1246.bm@omp1028.mail.gq1.yahoo.com X-YMail-OSG: lM5UhUcVM1nWcZBooVkAo5u1Ab1RzeXCiHkdhjTigzkWndrZ29JyrvtgzWnrYR2 Q_NntL_HoJ1EXBiMviHSXPzm.p7MGzwvS443qj_wK8wtdLlKcUraonoCFP_Rzu5uAvaRgIpmIJQm 2GTajTouhGmiyoFujYByGkFwXzjQzlh4WAkPRoB9yzidqNIws_35vESNweGhGfZ8YA47iQLTKNaN Q0K0QIZS16Oy_eSgt3qp4SmOLqm9eBEDFXP4ng04txNv1G5yOJaz7K9XSyZc8PGJACnHvzemYuKz PPOCxqNjQhAtO4z9hIYa0CNU1kg.5gdGAW3Y3grPqP.TRumxBSddwE.MG8Jh9bzhegtzylrmCxKa 7xCb3WHi43Uog408YcAiA4_1pEfVm6.tUBfuZnSOdNL4CvbPhpWw8TGaqmzSWr6pZGFlc9KHVBf. QmP.nQJCrY0H1DmT2i6fS52IMMJ9A52JPIc7PgIhUhgI66HHRxm5KqJyISrE.89S1DD8hx2wYWPD k5Bo- Received: by 216.39.60.208; Mon, 23 Nov 2015 18:30:43 +0000 Date: Mon, 23 Nov 2015 18:30:42 +0000 (UTC) From: Amin Pashapour Reply-To: Amin Pashapour To: "users@httpd.apache.org" Message-ID: <899741479.8813637.1448303442782.JavaMail.yahoo@mail.yahoo.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_8813636_1785527431.1448303442769" References: <899741479.8813637.1448303442782.JavaMail.yahoo.ref@mail.yahoo.com> Subject: [users@httpd] forward proxy log config %U has the query string in it ------=_Part_8813636_1785527431.1448303442769 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Looks like I have found an issue with Apache logging when httpd is used as = a forward proxy. When I enable: ProxyRequests OnProxyVia On I use %U and %q in my LogFormat, This happens only when I use my httpd as a= proxy in my browser. =C2=A0 LogFormat "{\"remote_host\":\"%h\",\"time\":\"%t\",\"server_name\":\"%V\",\= "request_method\":\"%m\",\"request_protocol\":\"%H\",\"server_url\":\"%U\",= \"query_string\":\"%q\",\"content_type\":\"%{Content-Type}o\",\"status\":\"= %s\",\"status_final\":\"%>s\",\"bytes_response_no_headers\":\"%B\",\"bytes_= received\":\"%I\",\"bytes_sent\":\"%O\",\"time_to_serve_microseconds\":\"%D= \",\"time_to_serve_seconds\":\"%T\",\"keepalives_handled\":\"%k\",\"referer= \":\"%{Referer}i\",\"user-agent\":\"%{User-Agent}i\"}" combinedjson I end up seeing this in the logs.=C2=A0 {"remote_host":"::1","time":"[23/Nov/2015:12:58:04 -0500]","server_name":"<= myhost name>.com","request_method":"GET","request_protocol":"HTTP/1.1","ser= ver_url":".com:90/test.html?a=3Dalpha&b=3Dbeta","query_string"= :"?a=3Dalpha&b=3Dbeta","content_type":"text/html","status":"404","status_fi= nal":"404","bytes_response_no_headers":"207","bytes_received":"361","bytes_= sent":"487","time_to_serve_microseconds":"11983","time_to_serve_seconds":"0= ","keepalives_handled":"0","referer":"-","user-agent":"Mozilla/5.0 (X11; Li= nux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0"} If I hit the httpd site directly, the log is correct. {"remote_host":"192.168.xx.xx","time":"[23/Nov/2015:13:06:21 -0500]","serve= r_name":".com","request_method":"GET","request_protocol":"HTTP= /1.1","server_url":"/test.html","query_string":"?a=3Dalpha&b=3Dbeta","conte= nt_type":"text/html","status":"404","status_final":"404","bytes_response_no= _headers":"207","bytes_received":"339","bytes_sent":"463","time_to_serve_mi= croseconds":"548","time_to_serve_seconds":"0","keepalives_handled":"0","ref= erer":"-","user-agent":"Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/2010= 0101 Firefox/38.0"} According to=C2=A0mod_log_config - Apache HTTP Server Version 2.4 | =C2=A0 | | =C2=A0 | =C2=A0 | =C2=A0 | =C2=A0 | =C2=A0 | | mod_log_config - Apache HTTP Server Version 2.4Format=C2=A0String Descrip= tion %% The percent sign. %a Client IP address of the request (see the mod_= remoteip module). %{c}a | | | | View on httpd.apache.org | Preview by Yahoo | | | | =C2=A0 | %U is not supposed to have the query string in it. This happens with 2.2.29 as well. If this is reported earlier, please ignore. =C2=A0If I have done it wrong, = please let me know. Thanks.Pasha ------=_Part_8813636_1785527431.1448303442769 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi

Looks like I have= found an issue with Apache logging when httpd is used as a forward proxy.<= /div>

When I enable:

=
ProxyRequests On
ProxyVia On

I u= se %U and %q in my LogFormat, This happens only when I use my httpd as a pr= oxy in my browser.  

LogFormat "{\"remote_host\":\"%h\",\"time\":\"%t= \",\"server_name\":\"%V\",\"request_method\":\"%m\",\"request_protocol\":\"= %H\",\"server_url\":\"%U\",\"query_string\":\"%q\",\"content_type\":\"%{Con= tent-Type}o\",\"status\":\"%s\",\"status_final\":\"%>s\",\"bytes_respons= e_no_headers\":\"%B\",\"bytes_received\":\"%I\",\"bytes_sent\":\"%O\",\"tim= e_to_serve_microseconds\":\"%D\",\"time_to_serve_seconds\":\"%T\",\"keepali= ves_handled\":\"%k\",\"referer\":\"%{Referer}i\",\"user-agent\":\"%{User-Ag= ent}i\"}" combinedjson


I end up seeing this in the logs. 

{"remote_h= ost":"::1","time":"[23/Nov/2015:12:58:04 -0500]","server_name":"<myhost = name>.com","request_method":"GET","request_protocol":"HTTP/1.1","server_= url":"<myhost name>.com:90/test.html?a=3Dalpha&b=3Dbeta","query_s= tring":"?a=3Dalpha&b=3Dbeta","content_type":"text/html","status":"404",= "status_final":"404","bytes_response_no_headers":"207","bytes_received":"36= 1","bytes_sent":"487","time_to_serve_microseconds":"11983","time_to_serve_s= econds":"0","keepalives_handled":"0","referer":"-","user-agent":"Mozilla/5.= 0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0"}

If I hit the= httpd site directly, the log is correct.

{"remote_host":"192.168.xx.xx","t= ime":"[23/Nov/2015:13:06:21 -0500]","server_name":"<myhost name>.com"= ,"request_method":"GET","request_protocol":"HTTP/1.1","server_url":"/test.h= tml","query_string":"?a=3Dalpha&b=3Dbeta","content_type":"text/html","s= tatus":"404","status_final":"404","bytes_response_no_headers":"207","bytes_= received":"339","bytes_sent":"463","time_to_serve_microseconds":"548","time= _to_serve_seconds":"0","keepalives_handled":"0","referer":"-","user-agent":= "Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0"}



<= /div>
%U is not supposed to have the query string in it.

This happens wi= th 2.2.29 as well.

If this is reported earlier, please ignore.  I= f I have done it wrong, please let me know.

Thanks.
Pasha


------=_Part_8813636_1785527431.1448303442769--