Trouble with custom HTTP server and web proxy

We have a client/server application in which the client uses HTTP to
communicate with our custom web server.  All works fine until a web proxy gets
involved (in our test cases it is Netscape's web proxy).  What happens is that
seemingly at random, the proxy resets the connection with the client, right
after our server sends the the HTTP header.

Here's what I believe to be the problem so far:

 - for whatever reason, our server does not put a Content-Length in the HTTP
headers.

 - I believe the problem may appear random because of timing... if the server
sends the data after the HTTP header quickly enough, the proxy sends it.  If
the data is not forthcoming quickly enough, the server assumes the connection
is dead.  If a Content-Lengh is provided though, it does seem wait to get the
data and we have no problem.  If I put a forced delay between the sending of
the HTTP header and the content, I can get it to fail every time.

Note that we have NO PROBLEMS when its a direct connection between client and
server, its only when the web proxy is thrown into the mix that we see this
problem.

So my questions are:

 1. Is Content-Length always required in an HTTP (1.0) header?  What is
typical
behaviour when its not included?

 2. Is there any logical reason why a proxy would be more picky about
Content-Length being there than a web browser?


-Tim

Received on Tuesday, 28 September 1999 14:53:48 UTC