[NANOWEB DOCUMENTATION]

NANOWEB, the aEGiS PHP web server

mod_meta

The HTTP/1.1 specification recommends, that parties involved in transfer of hypertext files should evaluate the <META HTTP-EQUIV> header tags of HTML pages as they would usual http transfer headers.
<HTML>
 <HEAD>
   <META HTTP-EQUIV="Content-Type" CONTENT="text/html">
   <META HTTP-EQUIV="Refresh" CONTENT="5; URL=page2.html">
   <META HTTP-EQUIV="X-Note" CONTENT="Nanoweb rulez">
...


mod_meta reads html files and makes these fields available in the actual http responses, as well as to other nanoweb modules which may want to see these additional http headers. All recent browsers understand these HTML-internal header fields, but proxys and webservers should be aware of them, too. However one can assume that proxys are regularily not, so this module is a good idea if you want to assure that the actual content is handled correctly by all involved http software.

Besides this, mod_meta reads companion .meta files that may exist and also makes the http headers found therein available in the http response. One could do this with mod_asis also, but for binary files this method is much easier to realize. The companion files require to have exactly the same name as the files to which the meta data should be added plus ".meta" at the end. If your file would have the name "example.html" the companion http headers file needed to have the name "example.html.meta". These files may only contain http header lines, no empty lines and especially no comments:
Content-Type: text/html
Content-Features: tables, javascript, css, color, graphic
X-Note: Nanoweb rulez!


How this module reads the META tags from the HTML files can be defined with the MetaFetch directive. The value 'fast' is the default and makes mod_meta use very fast string artithmetics to grep the content of the tags out of the html head. This however only works if these headers are in the form seen above (case doesn't matter of course).
If you want more reliability than you could use 'regex' instead, which also makes standard META tags (author, description, ...) available to other modules. A value of 'no' makes mod_meta not evaluate the html files, so only the .meta files are appended to the http response headers (the headers don't get available for use by other nanoweb extension modules currently).
You can effectively disable mod_meta with MetaFetch=0, this is useful if you want it to activate for some directories and files only.


bugreports are welcome: mario@erphesfurt·de


NANOWEB, the aEGiS PHP web server