I have compared JSON logs (NOK) with XML logs (OK).

The main differences are here:

JSON
=====

ajp_unmarshal_response::jk_ajp_common.c (688): Number of headers is = 6

ajp_unmarshal_response::jk_ajp_common.c (744): Header[0] [Pragma] =
[no-cache]

ajp_unmarshal_response::jk_ajp_common.c (744): Header[1] [Cache-Control] =
[no-cache, no-store, max-age=0]

ajp_unmarshal_response::jk_ajp_common.c (744): Header[2] [Expires] = [Thu,
01 Jan 1970 00:00:00 GMT]

ajp_unmarshal_response::jk_ajp_common.c (744): Header[3] [Content-Type] =
[application/json;charset=UTF-8]

ajp_unmarshal_response::jk_ajp_common.c (744): Header[4] [Content-Language]
= [en-US]

ajp_unmarshal_response::jk_ajp_common.c (744): Header[5] [Content-Length] =
[0]

XML
=====

ajp_unmarshal_response::jk_ajp_common.c (688): Number of headers is = 3

ajp_unmarshal_response::jk_ajp_common.c (744): Header[0] [Content-Type] =
[application/xml;charset=UTF-8]

ajp_unmarshal_response::jk_ajp_common.c (744): Header[1] [Content-Language]
= [en-US]

ajp_unmarshal_response::jk_ajp_common.c (744): Header[2] [Content-Length] =
[123]

The content-length parameter shows a 0 length.I don't know if these headers
are added by some framework, or if they are added by the AJP connector,
based on the content. Do you know the answer ?

Best regards,
Omar





2014-08-10 15:30 GMT+01:00 Omar Belkhodja <omar.belkho...@gmail.com>:

> Sorry, I forgot to answer to the second part of your e-mail.
>
> Regarding Apache directives, I didn't add any specific directives. But,
> I'm not the one that have configured all the server, so I'm not sure at
> 100%.
>
> Regards,
> Omar
>
>
> 2014-08-10 14:56 GMT+01:00 Rainer Jung <rainer.j...@kippdata.de>:
>
>> Am 10.08.2014 um 15:41 schrieb Omar Belkhodja:
>>
>>  Hi,
>>>
>>> I'm adding HTTPS access to my Java site. For that, I have chosen to leave
>>> the management of HTTPS to an Apache server. The Apache server is
>>> connecting to tomcat through mod_jk and AJP 1.3.
>>>
>>> I'm logging all my Tomcat request/responses, and I'm facing the following
>>> problem:
>>> - If I access my URL through the standard Tomcat connector on port 8080,
>>> I
>>> have a correct response (JSON)
>>> - If I access my URL through Apache HTTPS, I have an empty response(no
>>> JSON)
>>>
>>>  From the Tomcat logs below, the last parameter is the number of bytes
>>> returned, and you can see that they are different.
>>>
>>>      41.227.87.197:443 - - [10/Aug/2014:15:24:32 +0200] 1688 "GET
>>> /url?format=json HTTP/1.1" 200 33
>>>      41.227.87.197:8080 - - [10/Aug/2014:15:24:46 +0200] 734 "GET
>>> /url?format=json HTTP/1.1" 200 44
>>>
>>> Another test I have done is to use an XML response instead of JSON
>>> response, and I can't see any more the problem.
>>>
>>> Any idea what could it be ?
>>>
>>
>> Can you set JkLogLevel trace for mod_jk and post the complete log output
>> for a single request? We can then check the headers etc.
>>
>> For a first try we don't need the startup messages, only the log lines
>> related to receiving and forwarding the request and reponse.
>>
>> Are there any other Apache directives active that might change the URI or
>> headers? RewriteRules etc.?
>>
>> Regards,
>>
>> Rainer
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>
>>
>

Reply via email to