Brutha has asked for the wisdom of the Perl Monks concerning the following question:

There are many great Applications and modules written for interaction with a web-server (e.g. mod_perl) and a browser to display the results, e.g. everything or most wikis. But in my limited environment there is nothing like that, all http-request run into the proxy, so not even a local installation of a web-server would help.

Does anyone know about a solution to interface (not like everything but simpler) modules without a web-server. The result maybe HTML, I am not afraid to feed them to a browser.

This is possibly a second question for an alternative:
Does anyone know a wiki that runs without a http-server? I just need some simple stuff, but do not want to reinvent to much.

Oh, it is mainly for organizing my work and not meant for collaboration. Oh, and it is windows.

Thanks for any pointers

--
And it came to pass that in time the Great God Om spake unto Brutha, the Chosen One: "Psst!"
(Terry Pratchett, Small Gods)

  • Comment on Replacement for HTTP-Server in local environment

Replies are listed 'Best First'.
Re: Replacement for HTTP-Server in local environment
by Corion (Patriarch) on Jan 13, 2003 at 17:14 UTC

    As long as you are blessed with IE, it is not that hard to write your own browser, even though it does not use http. In Hand off HTML to Internet Explorer, I have an example how to write HTML into IE, thus using IE as your frontend for display.

    The hard part comes when you need to capture the events of IE, mostly, whenever a link is clicked. I recommend using a custom protocol for all "local" links (for example local://, so your script can decide whether to let IE handle the request itself or substitute your own HTML as the result of running a program by creating a local faked request. Roth consulting has some sample code on their website at http://www.roth.net/perl/scripts/scripts.asp?IEEvents.pl.

    To convert these events into CGI requests to your local server, either construct LWP requests from them or create CGI objects and hand them off to your (embedded) CGI code.

    perl -MHTTP::Daemon -MHTTP::Response -MLWP::Simple -e ' ; # The $d = new HTTP::Daemon and fork and getprint $d->url and exit;#spider ($c = $d->accept())->get_request(); $c->send_response( new #in the HTTP::Response(200,$_,$_,qq(Just another Perl hacker\n))); ' # web
Re: Replacement for HTTP-Server in local environment
by Zaxo (Archbishop) on Jan 13, 2003 at 17:08 UTC

    Check out HTTP::Daemon. It gives you a customizable small HTTP server which you can run on localhost with the user socket of your choice.

    After Compline,
    Zaxo

Re: Replacement for HTTP-Server in local environment
by dws (Chancellor) on Jan 13, 2003 at 17:09 UTC
    But in my limited environment there is nothing like that, all http-request run into the proxy, so not even a local installation of a web-server would help.

    If you're using IE, it can be configured to bypass intranet sites. And if you connect to a local web server via http://127.0.0.1/, you don't get proxied. Have you actually tried installing a web server locally? What happened?

Re: Replacement for HTTP-Server in local environment
by Brutha (Friar) on Jan 14, 2003 at 09:33 UTC
    First, thank you for your help, I try to summarize my tries.

    I already did try HTTP::Daemon and I get the error:

    The proxy is currently unable to handle the request due to a (possibly) temporary error. Extended error information is: Failed to forward the request to the web server at p30381:1060. This may be due to a firewall configuration error or a DNS failure.
    p30381 is the Hostname of my PC, using the IP address gives the same result. Ping 'p30381' works. IE uses automatic configuration, I think any options can only be changed temporay.
    But - thanks dws - 127.0.0.1 works, localhost does not. But that is not really a Perl problem.

    Corion, I already voted on your node 224692, which already was great fun. I have to dive a bit deeper into the Roth Consulting stuff, but it looks as if it could help. I am still not sure, wether I can use any kind of HTTP-Daemon or not, so this may be a way.

    --
    And it came to pass that in time the Great God Om spake unto Brutha, the Chosen One: "Psst!"
    (Terry Pratchett, Small Gods)