I need to establish an http connection from a client box (using libwww, if its possible) to a server and use the connection as a notification channel (server sends messages over it). The connection is thru a firewall and port 443 is the only outgoing port - and the server box has apache running on 443. So, https is the only thing I can do. (plus I'll need a heartbeat to prevent the firewall from tearing it down due to inactivity)
First, does lwp have a way to support a persistent connection? Documentation is unclear and the most relevant info seems to be in LWPng which is years and years old...
I've spent most of my time trying to get Client-Transfer-Encoding = chunked (or is that Content-Transfer-Encoding or perhaps just Transfer-Encoding..) to work but little success and examples are non-existent - esp if the chunking is formatted according to the http 1.1 spec, (with the leading byte count and trailing headers http://www.oreilly.com/openbook/webclient/appa.html)... I've looked at the test/live/jigsaw-chunk.t and while it seems close, chunks are of unpredictable size and there does not appear to be any formatting in it.
I've been unable to reliably read chunked messages, client side just hangs, like its waiting for a close or something.
I need examples in perl of a cgi like script producing a chunked message and the client side reading a formatted chunked message.
I'd really appreciate any help, links to code would be greatly appreciated as would a blunt reality check..
Thanks Anders
