tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Igor Cicimov <icici...@gmail.com>
Subject Re: mod_jk how to add JK_WORKER_NAME to http-header
Date Tue, 26 Feb 2013 22:52:47 GMT
On 27/02/2013 5:42 AM, "Jochen WiƟmann" <jochen.wissmann@kepol.com> wrote:
>
> Hello,
>
> i am trying to find an easy way to determine from the http-client side,
which  AJP13-worker handled my request.
> So my basic idea is to use mod_header to add mod_jk`s env-variable
JK_WORKER_NAME to the Header of the http-response.
> I tried to get something like this working:
>
> httpd.conf:
> ...
> Header add TC-Server "%{JK_WORKER_NAME}e"

I think this should be

Header add TC-Server "%{JK_WORKER_NAME}n"

Please paste here the worker.properties file too.

> ...
>
> All my previous attempts resulted in http-responses looking like this:
>
> < HTTP/1.1 200 OK
> < Set-Cookie: ARPT=LRWQXVS110.160.11.26CKMLQ; path=/
> < Date: Tue, 26 Feb 2013 18:25:31 GMT
> < Server: Apache/2.2.22 (Unix) mod_jk/1.2.36 mod_ssl/2.2.22
OpenSSL/0.9.8x DAV/2
> < Set-Cookie: JSESSIONID=A4052BF60BA2007F0B0F47E2699AFDE.liferay0; Path=/
> < Set-Cookie: GUEST_LANGUAGE_ID=en_US; Expires=Wed, 26-Feb-2014 18:25:31
GMT; Path=/
> < Set-Cookie: COOKIE_SUPPORT=true; Expires=Wed, 26-Feb-2014 18:25:31 GMT;
Path=/
> < Liferay-Portal: Liferay Portal Community Edition 6.0.6 CE (Bunyan /
Build 6006 / February 17, 2011)
> < ETag: "838b4ae2"
> < Content-Length: 8043
> < X-Server-Ip: 110.160.11.26
> < TC-Server: (null)
> < Content-Type: text/html;charset=utf-8
>
> Why do i get "TC-Server: (null)" ?
> Using the Variable JK_WORKER_NAME to log the worker's name via
mod_log_config works fine.
>
> Am i missing something? Is it even possible to access the env-variable
JK_WORKER_NAME with module mod_header?
> Could anyone please help?
> Thanks!
>
> Jochen
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message