in reply to Re: POE::Component::Server::HTTP and CSS
in thread POE::Component::Server::HTTP and CSS

Thanks! :) You're correct about the reference to the array in the documentation. CGI.pm takes either a scalar or a reference to an array even with multiple items since the two css links are viewed as just text.

Unfortunately, the hang remains. :( I'm suspecting the culprit to be the buffering even though $|++ is specified. I'll do some research to see if flushing is handled differently in POE (probably is ;-)

Jason L. Froebe

Team Sybase member

No one has seen what you have seen, and until that happens, we're all going to think that you're nuts. - Jack O'Neil, Stargate SG-1

  • Comment on Re^2: POE::Component::Server::HTTP and CSS

Replies are listed 'Best First'.
Re^3: POE::Component::Server::HTTP and CSS
by ikegami (Patriarch) on Jan 10, 2006 at 19:25 UTC
    How can bufferning be an issue? You don't write to anything.

      Actually I am. Check out MainHandler() which is the content handler. The $response->content() will return to the web client the data specified. In this case, I'm calling the sub get_content().

      sub MainHandler { my ($request, $response) = @_; $response->code(RC_OK); $response->content( get_content($request) ); return RC_OK; }

      The handler is declared in create_httpd() which I didn't include in the OP :

      sub create_httpd { my ($kernel, $heap, $Port) = @_[KERNEL, HEAP, ARG0]; $kernel->alias_set('httpd_parent'); my $httpd = POE::Component::Server::HTTP->new ( Port => $Port, ContentHandler => { '/' => \&MainHandler } ); $heap->{httpd} = $httpd; }

      Jason L. Froebe

      Team Sybase member

      No one has seen what you have seen, and until that happens, we're all going to think that you're nuts. - Jack O'Neil, Stargate SG-1

        'tis working now. :) Looks like it was an issue of the remote css links. In any case.. thanks! :)

        Jason L. Froebe

        Team Sybase member

        No one has seen what you have seen, and until that happens, we're all going to think that you're nuts. - Jack O'Neil, Stargate SG-1