in reply to Re^3: problems with HTTP::Server::Simple::CGI
in thread problems with HTTP::Server::Simple::CGI

capture is exported by use IO::CaptureOutput qw(capture);. I am not closing anything. I blame that module for closing. I have no skill in debugging the deep bowels of sockets (LWP/Protocol/http.pm) and file handles (IO::CaptureOutput). Mostly because unlike variables, one cannot just dump them to inspect what's in them.

Please continue to help me, Anonmonk. You give me hope and other ideas.

Replies are listed 'Best First'.
Re^5: problems with HTTP::Server::Simple::CGI
by Anonymous Monk on Feb 20, 2009 at 10:35 UTC
    After careful examination and testing, you weren't returning full http headers, which you tried to fix up with capture, but all you need is nph:
    D:\>perl -MCGI -le"print CGI->header" Content-Type: text/html D:\>perl -MCGI -le"print CGI->header(-nph => 1)" HTTP/1.0 200 OK Server: cmdline Date: Fri, 20 Feb 2009 10:35:31 GMT Content-Type: text/html D:\>
    USING NPH SCRIPTS, No-Parse Headers