Well, I find myself rummaging around in PoCoCl::HTTP (0.57) again... I have
two POE apps trying to exchange HTTP/XMLRPC messages, and getting a timeout
on the response. Tracked it down (so far) to poco_weeble_io_read() where it
decides it has a complete response, setting the state to DONE. The comments
immediately following say:
# -><- This assumes the server will now disconnect. That will
# give us an error 0 (socket's closed), and we will post the
# response.
Unfortunately, the POE server sending the response doesn't immediately close
the socket, so the client side times out. It *seems* that the ErrorEvent
for PoCoWh::ReadWrite is not getting called, which is preventing the wheel
from getting deleted (presumably the mechanism for closing the socket on the
server side.) I recall something about extraneous error 0 calls being
eliminated in the latest release... could this be related to that? I failed
to find anything in the latest changelog, but perhaps I missed it.
Interestingly, when I instigate requests using a Frontier::Client module,
the POE server behaves as expected: it sends the response, gets an
ErrorEvent, and deletes the wheel (indeed, up to this point such tests have
always been initiated using the Frontier client.) Now that I am finally to
the point of having a PoCoCl::HTTP session initiate the exact same request,
the server fails to shutdown the socket, and the client times out. I have
compared the HTTP headers generated by PoCoCl and Frontier; they are almost
identical:
Frontier:
POST /RPC2 HTTP/1.1
Connection: TE, close
Host: 63.110.3.90:7778
TE: deflate,gzip;q=0.3
User-Agent: libwww-perl/5.72
Content-Length: 1917
Content-Type: text/xml
PoCoCl::HTTP:
POST /RPC2 HTTP/1.1
Connection: TE, close
Host: 63.110.3.90:7778
TE: deflate,gzip;q=0.3
User-Agent: POE-Component-Client-HTTP/0.57 (perl; N; POE; en;
rv:0.570000)
Content-Length: 1747
Content-Type: text/xml
Is it possible that the client side is conditioning the socket in some way
that causes the server to behave differently?
I will continue to wander in this maze of twisty passages, but I was hoping
someone might have some batteries for my lamp, which will surely sputter
'ere long. I may be able to post some snippet of code at some point, but
it's pretty unwieldy right now.
Thanks for any insight --
Alan