![]() |
![]() |
charset" in /sys/lib/httpd.conf
For those who are new to Pegasus, the installation instructions for Pegasus 2.5 are provided.
Concept of Pegasus is explained in the document "Pegasus — another httpd for Plan 9 —", and you will find other manuals in ver.2.2 documents. Most of them are kept unchanged.
Pegasus is a flexible httpd server. If you want to know more about current Pegasus, you need to read changes after Pegasus 2.2. These changes are in the documents, Pegasus 2.3 and Pegasus 2.4.
charset" in /sys/lib/httpd.confAccording to RFC2616, default HTTP charset is latin (ISO-8859-1). The default is problematic, because we have needs to transmit plain text data encoded other than latin charset. So, a new parameter "charset" is introduced in /sys/lib/httpd.conf. The usage is:
charset utf-8 # HTTP header charset. The default is latin(iso-8859-1)
With this parameter, HTTP header "Content-Type" becomes
Content-Type: text/plain; charset=utf-8
which tells clients that plain text submitted from httpd is encoded in utf-8.
Parameter "charset" in /sys/lib/httpd.conf acts not only "text/plain" but also all "text/*" in "Content-Type" in HTTP headers. Thus "meta" tag such as
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
in HTML documents is unnecessary.
NB: Note that according to RFC2616, the "meta" tag is not only unnecessary but also ineffective if you specify "charset" in HTTP header, which means web documents must be written in utf-8 encoding.
Pegasus has it's own password file which supports Basic and Digest authentication schemes. The password file is in /etc in httpd name space. The file has been in accessible name space of CGIs. Although passwords are encrypted, it's safer to hide them from CGIs. Now the problem has been fixed as follows: files in /etc are hided from non-authenticated CGIs. Authenticated users can see files in /etc via CGI as it has been.
timezone" is passed to CGI so that "date" works in CGI script