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

Now you fix it ?:) Sorry, I've never heard of capture, so can't guess what you're doing wrong :) Maybe you're closing the connection prematurely? ( die "oh noes")

Replies are listed 'Best First'.
Re^4: problems with HTTP::Server::Simple::CGI
by Anonymous Monk on Feb 18, 2009 at 13:21 UTC

    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.

      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