7

I have a GeoServer 2.0.2 and I send POST requests using mobile devices. I would like to see how the incoming POST request HTTP headers are formatted, especially what kind of character encoding and response type are provided by the client.

How can I setup GeoServer and/or Jetty to provide me with these informations?

Devdatta Tengshe
41.8k37 gold badges148 silver badges267 bronze badges
asked Sep 5, 2011 at 8:56

2 Answers 2

8

You can capture the entire tcp stream using e.g.

tcpdump -i interface_name port 8080 -w /tmp/capture

after the capture is complete you copy the file from the server to some station and use wireshark to decode the capture.

answered Sep 5, 2011 at 12:19
4

You can install and configure the logback tee filter as documented here:

http://logback.qos.ch/access.html#teeFilter

The Tee filter seems to dump both request and response headers.

another solution builtin in geoserver, does not meet user requirements

Edit the web.xml file in

webapps/geoserver/WEB-INF/web.xml

then scroll down until you reach the filter called 'Request Logging Filter' and enable it. Restart geoserver to apply the new cfg.

answered Sep 5, 2011 at 11:14
2
  • I have tried that, but it doesn't include the HTTP headers. Commented Sep 5, 2011 at 11:29
  • Then I'm afraid you'll have to either use a proxy like Charles or tcpdump the traffic as suggested in another solution. Commented Sep 5, 2011 at 12:31

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.