in reply to Re: Mod CGI problems with POST
in thread Mod CGI problems with POST

Good catch, but I removed the second one and the problem persists.

Replies are listed 'Best First'.
Re^3: Mod CGI problems with POST
by chromatic (Archbishop) on May 31, 2007 at 06:07 UTC

    Oh, right. I overlooked HTTP::Daemon. The problem now is that CGI expects to read from STDIN, but you have another filehandle from which you want to read. I sent Lincoln a patch a long, long time ago to pass in a filehandle from which CGI should read, but I don't know if he ever applied it.

    I remember doing something similar with CGI::Simple instead.

      Do you remember what that filehandle is? Also, it's not clear from the docus how you pass a filehandle to CGI or CGI::Simple if you know what it is. Or is that what your patch was for?

      Anyway I suppose if I knew the filehandle I could just read and parse it manually and skip CGI.

      UPDATE: I take it back: CGI::Simple Docs say "If you provide a file handle to the new() method, it will read parameters from the file (or STDIN, or whatever)." But I still need to know the filehandle.

        I believe it's $r in your code; it's an IO::Handle subclass (through about three levels of subclassing).