Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I create a 100% perl web server, and it went fine and work great. But after a while I begun to realize there's no picture on my browser. The web server could not get the picture. I don't know why. Where could it be wrong? I'am using Window, I was building by refering to manay website like POE etc, and I don't understand about forking. Some web page say in window the forking could not be done etc

Replies are listed 'Best First'.
•Re: Perl Web Server no picture
by merlyn (Sage) on Jul 13, 2004 at 17:58 UTC
    Maybe you're on an architecture that requires that you binmode your output handles, so that return/linefeed line endings don't get mangled for binary data.

    Just a guess, since I don't see enough in your question to be able to help you otherwise.

    -- Randal L. Schwartz, Perl hacker
    Be sure to read my standard disclaimer if this is a reply.

      I think he means: if you show us code, we will show you on which filehandle you need to call binmode.

      Most likely it is the filehandle for the file you are opening for reading. The file you want to serve to the world.

      Actually, such a bug has just been fixed in POE::Component::Server::HTTPServer. Check out diff at this link. Is CPAN amazing or what?

Re: Perl Web Server no picture
by ysth (Canon) on Jul 13, 2004 at 18:49 UTC
    There are existing perl web servers, you know.

    Though Merlyn has a good guess, it's really hard to tell without seeing your code or knowing exactly what error you are getting.