You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Barry Fritchman <ba...@yahoo.com> on 2000/12/21 02:54:09 UTC

Synchronization error in BinHTTPURLInputStream

I recently had trouble getting URLInputSource to work
with Tomcat even though it worked fine for files
hosted by Jigsaw.  What I found was that if I placed a
Sleep(50) between the calls to send and recv on the
socket (in the BinHTTPURLInputStream ctor), the
problem went away.  Without the delay, only a partial
response was being received (from Tomcat), basically
only the response status line and no response body.

Obviously, inserting an arbitrary delay is not a
robust solution, but I don't know enough about Winsock
to fix it right.  Perhaps there is a blocking version
of send?  I'm guessing it works asynchronously the way
it is written now.  Anyone have any thoughts on this?

Barry


__________________________________________________
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
http://shopping.yahoo.com/