Logo address

Pegasus 2.3


Last Update: 2006/12/18

Bug fix and new features.
The source is in http://plan9.aichi-u.ac.jp/netlib/

This page describes only the new feature. Basic features are unchanged. Look Pegasus 2.2 documents for more detail.

More directories in $web

What was a problem?

Let's $web be httpd root for Pegasus.
We had restriction that only three directories "bin", "etc" and "doc" can be added in $web. Now the restriction has been removed.

Pegasus 2.3 internally executes (in rc notation)
bind -a $web /usr/web

Therefore, remove empty directory "/usr/web/doc"


Now we can locate a private files such as users information for a web service as following
then the file "users" is outside of document root, and therefore only accessible via CGI.

CGI timeout for each CGI

What was a problem?

Some CGIs take much time to complete the task. The time is CGI dependent.
Therefore I enabled dynamical resetting of CGI timeout for each CGI.

A environment variable "hpid" is introduced for this purpose.
The "pid" is that of Pegasus in service.

Example 1

In starting service, execute
	echo -n timeout 180 > /proc/$hpid/note
which will reset CGI timeout to 180 seconds.

Example 2

The example below written in Python is extracted from a script on my server.
def settimeout(n):
        f=open(note, "w")
        if f==None:
                print "unable to open %s"%note
                print "timeout is not set"
        f.write("timeout %d"%n)
if e.has_key("hpid"):
if hpid:
# continues heavy loaded tasks

New option for hfmt

New option "-x" is added to a CGI tool "hfmt" so that non-ascii runes in path name can be converted to %HH format.

What was a problem?

Microsoft IE sometimes fails to handle UTF-8 encoded path name in href value.


The following code in rit scrit will produce local references to all files in the current directory.
<pre>${ ls | hfmt -x '<a href="%U">%H</a>' 1 1}</pre>