blob: f5747d75402cf002c77a67f70895547708d779d7 [file] [log] [blame]
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>apache_table</title><link rel="stylesheet" type="text/css" href="rivet.css"><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="Apache Rivet 3.1"><link rel="up" href="commands.html" title="Rivet Tcl Commands and Variables"><link rel="prev" href="apache_log_error.html" title="apache_log_error"><link rel="next" href="catch.html" title="catch"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">apache_table</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="apache_log_error.html"><img src="images/prev.png" alt="Prev"></a> </td><th width="60%" align="center">Rivet Tcl Commands and Variables</th><td width="20%" align="right"> <a accesskey="n" href="catch.html"><img src="images/next.png" alt="Next"></a></td></tr></table></div><div class="refentry"><div class="refentry.separator"><hr></div><a name="apache_table"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>apache_table — access and manipulate Apache tables in the request structure.</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis" style="width:80%"><div style="border: 1px solid #282; margin:1ex ; padding:.4ex; padding-left: 0.8ex; word-spacing:1ex "><span style="font-weight:bold ; font-family:monospace">::rivet::apache_table</span> (<span style="font-family:monospace; font-weight: bold;">get</span> | <span style="font-family:monospace; font-weight: bold;">set</span> | <span style="font-family:monospace; font-weight: bold;">exists</span> | <span style="font-family:monospace; font-weight: bold;">unset</span> | <span style="font-family:monospace; font-weight: bold;">names</span> | <span style="font-family:monospace; font-weight: bold;">array_get</span> | <span style="font-family:monospace; font-weight: bold;">clear</span>)</div></div></div><div class="refsect1"><a name="idm828"></a><h2>Description</h2><p style="width:90%">
The apache_table command is for accessing and manipulating
Apache tables in the request structure.
</p><p style="width:90%">
The table name must be one of
notes,
headers_in,
headers_out,
err_headers_out, or
subprocess_env.
</p><div class="variablelist"><dl class="variablelist"><dt><span class="term">
<div class="cmdsynopsis" style="width:80%"><div style="border: 1px solid #282; margin:1ex ; padding:.4ex; padding-left: 0.8ex; word-spacing:1ex "><span style="font-weight:bold ; font-family:monospace">::rivet::apache_table</span> <span style="font-family:monospace; font-weight: bold;">get</span> ?<span style="font-family:monospace; font-weight: bold;"><em class="replaceable"><code>tablename</code></em></span>? ?<span style="font-family:monospace; font-weight: bold;"><em class="replaceable"><code>key</code></em></span>?</div></div>
</span></dt><dd><div style="padding:4 ; margin-top:3 ; margin-bottom:3 ; width:75%"><div style="margin-bottom:1.5ex ; padding .5ex">
When given the name of an Apache table
<em class="replaceable"><code>tablename</code></em>
and the name of a key
<em class="replaceable"><code>tablename</code></em>,
returns the value of the key in the table, or an empty
string.
</div></div></dd><dt><span class="term">
<div class="cmdsynopsis" style="width:80%"><div style="border: 1px solid #282; margin:1ex ; padding:.4ex; padding-left: 0.8ex; word-spacing:1ex "><span style="font-weight:bold ; font-family:monospace">::rivet::apache_table</span> <span style="font-family:monospace; font-weight: bold;">set</span> ?<span style="font-family:monospace; font-weight: bold;"><em class="replaceable"><code>tablename</code></em></span>? ?<span style="font-family:monospace; font-weight: bold;"><em class="replaceable"><code>key</code></em></span>? ?<span style="font-family:monospace; font-weight: bold;"><em class="replaceable"><code>value</code></em></span>?</div></div>
<div class="cmdsynopsis" style="width:80%"><div style="border: 1px solid #282; margin:1ex ; padding:.4ex; padding-left: 0.8ex; word-spacing:1ex "><span style="font-weight:bold ; font-family:monospace">::rivet::apache_table</span> <span style="font-family:monospace; font-weight: bold;">set</span> ?<span style="font-family:monospace; font-weight: bold;"><em class="replaceable"><code>tablename</code></em></span>? ?<span style="font-family:monospace; font-weight: bold;"><em class="replaceable"><code>list</code></em></span>?</div></div>
</span></dt><dd><div style="padding:4 ; margin-top:3 ; margin-bottom:3 ; width:75%"><div style="margin-bottom:1.5ex ; padding .5ex">
Stores the <em class="replaceable"><code>value</code></em> in
the table <em class="replaceable"><code>tablename</code></em>
under the key <em class="replaceable"><code>key</code></em>.
</div><div style="margin-bottom:1.5ex ; padding .5ex">
For the list form,
<em class="replaceable"><code>list</code></em> contains
a list of zero or more pairs of key-value pairs to be
set into the table
<em class="replaceable"><code>tablename</code></em>.
</div></div></dd><dt><span class="term">
<div class="cmdsynopsis" style="width:80%"><div style="border: 1px solid #282; margin:1ex ; padding:.4ex; padding-left: 0.8ex; word-spacing:1ex "><span style="font-weight:bold ; font-family:monospace">::rivet::apache_table</span> <span style="font-family:monospace; font-weight: bold;">exists</span> ?<span style="font-family:monospace; font-weight: bold;"><em class="replaceable"><code>tablename</code></em></span>? ?<span style="font-family:monospace; font-weight: bold;"><em class="replaceable"><code>key</code></em></span>?</div></div>
</span></dt><dd><div style="padding:4 ; margin-top:3 ; margin-bottom:3 ; width:75%"><div style="margin-bottom:1.5ex ; padding .5ex">
Returns 1 if the specified key,
<em class="replaceable"><code>key</code></em>,
exists in table
<em class="replaceable"><code>tablename</code></em>,
else 0.
</div></div></dd><dt><span class="term">
<div class="cmdsynopsis" style="width:80%"><div style="border: 1px solid #282; margin:1ex ; padding:.4ex; padding-left: 0.8ex; word-spacing:1ex "><span style="font-weight:bold ; font-family:monospace">::rivet::apache_table</span> <span style="font-family:monospace; font-weight: bold;">unset</span> ?<span style="font-family:monospace; font-weight: bold;"><em class="replaceable"><code>tablename</code></em></span>? ?<span style="font-family:monospace; font-weight: bold;"><em class="replaceable"><code>key</code></em></span>?</div></div>
</span></dt><dd><div style="padding:4 ; margin-top:3 ; margin-bottom:3 ; width:75%"><div style="margin-bottom:1.5ex ; padding .5ex">
Removes the key-value pair referenced by
<em class="replaceable"><code>key</code></em>
from the table
<em class="replaceable"><code>tablename</code></em>.
</div></div></dd><dt><span class="term">
<div class="cmdsynopsis" style="width:80%"><div style="border: 1px solid #282; margin:1ex ; padding:.4ex; padding-left: 0.8ex; word-spacing:1ex "><span style="font-weight:bold ; font-family:monospace">::rivet::apache_table</span> <span style="font-family:monospace; font-weight: bold;">names</span> ?<span style="font-family:monospace; font-weight: bold;"><em class="replaceable"><code>tablename</code></em></span>?</div></div>
</span></dt><dd><div style="padding:4 ; margin-top:3 ; margin-bottom:3 ; width:75%"><div style="margin-bottom:1.5ex ; padding .5ex">
Returns a list of all of the keys present in the table
<em class="replaceable"><code>tablename</code></em>.
</div></div></dd><dt><span class="term">
<div class="cmdsynopsis" style="width:80%"><div style="border: 1px solid #282; margin:1ex ; padding:.4ex; padding-left: 0.8ex; word-spacing:1ex "><span style="font-weight:bold ; font-family:monospace">::rivet::apache_table</span> <span style="font-family:monospace; font-weight: bold;">array_get</span> ?<span style="font-family:monospace; font-weight: bold;"><em class="replaceable"><code>tablename</code></em></span>?</div></div>
</span></dt><dd><div style="padding:4 ; margin-top:3 ; margin-bottom:3 ; width:75%"><div style="margin-bottom:1.5ex ; padding .5ex">
Returns a list of key-value pairs from the table
<em class="replaceable"><code>tablename</code></em>.
</div></div></dd><dt><span class="term">
<div class="cmdsynopsis" style="width:80%"><div style="border: 1px solid #282; margin:1ex ; padding:.4ex; padding-left: 0.8ex; word-spacing:1ex "><span style="font-weight:bold ; font-family:monospace">::rivet::apache_table</span> <span style="font-family:monospace; font-weight: bold;">clear</span> ?<span style="font-family:monospace; font-weight: bold;"><em class="replaceable"><code>tablename</code></em></span>?</div></div>
</span></dt><dd><div style="padding:4 ; margin-top:3 ; margin-bottom:3 ; width:75%"><div style="margin-bottom:1.5ex ; padding .5ex">
Clears the contents of the specified table.
</div></div></dd></dl></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="apache_log_error.html"><img src="images/prev.png" alt="Prev"></a> </td><td width="20%" align="center"><a accesskey="u" href="commands.html"><img src="images/up.png" alt="Up"></a></td><td width="40%" align="right"> <a accesskey="n" href="catch.html"><img src="images/next.png" alt="Next"></a></td></tr><tr><td width="40%" align="left" valign="top">apache_log_error </td><td width="20%" align="center"><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a></td><td width="40%" align="right" valign="top"> catch</td></tr></table></div></body></html>