Re: logging input and output HTTP message payload

2015-06-18 Thread Frederik Nosi

Hi Christopher,

On 06/18/2015 05:55 PM, Christopher Schultz wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Frederik,

On 6/17/15 8:10 AM, Frederik Nosi wrote:

It helps only with HTTP though, no HTTPS or at least not easily.

All you need is the server's TLS key and Wireshark will look directly
at the HTTP conversation. This is a skill worth developing, especially
since it takes such little effort.


Been there done that, with mildly recent versions of openssl / https 
(PFS) you cant do that:


https://ask.wireshark.org/questions/34393/how-to-decrypt-ssl-traffic-using-wireshark





- -chris
-BEGIN PGP SIGNATURE-
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJVguoGAAoJEBzwKT+lPKRYp/IP/jlJ8sLXsf0hxL/NE/dZmE/h
rq4kFb3/9itszwJnL7vnaQHetml+JZNAk7fsCvk8wGx4JIX/aYVpmmyJ+A1KsQ+Q
1nZeJ2uSef6iTEtYsypMxUasabguc8LI7KG0QMRyBYSLICcbp/36SLgJmUVLCuvw
ErClKJIlFDetd7r0dUuBIvlixThQ0emSOPRAgutNauiUCb2m6CCFAnFWmmW7Z01/
yLV+AUGHp3b77Yq3jJlKGtlmNmTuJ/tdnY0N7VwYlnA644DkUpetykFZZ/pdLa5p
wYRHXz5qv/tmVT383SAeK3FgSVYIp9EnxVHs44ImZ42XwCnkoHLK9TdzjkS6Cxrs
WHQJcP6vfSWQ7WIGLNpJzUclEkCaJRCLktGcA8SE4aNIg0JvVe2Y25RVWOdYX//E
RHiZxrDJxctoK6zmTuCOpd7DFx1cxSp2s1xXfghl80lFouMryoqwL7vui8/V/8u/
PsxT6/kupsTFTGoTv1RvJdk0rPVhrQnpHneOpQcKyoH/1lJoTswO8j7T6suLACqL
/K1HCVO8E+tu49Mn5bsr9rUb0uUo/qtYUu/cPp4Pv6CkNxLxYw48T1t82HSGkQHr
g7qCt1aWltsfc6O6yx07Zfdair8Hvy/QmOifcnpWlHn01wF6phSjrXhN3t5M7pnt
ScsjQVvlQoi7ATLm+4/a
=f8p5
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: logging input and output HTTP message payload

2015-06-18 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Milinda,

On 6/17/15 5:10 AM, Milinda Perera wrote:
 I need to log HTTP payload content for debugging purposes.
 Following are my findings:
 
 1. Using HTTP message content Access Log Valve [1] and Extended
 Access Log Valve [2] But it does not provide functionality to log
 HTTP payload
 
 2. Then I tried by changing  *org.apache.coyote.level=FINE* With
 this it logs the entire HTTP request (header + payload). But does
 not log response
 
 Since in my 2nd method it logged the request, Is it possible to
 log response also?

http://markmail.org/thread/fumpfuspt7a3nesz

- -chris
-BEGIN PGP SIGNATURE-
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJVguqpAAoJEBzwKT+lPKRYBjgP/jHRe/l712AgiJ8xiEmeuwHn
GaDVYK/RaZ0xEnsgFjCyFPDJnji3fa7T11BuklL1sEnQV+7QovdSEfYstu6yij+M
WIQah/h+fOI4xytp8/vO6AvAah0lBUKJMuGPzJYfUUugGE7w293uzyL15BIUpGM1
WFvbsUMGQO07i2mTnoK60CY7dfiDau9CBALqTZDWBxNofYGj4kSXgT5qhQsc8eUI
x0CMVNUUeYNUL62e+OXYzYbAzMUAG1zkXVbZsP/IajXLHFLpxHcxwu++oTg+Pode
SwemM50ABQYqx4k0iTnR9UJHZeq4WcLhXzd7q9e4chL4OTo3KytFxb1s9FV6p96X
WT6JWG2riBN86vVDnL8w4FeK6ORV/vAtfwHNxHUv+HQNd5AcE/Ls0H019yhK3UC1
OEneSe2tQyPOucTOuQLCn3z5b2AjflRcdJqtJxUH71mc5fzKawDMKHLY93ilIf2N
3QXW/PiI8cK97z+4oTqVKozwcaKckWFV67VQEcyXReIdf1SAUOjiOW0hhCPrqNLi
zu6+2EOzODgTgGsLM0ca4vAwFb035Um91dpxXC+l0LaVtdjnCGbKlaqpHiwBnehz
3KibFSzYr2D0qcY5eAPFDUEMmZGv1Rg7fi7vuruoXQll7Iu1hsLONfeaH0l434mO
anlb6DLXYOWBPdhJpqqD
=stly
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: logging input and output HTTP message payload

2015-06-18 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Frederik,

On 6/17/15 8:10 AM, Frederik Nosi wrote:
 It helps only with HTTP though, no HTTPS or at least not easily.

All you need is the server's TLS key and Wireshark will look directly
at the HTTP conversation. This is a skill worth developing, especially
since it takes such little effort.

- -chris
-BEGIN PGP SIGNATURE-
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJVguoGAAoJEBzwKT+lPKRYp/IP/jlJ8sLXsf0hxL/NE/dZmE/h
rq4kFb3/9itszwJnL7vnaQHetml+JZNAk7fsCvk8wGx4JIX/aYVpmmyJ+A1KsQ+Q
1nZeJ2uSef6iTEtYsypMxUasabguc8LI7KG0QMRyBYSLICcbp/36SLgJmUVLCuvw
ErClKJIlFDetd7r0dUuBIvlixThQ0emSOPRAgutNauiUCb2m6CCFAnFWmmW7Z01/
yLV+AUGHp3b77Yq3jJlKGtlmNmTuJ/tdnY0N7VwYlnA644DkUpetykFZZ/pdLa5p
wYRHXz5qv/tmVT383SAeK3FgSVYIp9EnxVHs44ImZ42XwCnkoHLK9TdzjkS6Cxrs
WHQJcP6vfSWQ7WIGLNpJzUclEkCaJRCLktGcA8SE4aNIg0JvVe2Y25RVWOdYX//E
RHiZxrDJxctoK6zmTuCOpd7DFx1cxSp2s1xXfghl80lFouMryoqwL7vui8/V/8u/
PsxT6/kupsTFTGoTv1RvJdk0rPVhrQnpHneOpQcKyoH/1lJoTswO8j7T6suLACqL
/K1HCVO8E+tu49Mn5bsr9rUb0uUo/qtYUu/cPp4Pv6CkNxLxYw48T1t82HSGkQHr
g7qCt1aWltsfc6O6yx07Zfdair8Hvy/QmOifcnpWlHn01wF6phSjrXhN3t5M7pnt
ScsjQVvlQoi7ATLm+4/a
=f8p5
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: logging input and output HTTP message payload

2015-06-18 Thread Frederik Nosi

Some more info,

On 06/18/2015 06:00 PM, Frederik Nosi wrote:

Hi Christopher,

On 06/18/2015 05:55 PM, Christopher Schultz wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Frederik,

On 6/17/15 8:10 AM, Frederik Nosi wrote:

It helps only with HTTP though, no HTTPS or at least not easily.

All you need is the server's TLS key and Wireshark will look directly
at the HTTP conversation. This is a skill worth developing, especially
since it takes such little effort.


Been there done that, with mildly recent versions of openssl / https 
(PFS) you cant do that:


https://ask.wireshark.org/questions/34393/how-to-decrypt-ssl-traffic-using-wireshark 



Till some years ago I used tihs technique for troubleshooting. But after 
a webserver upgrade or such, i found that this was no more possible (i'm 
noit going into details now). So the quick and dirty way i had to use 
was with apache mod_bumpio, or strace -fe trace=network -s 1024 -p 
`pidof tomcat`, you got the idea.

With another product i had to put a HTTP/HTTPS proxy in the middle.

That's why i said it's not so quick :-)








- -chris
-BEGIN PGP SIGNATURE-
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJVguoGAAoJEBzwKT+lPKRYp/IP/jlJ8sLXsf0hxL/NE/dZmE/h
rq4kFb3/9itszwJnL7vnaQHetml+JZNAk7fsCvk8wGx4JIX/aYVpmmyJ+A1KsQ+Q
1nZeJ2uSef6iTEtYsypMxUasabguc8LI7KG0QMRyBYSLICcbp/36SLgJmUVLCuvw
ErClKJIlFDetd7r0dUuBIvlixThQ0emSOPRAgutNauiUCb2m6CCFAnFWmmW7Z01/
yLV+AUGHp3b77Yq3jJlKGtlmNmTuJ/tdnY0N7VwYlnA644DkUpetykFZZ/pdLa5p
wYRHXz5qv/tmVT383SAeK3FgSVYIp9EnxVHs44ImZ42XwCnkoHLK9TdzjkS6Cxrs
WHQJcP6vfSWQ7WIGLNpJzUclEkCaJRCLktGcA8SE4aNIg0JvVe2Y25RVWOdYX//E
RHiZxrDJxctoK6zmTuCOpd7DFx1cxSp2s1xXfghl80lFouMryoqwL7vui8/V/8u/
PsxT6/kupsTFTGoTv1RvJdk0rPVhrQnpHneOpQcKyoH/1lJoTswO8j7T6suLACqL
/K1HCVO8E+tu49Mn5bsr9rUb0uUo/qtYUu/cPp4Pv6CkNxLxYw48T1t82HSGkQHr
g7qCt1aWltsfc6O6yx07Zfdair8Hvy/QmOifcnpWlHn01wF6phSjrXhN3t5M7pnt
ScsjQVvlQoi7ATLm+4/a
=f8p5
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: logging input and output HTTP message payload

2015-06-17 Thread Milinda Perera
Hi all,

Thanks for suggestions,

Actually I want to log all HTTP / HTTPS requests from client applications
to my Tomcat server and the Response sent back to the client. And logging
requests and payloads are not target specific application running in the
Tomcal server, which means all the request to the Tomcat server and all the
responses from the Tomcat server

My requirement cannot be fulfilled with external tools like wireshark
because:
  1. unable to log HTTPS requests and responses
  2. And I need to get logged requests and responses in server side log
files without external tools.

by changing  *org.apache.coyote.level=FINE *in log properties logs HTTP
requests to the server, but does not log response.

Highly appreciate if you guys can share your thoughts to achieve this.

Thanks,
Milinda



On Wed, Jun 17, 2015 at 5:56 PM, André Warnier a...@ice-sa.com wrote:

 Frederik Nosi wrote:

 It helps only with HTTP though, no HTTPS or at least not easily.

 While we are at this, are you trying to debug a SOAP / REST connection
 from your application running on Tomcat to another server or a connection
 coming from outside to your Tomcat?


 On 06/17/2015 11:16 AM, Mark Thomas wrote:

 On 17/06/2015 10:10, Milinda Perera wrote:

 Hi,

 I need to log HTTP payload content for debugging purposes.

 Use Wireshark. That has the added benefit of not having any unwanted
 side-effects on your application.

 Mark


 If this is for one debugging session, you could also simply use an add-on
 to a browser (such as Fiddler2 for IE), and record the full exchanges there.
 It has the advantage that you see the complete traffic in both directions
 (headers and content), and that you can easily switch between different
 presentations of the data, and save it to file if you need to.  And
 depending on what you are looking for, it may be a lot easier to handle
 than Wireshark.





 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




-- 
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
   / \  / \ |  ||
  /   \/   \|  ||  N D A
 /  \   |  | |
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
* please consider our environment before printing this e-mail*


Re: logging input and output HTTP message payload

2015-06-17 Thread Frederik Nosi

If you have this:

1) Tomcat listening in HTTP, not HTTPS
2) ssh access to the machine
3) administrator access to the machine

and are on Linux (or Unix in general, but my command is linux specific) 
do this as root:



tcpdump -nnpi any -s0 -vvv -w /tmp/dump.pcap port  8080

After the request you're interested in are done press CTRl+C

from your client, assuming it's linux but on win you can use putty or 
whatever:


scp remote-machine:/tmp/dump.pcap .
wireshark dump.pcap


Done.

P.S.
If your tomcat's HTTP Connector isn't listening at port 8080 change the 
port accordingly in my tcpdump command




On 06/17/2015 08:04 PM, Milinda Perera wrote:

Hi all,

Thanks for suggestions,

Actually I want to log all HTTP / HTTPS requests from client applications
to my Tomcat server and the Response sent back to the client. And logging
requests and payloads are not target specific application running in the
Tomcal server, which means all the request to the Tomcat server and all the
responses from the Tomcat server

My requirement cannot be fulfilled with external tools like wireshark
because:
   1. unable to log HTTPS requests and responses
   2. And I need to get logged requests and responses in server side log
files without external tools.

by changing  *org.apache.coyote.level=FINE *in log properties logs HTTP
requests to the server, but does not log response.

Highly appreciate if you guys can share your thoughts to achieve this.

Thanks,
Milinda



On Wed, Jun 17, 2015 at 5:56 PM, André Warnier a...@ice-sa.com wrote:


Frederik Nosi wrote:


It helps only with HTTP though, no HTTPS or at least not easily.

While we are at this, are you trying to debug a SOAP / REST connection
from your application running on Tomcat to another server or a connection
coming from outside to your Tomcat?


On 06/17/2015 11:16 AM, Mark Thomas wrote:


On 17/06/2015 10:10, Milinda Perera wrote:


Hi,

I need to log HTTP payload content for debugging purposes.


Use Wireshark. That has the added benefit of not having any unwanted
side-effects on your application.

Mark



If this is for one debugging session, you could also simply use an add-on
to a browser (such as Fiddler2 for IE), and record the full exchanges there.
It has the advantage that you see the complete traffic in both directions
(headers and content), and that you can easily switch between different
presentations of the data, and save it to file if you need to.  And
depending on what you are looking for, it may be a lot easier to handle
than Wireshark.





-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org







-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: logging input and output HTTP message payload

2015-06-17 Thread André Warnier

Just to make sure..

Milinda Perera wrote:

Hi all,

Thanks for suggestions,

Actually I want to log all HTTP / HTTPS requests from client applications
to my Tomcat server and the Response sent back to the client. And logging
requests and payloads are not target specific application running in the
Tomcal server, which means all the request to the Tomcat server and all the
responses from the Tomcat server

My requirement cannot be fulfilled with external tools like wireshark
because:
  1. unable to log HTTPS requests and responses
  2. And I need to get logged requests and responses in server side log
files without external tools.


Are you aware of the volume of data that this could be ? and about the performance impact 
? and about the complexity of doing this in any way that would be useful ?


HTTP requests tend to be small  : a request line like GET /mylogo.jpg HTTP/1.1, and a 
few text headers). But the response to that request may be very large (a 120 KB jpeg 
file).  Multiply by the number of requests for your homepage etc. (and never mind if you 
are returning large PDF documents sometimes...)


And then, to log this jpeg logo file in any useful manner, you would have to
a) analyse the response, to see what is sent back
b) encode this in some way, to write it usefully to your logfile (you do not want binary 
data there, I presume)


These are probably some of the reasons why the standard logging methods don't 
do that.



by changing  *org.apache.coyote.level=FINE *in log properties logs HTTP
requests to the server, but does not log response.

Highly appreciate if you guys can share your thoughts to achieve this.



Ask the NSA for some tips ?


Thanks,
Milinda



On Wed, Jun 17, 2015 at 5:56 PM, André Warnier a...@ice-sa.com wrote:


Frederik Nosi wrote:


It helps only with HTTP though, no HTTPS or at least not easily.

While we are at this, are you trying to debug a SOAP / REST connection
from your application running on Tomcat to another server or a connection
coming from outside to your Tomcat?


On 06/17/2015 11:16 AM, Mark Thomas wrote:


On 17/06/2015 10:10, Milinda Perera wrote:


Hi,

I need to log HTTP payload content for debugging purposes.


Use Wireshark. That has the added benefit of not having any unwanted
side-effects on your application.

Mark



If this is for one debugging session, you could also simply use an add-on
to a browser (such as Fiddler2 for IE), and record the full exchanges there.
It has the advantage that you see the complete traffic in both directions
(headers and content), and that you can easily switch between different
presentations of the data, and save it to file if you need to.  And
depending on what you are looking for, it may be a lot easier to handle
than Wireshark.





-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org








-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: logging input and output HTTP message payload

2015-06-17 Thread Mark Eggers
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 6/17/2015 11:32 AM, André Warnier wrote:
 Just to make sure..
 
 Milinda Perera wrote:
 Hi all,
 
 Thanks for suggestions,
 
 Actually I want to log all HTTP / HTTPS requests from client
 applications to my Tomcat server and the Response sent back to
 the client. And logging requests and payloads are not target
 specific application running in the Tomcal server, which means
 all the request to the Tomcat server and all the responses from
 the Tomcat server
 
 My requirement cannot be fulfilled with external tools like
 wireshark because: 1. unable to log HTTPS requests and responses 
 2. And I need to get logged requests and responses in server side
 log files without external tools.
 
 Are you aware of the volume of data that this could be ? and about
 the performance impact ? and about the complexity of doing this in
 any way that would be useful ?
 
 HTTP requests tend to be small  : a request line like GET
 /mylogo.jpg HTTP/1.1, and a few text headers). But the response to
 that request may be very large (a 120 KB jpeg file).  Multiply by
 the number of requests for your homepage etc. (and never mind if
 you are returning large PDF documents sometimes...)
 
 And then, to log this jpeg logo file in any useful manner, you
 would have to a) analyse the response, to see what is sent back b)
 encode this in some way, to write it usefully to your logfile (you
 do not want binary data there, I presume)
 
 These are probably some of the reasons why the standard logging
 methods don't do that.
 
 
 by changing  *org.apache.coyote.level=FINE *in log properties
 logs HTTP requests to the server, but does not log response.
 
 Highly appreciate if you guys can share your thoughts to achieve
 this.
 
 
 Ask the NSA for some tips ?
 
 Thanks, Milinda
 
 
 
 On Wed, Jun 17, 2015 at 5:56 PM, André Warnier a...@ice-sa.com
 wrote:
 
 Frederik Nosi wrote:
 
 It helps only with HTTP though, no HTTPS or at least not
 easily.
 
 While we are at this, are you trying to debug a SOAP / REST
 connection from your application running on Tomcat to another
 server or a connection coming from outside to your Tomcat?
 
 
 On 06/17/2015 11:16 AM, Mark Thomas wrote:
 
 On 17/06/2015 10:10, Milinda Perera wrote:
 
 Hi,
 
 I need to log HTTP payload content for debugging
 purposes.
 
 Use Wireshark. That has the added benefit of not having any
 unwanted side-effects on your application.
 
 Mark
 
 
 If this is for one debugging session, you could also simply use
 an add-on to a browser (such as Fiddler2 for IE), and record
 the full exchanges there. It has the advantage that you see the
 complete traffic in both directions (headers and content), and
 that you can easily switch between different presentations of
 the data, and save it to file if you need to.  And depending on
 what you are looking for, it may be a lot easier to handle than
 Wireshark.

As others have pointed out, this will potentially generate a huge
amount of information, most of it completely useless (logging your JPG
logo over and over again?), and impact performance . . .

That being said, I suppose one way to do this is to write a servlet
filter, wrap the ServletResponse object, then do the logging in the
filter.

You could be careful in what you log (don't put the filter in front of
images or pdf files, for example), and also have a servlet filter init
parameter which could control the logging (or turn it off).

Consider the volume of information you will generate. For example, I'm
using the standard access logging that is configured with Tomcat
7.0.62. A web site gets about 250K requests per day, and I strip out a
bunch of stuff using Perl. After all is said and done, a day's worth
of logs is about 60 MB.

Now, add response information and do the math. You'll find that it's
not going to be a very pleasant. In order to handle that amount of
data, you'll need to invest in streaming logging, a NoSQL database,
and the infrastructure to support those tools.

If that's what you wish to do, then great. Just be aware of what
you're walking into.

You might want to go back and actually determine the underlying
business requirements before embarking on such a task.

. . . just my two cents
/mde/

-BEGIN PGP SIGNATURE-
Version: GnuPG v2

iQEcBAEBAgAGBQJVgcQ/AAoJEEFGbsYNeTwtAPkIAIDO334dMWLbejAVQ4us0jv7
a/cE69LwTpHJ7zxfGE4jbYsD3BvAJWQduBjuP83ePb37BiaYA9ImtJsXwkjfpPpk
TTv3Xrse4gRXueR2x+cOQbx/1BMMmPyeUenBXwFoPA2V3xhAH0N5DUdyC9mb5Hju
fk/2kquPHHuNNM3L9W3UE9BS7yhWed8wP93RG78oaopGm+anojwp6NQ2QZLxtdCc
fSZ9QrFhuKfizvU2emyRznIdUx88fVnwvFt5wBzTlJf3EgRTGt1B2VGTUuVMPmTy
SXJIzkZePAkGUswt35uh51n9IuKJXzPr5NEzNzAMMsbHVb828KbLY01YFiomGfU=
=6WmU
-END PGP SIGNATURE-

---
This email is free from viruses and malware because avast! Antivirus protection 
is active.
https://www.avast.com/antivirus


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For 

Re: logging input and output HTTP message payload

2015-06-17 Thread Frederik Nosi

It helps only with HTTP though, no HTTPS or at least not easily.

While we are at this, are you trying to debug a SOAP / REST connection 
from your application running on Tomcat to another server or a 
connection coming from outside to your Tomcat?



On 06/17/2015 11:16 AM, Mark Thomas wrote:

On 17/06/2015 10:10, Milinda Perera wrote:

Hi,

I need to log HTTP payload content for debugging purposes.

Use Wireshark. That has the added benefit of not having any unwanted
side-effects on your application.

Mark


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: logging input and output HTTP message payload

2015-06-17 Thread André Warnier

Frederik Nosi wrote:

It helps only with HTTP though, no HTTPS or at least not easily.

While we are at this, are you trying to debug a SOAP / REST connection 
from your application running on Tomcat to another server or a 
connection coming from outside to your Tomcat?



On 06/17/2015 11:16 AM, Mark Thomas wrote:

On 17/06/2015 10:10, Milinda Perera wrote:

Hi,

I need to log HTTP payload content for debugging purposes.

Use Wireshark. That has the added benefit of not having any unwanted
side-effects on your application.

Mark



If this is for one debugging session, you could also simply use an add-on to a browser 
(such as Fiddler2 for IE), and record the full exchanges there.
It has the advantage that you see the complete traffic in both directions (headers and 
content), and that you can easily switch between different presentations of the data, and 
save it to file if you need to.  And depending on what you are looking for, it may be a 
lot easier to handle than Wireshark.





-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



logging input and output HTTP message payload

2015-06-17 Thread Milinda Perera
Hi,

I need to log HTTP payload content for debugging purposes. Following are my
findings:

1. Using HTTP message content Access Log Valve [1] and Extended Access Log
Valve [2]
  But it does not provide functionality to log HTTP payload

2. Then I tried by changing  *org.apache.coyote.level=FINE*
 With this it logs the entire HTTP request (header + payload). But
does not log response

Since in my 2nd method it logged the request, Is it possible to log
response also?

[1]
https://tomcat.apache.org/tomcat-7.0-doc/config/valve.html#Access_Log_Valve
[2]
https://tomcat.apache.org/tomcat-7.0-doc/config/valve.html#Extended_Access_Log_Valve

Thanks,
Milinda

-- 
* please consider our environment before printing this e-mail*


Re: logging input and output HTTP message payload

2015-06-17 Thread Mark Thomas
On 17/06/2015 10:10, Milinda Perera wrote:
 Hi,
 
 I need to log HTTP payload content for debugging purposes.

Use Wireshark. That has the added benefit of not having any unwanted
side-effects on your application.

Mark


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org