Suggestions

From PlainOldWebserver

Jump to: navigation, search

Click on the '+' sign above to add a new entry.

Contents

Custom error pages

Is it possible to define a custom 404 error page for POW? If not, could it be added to the wishlist, please?

Additional pow_server variables

pow_server.ROOT_DIRECTORY -- should return the "/pow/htdocs" directory

pow_server.DATA_DIRECTORY -- for the sqlite databases directory "/pow/data"

there should be a directory listing function

added for pow 1.4 http://davidkellogg.com/wiki/Pow_list_dir

Proxy

FOR XULRunner Version: Ability to set a proxy server for use with commands likes Like

var contents = pow_file("http://www.yahoo.com/")
var contents = pow_download_file('http://www.yahoo.com/');

The Addon version uses Firefox's proxy setting so its not a problem for that version.

pow_securewrite

As I was walking to work this morning I was thinking how can I do ssl on pow server. Then I realized that with POW you have access to both end of the connection so you don't need to use public key for message passing. You can use symmetric encryption to secure your connection. Lets think about how we can make this work. -- Dave will look into True SSL with POW

Dojo Offline

Could you elaborate on the notes below: Because I don't see what the point would be. Since if you are using Pow you are not ever offline even when your local machine is not connected to the internet.

Link pow to Dojo Offline as an alternative backend. Google Gears is another project with similar aims but it's a closed end solution.

I do link to google gears here http://davidkellogg.com/wiki/POW_Competition

Extend Ajax functionality

Extend the ajax functions in POW to allow for more flexible usage. I wrote an ajax lib for POW (Pajax) based on xajax which I think fills the role. Please feel free to use/modify it as you see fit. You can find it on the google group in the files section.

Share javascript code between server and client

As far as I understand POW, JS code in <sjs> tags is executed on the server, while code in <script> tags is executed on the client. It would be nice if code could be defined to run both on the server and the client. This is useful for validating user input for example. The function doing the validation could be called both on the client and the server.

Jaxer is a javascript server that combines the Apache and the Mozilla engine. It has some nice functions for transparently calling server code from the server. A function can be defined as "proxy", which will cause a stub to be generated for the client, that will call the function on the server via AJAX. I think some of these ideas could be implemented in POW.

Example:

<html>
<?sjs
    // code runs on server
    function saveUserInput(data) {
        validateInput(data);
        ....
    }
    saveUserInput.proxy = true;
?>
<?sjs-both
    // code runs on server and client
    function validateInput(data) {
        ....
    }
?>
<script>
    // code runs on client
    ...
    validateInput(data);
    ...
    saveUserInput(data);
</script>
</html>

--Stw 07:52, 27 January 2008 (PST)

Proxy server

How about implementing a proxy server in POW? e.g. POW on firefox listens on port 8888, either restricted to localhost or allowing connections from the network. Connections are completed according to proxy.pac. The advantage to this over native proxies (such as tinyproxy, squid, etc.) is that they can't use proxy.pac.

OpenID module

An implementation of OpenID authentication in sjs would be great. Examples in PHP, Ruby and Python are here. Forum topic asking for an implementation in Jaxer here. Being able to use a Yubikey on POW forms is one advantage, though that might be accomplished with sjs if a module was implemented for that directly. Mardeg 13:49, 31 May 2008 (PDT)

PHP and POST variables

The following works on other web servers, like Apache

index.html:

 <html>
 <form action="collect.php" method="POST">
 Name: <input type="text" name="name" />
 <input type="submit" />
 </form>
 </html>

collect.php:

 <?php
 echo $_POST['name']
 ?>

Do I miss something here? Regards --AlexanderDreyer 14:30, 11 February 2009 (PST)

Answering myself: In contrast to Apache, whose php-module has full access to php's internals, pow has no access to variables like _POST, _GET and _REQUEST of php's command line interface. The corresponding submits are stored as strings within the environment. The following wrapper-script can be used to work around this issue (example for SuSE Linux):

wrapphp.php:

 #!/usr/bin/php5
 <?php 
 
 foreach(explode("&", $_SERVER['POST_STRING'])  as $value) {
   list($var, $val) = explode("=", $value);
   $_POST[$var] = $val;
   $_REQUEST[$var] = $val;
 }
 
 foreach(explode("&", $_SERVER['QUERY_STRING'])  as $value) {
   list($var, $val) = explode("=", $value);
   $_GET[$var] = $val;
   $_REQUEST[$var] = $val;
 }
 
 if ($_SERVER['argc'] > 1)
   include($_SERVER['argv'][1]);
 ?>

Finally, wrapphp.php needs execution permission and has to be added to startup.sjs:

 pow_server.APP_HANDLERS['php']  = '/path/to/wrapphp.php';

Regards --AlexanderDreyer 13:56, 16 February 2009 (PST)

New Logo

Hello,

I love this project, but it's oldfashion, so I have a new Logo for you :

PNG image

And the SVG is here :

SVG image

This image is under Creative Commons By-Sa with link to my website and my name : Dorian.

Nairod 13:30, 16 June 2009 (PDT)

Net Cat Thing

I have a front end to socat written using Adobe Flex. I have found it very useful but I would rather it were more portable. I am looking at a rewrite in XUL based on POW. Basically a graph (nodes and edges) representing a set of networked devices. The tool acts as a man-in-the-middle to tap and inject messages. In addition it maintains a log of the messages which can be replayed later for regression testing.

I am looking for someone who can offer advice and critique the XUL application as I develop it.

DirectoryIndex equivalent

As far as I can see, right now, there is no way to redefine what the directory index file should be. POW seems to be of the opinion that it's either index.sjs or nothing. With support for other languages available, there should be a way to define a list of index files (Apache, for example, does it with the DirectoryIndex configuration directory, hence the title of this section). My apologies if this functionality is already available; if it is, I would love a pointer to the appropriate section in the documentation.

SMTP Client

I need my POW to send short email messages. When a form is submitted to POW, it needs to parse the results, but then email them in a human readable form instead of the usual gobbledy-gook that mailto: produces.

Personal tools
Navigation