Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

dws (341)

  (email not shown publicly)

Journal of dws (341)

Friday October 18, 2002
05:15 PM

Oops, round n+1

[ #8460 ]

I'm hacking up something with HTTP::Daemon, and discovered that send_file() doesn't fly if you pass it a filename. (It's normally called from send_file_response(), which passes send_file() a reference to a glob instead of a filename.) Within send_file(), if you pass a filename, the file handle it uses gets prematurely delocalized, sysread() fails, and nothing gets sent down the socket. Take a look at the code. See it? I didn't at first.

So, my first ever submission to and I submit a patch that fixes my weird case but breaks the normal case. Oops. The second patch should do the trick.

Next up is to figure out how to use HTTP::Daemon along with IO::Select, so that I handle multiple sockets simultaneously in a non-forking situation, while honoring Connection: keep-alive. I hear the sound of a wheel being reinvented, but I'm doing something custom, and want to distribute it as a single file that runs on top of a standard distribution.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.