pransome
Sep 24th, 2010, 01:05 PM
I have a web application created using the Spring Web MVC framework.
I am trying to debug a problem where some data from some HTTP POSTs to the application is not showing up.
I am looking for some help in figuring out how to trace or log the raw HTTP POST from within my application.
I'd like to be able trace something similar to what you would see with WireShark or a similar program. The trace would look something like the below, where I am most interested in the red text:
POST /SMSHandler/message.htm HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/xaml+xml, application/vnd.ms-xpsdocument, application/x-ms-xbap, application/x-ms-application, application/msword, application/vnd.ms-powerpoint, application/vnd.ms-excel, */*
Referer: http://randy.jsplovers.com/SMSHandler/message.htm
Accept-Language: en-us
Content-Type: application/x-www-form-urlencoded
UA-CPU: x86
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; MS-RTC LM 8; .NET4.0C; .NET4.0E)
Host: randy.jsplovers.com
Content-Length: 118
Connection: Keep-Alive
Cache-Control: no-cache
Cookie: JSESSIONID=45183EFF909D3402A73F597163D8D86B
phoneNumber=406.600.0344&carrier=Verizon&shortCode=SHCODE&body=My+message+text%21&receivedTime=12%3A00&guid=1234567890
I am trying to debug a problem where some data from some HTTP POSTs to the application is not showing up.
I am looking for some help in figuring out how to trace or log the raw HTTP POST from within my application.
I'd like to be able trace something similar to what you would see with WireShark or a similar program. The trace would look something like the below, where I am most interested in the red text:
POST /SMSHandler/message.htm HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/xaml+xml, application/vnd.ms-xpsdocument, application/x-ms-xbap, application/x-ms-application, application/msword, application/vnd.ms-powerpoint, application/vnd.ms-excel, */*
Referer: http://randy.jsplovers.com/SMSHandler/message.htm
Accept-Language: en-us
Content-Type: application/x-www-form-urlencoded
UA-CPU: x86
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; MS-RTC LM 8; .NET4.0C; .NET4.0E)
Host: randy.jsplovers.com
Content-Length: 118
Connection: Keep-Alive
Cache-Control: no-cache
Cookie: JSESSIONID=45183EFF909D3402A73F597163D8D86B
phoneNumber=406.600.0344&carrier=Verizon&shortCode=SHCODE&body=My+message+text%21&receivedTime=12%3A00&guid=1234567890