Sending POST requests to Jetty through a Cisco CE proxy

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Sending POST requests to Jetty through a Cisco CE proxy

Clinton Foster
Sending POST requests to Jetty through a Cisco CE proxy We’re running into an issue with a Cisco CE HTTP proxy, and I am trying to determine if it is in any way related to Jetty.

The scenario is as follows:

client -> proxy -> Jetty

1.  The client sends an HTTP 1.1 POST request to a servlet running under Jetty.  The request includes a "Connection: Close" header and a small payload.
2.  The servlet sends an HTTP 200 response with no payload.
3.  Even though the original request was sent with a "Connection: Close" header, the client observes a 30-second delay before the server (or proxy?) closes its end of the connection.

What I am trying to determine is if Jetty is really waiting 30 seconds to close the connection, or if the proxy is actually holding the connection to the client open after Jetty closes its end of the connection.  The delay does not occur if the request is sent directly to Jetty (bypassing the proxy).

Is it possible to enable some kind of logging in Jetty that would allow me to see when it is calling close on the socket?  This is really what I need to know, but since the servlet does not have direct access to the socket, I can’t tell when it is being closed.

The version of Jetty is 4.2, by the way.  I realize the logging is a bit different than in 5.  I tried getting an instance of org.mortbay.Log in my servlet to see what I might be able to accomplish by calling the setOptions method, but I was not successful.  I got a bit lost trying to sort out exactly what I needed to do when I looked at the documentation.  Any help would be much appreciated.

Clint Foster
Reply | Threaded
Open this post in threaded view
|

Re: Sending POST requests to Jetty through a Cisco CE proxy

Chris Haynes
Sending POST requests to Jetty through a Cisco CE proxy
By far the  quickest way to answer this question is with a packet-sniffer on the network between Jetty and Cisco.
 
I use Snort or tcpdump, running on Linux.
 
Googling "free windows packet sniffer" presents several Windows opportunities.
 
Chris Haynes
 
----- Original Message -----
Sent: Friday, April 29, 2005 7:42 AM
Subject: [Jetty-support] Sending POST requests to Jetty through a Cisco CE proxy

We’re running into an issue with a Cisco CE HTTP proxy, and I am trying to determine if it is in any way related to Jetty.

The scenario is as follows:

client -> proxy -> Jetty

1.  The client sends an HTTP 1.1 POST request to a servlet running under Jetty.  The request includes a "Connection: Close" header and a small payload.
2.  The servlet sends an HTTP 200 response with no payload.
3.  Even though the original request was sent with a "Connection: Close" header, the client observes a 30-second delay before the server (or proxy?) closes its end of the connection.

What I am trying to determine is if Jetty is really waiting 30 seconds to close the connection, or if the proxy is actually holding the connection to the client open after Jetty closes its end of the connection.  The delay does not occur if the request is sent directly to Jetty (bypassing the proxy).

Is it possible to enable some kind of logging in Jetty that would allow me to see when it is calling close on the socket?  This is really what I need to know, but since the servlet does not have direct access to the socket, I can’t tell when it is being closed.

The version of Jetty is 4.2, by the way.  I realize the logging is a bit different than in 5.  I tried getting an instance of org.mortbay.Log in my servlet to see what I might be able to accomplish by calling the setOptions method, but I was not successful.  I got a bit lost trying to sort out exactly what I needed to do when I looked at the documentation.  Any help would be much appreciated.

Clint Foster
Reply | Threaded
Open this post in threaded view
|

Re: Sending POST requests to Jetty through a Cisco CE proxy

Clinton Foster
In reply to this post by Clinton Foster
Re: Sending POST requests to Jetty through a Cisco CE proxy I’ve actually been using ethereal for that.  It’s amazing.  The “Follow TCP Stream” function just floors me.  It is very, very instructive and easy to use.  I’m running it on Windows at the moment, but I’m hoping the OS X version is just as good.

Anyway, the problem is that we’re at a point where we’re trying to prove whether the application is calling close at the socket level, and I’m not yet good enough at reading these traces to be able to demonstrate with complete confidence that a particular packet which flies by at the network level absolutely indicates that the application called close() at that moment at its level.  There is just too much stuff that happens down in the TCP stack for me to be sure of the timing if I can’t also see what is happening at the application level for comparison.  Ideally it would be very nice to see a log entry when Jetty is calling close() on the socket.  But if this isn’t possible, I will do some further experiments and see if I can develop some confidence correlating the TCP traces with calling close() in a test application that I have control over.

Thanks for your help,

Clint

   ----- Original Message -----


Sending POST requests to Jetty through a Cisco CE proxyBy far the  quickest way to answer
this question is with a packet-sniffer on the network between Jetty and Cisco.
 
 I use Snort or tcpdump, running on Linux.
 
 Googling "free windows packet sniffer" presents several Windows opportunities.
 
 Chris Haynes
Reply | Threaded
Open this post in threaded view
|

Re: Sending POST requests to Jetty through a Cisco CE proxy

Greg Wilkins-5
In reply to this post by Clinton Foster
Clinton,

My guess is that the empty 200 response is confusing the proxy, as
I am 99% sure jetty would be closing the connection.

Can you try setting the content length of the response to zero to make
sure the proxy knows there is not content.  Or perhaps send a small
token content to see if that makes a difference?

regards


Clinton Foster wrote:

> We’re running into an issue with a Cisco CE HTTP proxy, and I am trying
> to determine if it is in any way related to Jetty.
>
> The scenario is as follows:
>
> client -> proxy -> Jetty
>
> 1.  The client sends an HTTP 1.1 POST request to a servlet running under
> Jetty.  The request includes a "Connection: Close" header and a small
> payload.
> 2.  The servlet sends an HTTP 200 response with no payload.
> 3.  Even though the original request was sent with a "Connection: Close"
> header, the client observes a 30-second delay before the server (or
> proxy?) closes its end of the connection.
>
> What I am trying to determine is if Jetty is really waiting 30 seconds
> to close the connection, or if the proxy is actually holding the
> connection to the client open after Jetty closes its end of the
> connection.  The delay does not occur if the request is sent directly to
> Jetty (bypassing the proxy).
>
> Is it possible to enable some kind of logging in Jetty that would allow
> me to see when it is calling close on the socket?  This is really what I
> need to know, but since the servlet does not have direct access to the
> socket, I can’t tell when it is being closed.
>
> The version of Jetty is 4.2, by the way.  I realize the logging is a bit
> different than in 5.  I tried getting an instance of org.mortbay.Log in
> my servlet to see what I might be able to accomplish by calling the
> setOptions method, but I was not successful.  I got a bit lost trying to
> sort out exactly what I needed to do when I looked at the documentation.
>  Any help would be much appreciated.
>
> Clint Foster



-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
_______________________________________________
Jetty-support mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-support