Dears,
my log format is:
log_format log_req_resp '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"'
'\nReq_Header: "$req_header"'
'\nReq_Body: "$request_body"'
'\nRes_Header: "$resp_header"'
'\nRes_Body: "$resp_body"'
and the Request and Responses are getting logged without any problem.
My problem is that when you look at the content, you'll find some "character codes" instead of their "actual character" :
127.0.0.1 - - [17/May/2019:15:41:30 +0430] "POST /luatest HTTP/1.1" 200 538 "-" "Apache-HttpClient/4.1.1 (java 1.5)" "-"
Req_Header: "host=127.0.0.1:8080 content-type=application/soap+xml;charset=UTF-8;action="" connection=Keep-Alive content-length=540 user-agent=Apache-HttpClient/4.1.1 (java 1.5) accept-encoding=gzip,deflate "
Req_Body: "<soap:Envelope xmlns:soap=\x22http://www.w3.org/2003/05/soap-envelope\x22 xmlns:web=\x22http://webservice.smsrelay.armaghan.net/\x22>\x0A <soap:Header/>\x0A <soap:Body>\x0A <web:sendMessageOneToMany>\x0A <username>XXXXX</username>\x0A <password>XXXXXX</password>\x0A <originator>XXXXXX</originator>\x0A <destination>XXXXXX</destination>\x0A <destination>XXXXXXX</destination>\x0A <content><#> my code: 11111 </content>\x0A </web:sendMessageOneToMany>\x0A </soap:Body>\x0A</soap:Envelope>"
Res_Header: "content-type=application/octet-stream connection=keep-alive "
Res_Body: "<soap:Envelope xmlns:soap=\x22http://www.w3.org/2003/05/soap-envelope\x22 xmlns:web=\x22http://webservice.smsrelay.armaghan.net/\x22>\x0A <soap:Header/>\x0A <soap:Body>\x0A <web:sendMessageOneToMany>\x0A <username>XXXXX</username>\x0A <password>XXXXXX</password>\x0A <originator>XXXXXX</originator>\x0A <destination>XXXXXX</destination>\x0A <destination>XXXXXX</destination>\x0A <content>Your code: 11111</content>\x0A </web:sendMessageOneToMany>\x0A </soap:Body>\x0A</soap:Envelope>\x0A"
In this particular case:
\x0A = ' \n '
\x22 = ' " '
Is there anyway to fix this issue ? it'd help me to get more clear content.
Thanks.