All, I and others in the WebDAV community have been using the TCP-Mon utility that comes bundled with Axis for debugging the protocol. It works great *if* you're not using the proxy mode, otherwise it craps out on non-GET/POST requests. Looking at the source, it's an easy fix, just remove any references to GET and POST. If the server is in proxy mode, all communications will (hopefully) be well-formed HTTP and if they aren't well formed, the code would freak out anyways.

The patch is as follows:

787,788d786
< if ( bufferedData.startsWith( "GET " ) ||
< bufferedData.startsWith( "POST " )) {
824d821
< }
1437d1433
< if ( text.startsWith("POST ") || text.startsWith("GET ") ) {
1470d1465
< }

(Apologies for word-wrap, hopefully you get the idea. Also, you'll likely want to correct the indention of the code blocks.)

Other comments:

* It may be worthwhile to have an HTTP protocol validating option and perform full HTTP validation. (Verifying format of method and headers, sane header values for "standard" headers, content-length validation...)

* Would it be worthwhile to (have an option to) separate individual request/response pairs (the current tcpmon shows all requests/responses in the same connection. Not a problem for HTTP/1.0 but HTTP/1.1 with keepalive is annoying to match up.) I suspect this may be fairly easy to implement but I've only touched the code today. Having a tree display (top level being connection, lower level being request) might be good.

* I would find it highly useful to have a TCP-Mon "home page" and a separate distribution from Axis...Its usefulness is far reaching and is limited by being "tacked on" to the Axis project.

Reply via email to