problem with PoCo::Server::SimpleHTTP
Lars Balker Rasmussen <[email protected]>
| Newsgroups | gmane.comp.lang.perl.poe |
|---|---|
| Message-ID | <[email protected]> |
I'm trying to make a mini-webapp that basically has to take a url that maps directly to a file, hold the connection until that file becomes available (or time out), and return the contents. POE::Component::Server::SimpleHTTP's streaming mode seems ideal, and I have a working implementation (based mostly on the example in the pod) on http://balker.dk/simplehttp.pl However, starting several streams at the same time will lead to only one of them being closed, as if they share the session? To reproduce: # mkdir -p /tmp/root/static ; echo foo > /tmp/root/static/foo.txt # perl simplehttp.pl and # wget -O foo.txt.1 http://localhost:8000/static/foo.txt & ; wget -O foo.txt.2 http://localhost:8000/static/foo.txt Both wgets will get the file contents, but only one will close the stream. Is there some kind of obvious mistake I'm making? Thanks, -- Lars Balker Rasmussen Consult::Perl