expr.html.en revision 4eea6eaa18317f1122158d21b4437d90e04e56d2
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny<?xml version="1.0" encoding="ISO-8859-1"?>
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!--
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny This file is generated from xml source: DO NOT EDIT
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny -->
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny<title>Expressions in Apache - Apache HTTP Server</title>
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny<link href="/style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny<link href="/style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny<link href="/style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny<link href="/images/favicon.ico" rel="shortcut icon" /></head>
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny<body id="manual-page"><div id="page-header">
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny<p class="menu"><a href="/mod/">Modules</a> | <a href="/mod/directives.html">Directives</a> | <a href="/faq/">FAQ</a> | <a href="/glossary.html">Glossary</a> | <a href="/sitemap.html">Sitemap</a></p>
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny<p class="apache">Apache HTTP Server Version 2.3</p>
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny<img alt="" src="/images/feather.gif" /></div>
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny<div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="/images/left.gif" /></a></div>
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny<div id="path">
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="./">Version 2.3</a></div><div id="page-content"><div id="preamble"><h1>Expressions in Apache</h1>
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny<div class="toplang">
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny<p><span>Available Languages: </span><a href="/en/expr.html" title="English">&nbsp;en&nbsp;</a></p>
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny</div>
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny <p>Historically, there are several syntax variants for expressions used to express
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny a condition in the different modules of the Apache HTTP Server.
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny There is some ongoing effort to only use a single variant, called <em>ap_expr</em>,
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny for all configuration directives.
b58460076fe843c11d736ae244c1ac979a6473a4Simo Sorce This document describes the <em>ap_expr</em> expression parser.
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny </p>
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny </div>
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny<div id="quickview"><ul id="toc"><li><img alt="" src="/images/down.gif" /> <a href="#grammar">Grammar in BNF notation</a></li>
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny<li><img alt="" src="/images/down.gif" /> <a href="#vars">Variables</a></li>
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny<li><img alt="" src="/images/down.gif" /> <a href="#binop">Binary operators</a></li>
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny<li><img alt="" src="/images/down.gif" /> <a href="#unnop">Unary operators</a></li>
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny<li><img alt="" src="/images/down.gif" /> <a href="#functions">Functions</a></li>
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny</ul></div>
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
b58460076fe843c11d736ae244c1ac979a6473a4Simo Sorce<div class="section">
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny<h2><a name="grammar" id="grammar">Grammar in BNF notation</a></h2>
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny<blockquote>
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny<pre>
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zelenyexpr ::= "<strong>true</strong>" | "<strong>false</strong>"
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny | "<strong>!</strong>" expr
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny | expr "<strong>&amp;&amp;</strong>" expr
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny | expr "<strong>||</strong>" expr
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny | "<strong>(</strong>" expr "<strong>)</strong>"
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny | comp
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zelenycomp ::= stringcomp
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny | integercomp
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny | unaryop word
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny | word binaryop word
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny | word "<strong>in</strong>" "<strong>{</strong>" wordlist "<strong>}</strong>"
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny | word "<strong>in</strong>" listfunction
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny | word "<strong>=~</strong>" regex
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny | word "<strong>!~</strong>" regex
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zelenystringcomp ::= word "<strong>==</strong>" word | word "<strong>eq</strong>" word
b58460076fe843c11d736ae244c1ac979a6473a4Simo Sorce | word "<strong>!=</strong>" word | word "<strong>ne</strong>" word
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny | word "<strong>&lt;</strong>" word | word "<strong>lt</strong>" word
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny | word "<strong>&lt;=</strong>" word | word "<strong>le</strong>" word
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny | word "<strong>&gt;</strong>" word | word "<strong>gt</strong>" word
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny | word "<strong>&gt;=</strong>" word | word "<strong>ge</strong>" word
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zelenyintegercomp ::= word "<strong>-eq</strong>" word | word "<strong>eq</strong>" word
b58460076fe843c11d736ae244c1ac979a6473a4Simo Sorce | word "<strong>-ne</strong>" word | word "<strong>ne</strong>" word
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny | word "<strong>-lt</strong>" word | word "<strong>lt</strong>" word
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny | word "<strong>-le</strong>" word | word "<strong>le</strong>" word
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny | word "<strong>-gt</strong>" word | word "<strong>gt</strong>" word
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny | word "<strong>-ge</strong>" word | word "<strong>ge</strong>" word
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zelenywordlist ::= word
7fe69bb6ec70bce439c6b975a9a0044c98ff502bSimo Sorce | wordlist "<strong>,</strong>" word
7fe69bb6ec70bce439c6b975a9a0044c98ff502bSimo Sorce
7fe69bb6ec70bce439c6b975a9a0044c98ff502bSimo Sorceword ::= word "<strong>.</strong>" word
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny | digit
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny | "<strong>'</strong>" string "<strong>'</strong>"
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny | "<strong>"</strong>" string "<strong>"</strong>"
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny | variable
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny | function
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zelenystring ::= stringpart
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny | string stringpart
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zelenystringpart ::= cstring
7fe69bb6ec70bce439c6b975a9a0044c98ff502bSimo Sorce | variable
7fe69bb6ec70bce439c6b975a9a0044c98ff502bSimo Sorce
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zelenycstring ::= ...
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zelenydigit ::= [0-9]+
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zelenyvariable ::= "<strong>%{</strong>" varname "<strong>}</strong>"
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny | "<strong>%{</strong>" funcname "<strong>:</strong>" funcargs "<strong>}</strong>"
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zelenyfunction ::= funcname "<strong>(</strong>" word "<strong>)</strong>"
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny
7fe69bb6ec70bce439c6b975a9a0044c98ff502bSimo Sorcelistfunction ::= listfuncname "<strong>(</strong>" word "<strong>)</strong>"
7fe69bb6ec70bce439c6b975a9a0044c98ff502bSimo Sorce</pre>
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny</blockquote>
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny</div><div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny<div class="section">
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny<h2><a name="vars" id="vars">Variables</a></h2>
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny<p>XXX: not all vars are available in all request phases</p>
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny <p>Request headers (XXX:see req function)</p>
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny <table class="bordered"><tr class="header"><th>Name</th></tr>
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny<tr><td><code>HTTP_ACCEPT</code></td></tr>
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny<tr class="odd"><td><code>HTTP_FORWARDED</code></td></tr>
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny<tr><td><code>HTTP_HOST</code></td></tr>
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny<tr class="odd"><td><code>HTTP_PROXY_CONNECTION</code></td></tr>
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny<tr><td><code>HTTP_REFERER</code></td></tr>
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny<tr class="odd"><td><code>HTTP_USER_AGENT</code></td></tr>
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny</table>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny <p>Other request related variables</p>
b58460076fe843c11d736ae244c1ac979a6473a4Simo Sorce
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny <table class="bordered"><tr class="header"><th>Name</th><th>Description</th></tr>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny<tr><td><code>REQUEST_METHOD</code></td>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny <td /></tr>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny<tr class="odd"><td><code>REQUEST_SCHEME</code></td>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny <td /></tr>
b58460076fe843c11d736ae244c1ac979a6473a4Simo Sorce<tr><td><code>REQUEST_URI</code></td>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny <td /></tr>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny<tr class="odd"><td><code>REQUEST_FILENAME</code></td>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny <td /></tr>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny<tr><td><code>REMOTE_HOST</code></td>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny <td /></tr>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny<tr class="odd"><td><code>REMOTE_IDENT</code></td>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny <td /></tr>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny<tr><td><code>REMOTE_USER</code></td>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny <td /></tr>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny<tr class="odd"><td><code>SERVER_ADMIN</code></td>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny <td /></tr>
b58460076fe843c11d736ae244c1ac979a6473a4Simo Sorce<tr><td><code>SERVER_NAME</code></td>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny <td /></tr>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny<tr class="odd"><td><code>SERVER_PORT</code></td>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny <td /></tr>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny<tr><td><code>SERVER_PROTOCOL</code></td>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny <td /></tr>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny<tr class="odd"><td><code>SCRIPT_FILENAME</code></td>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny <td /></tr>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny<tr><td><code>PATH_INFO</code></td>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny <td /></tr>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny<tr class="odd"><td><code>QUERY_STRING</code></td>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny <td /></tr>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny<tr><td><code>IS_SUBREQ</code></td>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny <td /></tr>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny<tr class="odd"><td><code>DOCUMENT_ROOT</code></td>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny <td /></tr>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny<tr><td><code>AUTH_TYPE</code></td>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny <td /></tr>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny<tr class="odd"><td><code>THE_REQUEST</code></td>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny <td /></tr>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny<tr><td><code>CONTENT_TYPE</code></td>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny <td /></tr>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny<tr class="odd"><td><code>HANDLER</code></td>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny <td /></tr>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny<tr><td><code>REMOTE_ADDR</code></td>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny <td /></tr>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny<tr class="odd"><td><code>HTTPS</code></td>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny <td /></tr>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny<tr><td><code>IPV6</code></td>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny <td /></tr>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny<tr class="odd"><td><code>REQUEST_LOG_ID</code></td>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny <td /></tr>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny<tr><td><code>CONN_LOG_ID</code></td>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny <td /></tr>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny</table>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny <p>Misc variables</p>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny <table class="bordered"><tr class="header"><th>Name</th><th>Description</th></tr>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny<tr><td><code>TIME_YEAR</code></td>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny <td /></tr>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny<tr class="odd"><td><code>TIME_MON</code></td>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny <td /></tr>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny<tr><td><code>TIME_DAY</code></td>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny <td /></tr>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny<tr class="odd"><td><code>TIME_HOUR</code></td>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny <td /></tr>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny<tr><td><code>TIME_MIN</code></td>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny <td /></tr>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny<tr class="odd"><td><code>TIME_SEC</code></td>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny <td /></tr>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny<tr><td><code>TIME_WDAY</code></td>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny <td /></tr>
b58460076fe843c11d736ae244c1ac979a6473a4Simo Sorce<tr class="odd"><td><code>TIME</code></td>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny <td /></tr>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny<tr><td><code>SERVER_SOFTWARE</code></td>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny <td /></tr>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny<tr class="odd"><td><code>API_VERSION</code></td>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny <td /></tr>
b58460076fe843c11d736ae244c1ac979a6473a4Simo Sorce</table>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny</div><div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny<div class="section">
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny<h2><a name="binop" id="binop">Binary operators</a></h2>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny <p>With the exception of some built-in comparison operators, binary
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny operators have the form "<code>-[a-zA-Z][a-zA-Z0-9_]+</code>", i.e. a
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny minus and at least two characters. The name is not case sensitive.
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny Modules may register additional binary operators.</p>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny <table class="bordered"><tr class="header"><th>Name</th><th>Alternative</th> <th>Description</th></tr>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny<tr><td><code>==</code></td>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny <td><code>=</code></td>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny <td>String equality</td></tr>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny<tr class="odd"><td><code>!=</code></td>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny <td />
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny <td>String inequality</td></tr>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny<tr><td><code>&lt;</code></td>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny <td />
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny <td>String less than</td></tr>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny<tr class="odd"><td><code>&lt;=</code></td>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny <td />
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny <td>String less than or equal</td></tr>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny<tr><td><code>&gt;</code></td>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny <td />
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny <td>String greater than</td></tr>
7fe69bb6ec70bce439c6b975a9a0044c98ff502bSimo Sorce<tr class="odd"><td><code>&gt;=</code></td>
7fe69bb6ec70bce439c6b975a9a0044c98ff502bSimo Sorce <td />
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny <td>String greater than or equal</td></tr>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny<tr><td><code>-eq</code></td>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny <td><code>eq</code></td>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny <td>Integer equality</td></tr>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny<tr class="odd"><td><code>-ne</code></td>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny <td><code>ne</code></td>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny <td>Integer inequality</td></tr>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny<tr><td><code>-lt</code></td>
c03b28a38b14fdb59f74864ae4dc56affe256508Simo Sorce <td><code>lt</code></td>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny <td>Integer less than</td></tr>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny<tr class="odd"><td><code>-le</code></td>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny <td><code>le</code></td>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny <td>Integer less than or equal</td></tr>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny<tr><td><code>-gt</code></td>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny <td><code>gt</code></td>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny <td>Integer greater than</td></tr>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny<tr class="odd"><td><code>-ge</code></td>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny <td><code>ge</code></td>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny <td>Integer greater than or equal</td></tr>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny</table>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny</div><div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny<div class="section">
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny<h2><a name="unnop" id="unnop">Unary operators</a></h2>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny <p>Unary operators have the form "<code>-[a-zA-Z]</code>", i.e. a
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny minus and one character. The name <em>is</em> case sensitive.
c03b28a38b14fdb59f74864ae4dc56affe256508Simo Sorce Modules may register additional unary operators.</p>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny <table class="bordered"><tr class="header"><th>Name</th><th>Description</th></tr>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny<tr><td><code>-n</code></td>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny <td>String is not empty</td></tr>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny<tr class="odd"><td><code>-z</code></td>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny <td>String is empty</td></tr>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny</table>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny</div><div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny<div class="section">
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny<h2><a name="functions" id="functions">Functions</a></h2>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny <p>Normal string-valued functions take one string as argument and return
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny a string. Functions names are not case sensitive.
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny Modules may register additional functions.</p>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny <table class="bordered"><tr class="header"><th>Name</th><th>Description</th></tr>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny<tr><td><code>req</code>, <code>http</code></td>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny <td>Get HTTP request header</td></tr>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny<tr class="odd"><td><code>resp</code></td>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny <td>Get HTTP response header</td></tr>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny<tr><td><code>reqenv</code></td>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny <td>Lookup request environment variable</td></tr>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny<tr class="odd"><td><code>osenv</code></td>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny <td>Lookup operating system environment variable</td></tr>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny<tr><td><code>note</code></td>
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny <td>Lookup request environment variable</td></tr>
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny<tr class="odd"><td><code>env</code></td>
b58460076fe843c11d736ae244c1ac979a6473a4Simo Sorce <td>Reqturn first match of <code>note</code>, <code>reqenv</code>,
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny <code>osenv</code></td></tr>
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny<tr><td><code>tolower</code></td>
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny <td>Convert string to lower case</td></tr>
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny<tr class="odd"><td><code>toupper</code></td>
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny <td>Convert string to uppser case</td></tr>
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny<tr><td><code>escape</code></td>
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny <td>Escape special characters in %hex encoding</td></tr>
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny<tr class="odd"><td><code>unescape</code></td>
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny <td>Unescape %hex encoded string, leaving URL-special characters encoded (XXX: describe better)</td></tr>
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny<tr><td><code>file</code></td>
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny <td>Read contents from a file</td></tr>
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny</table>
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny <p>In addition to string-valued functions, there are also list-valued functions which
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny take one string as argument and return a wordlist, i.e. a list of strings. The wordlist
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny can be used with the special <code>-in</code> operator.
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny Functions names are not case sensitive.
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny Modules may register additional functions.</p>
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny <p>There are no built-in list-valued functions. mod_ssl provides
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny <code>PeerExtList</code> (XXX: link)</p>
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny</div></div>
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny<div class="bottomlang">
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny<p><span>Available Languages: </span><a href="/en/expr.html" title="English">&nbsp;en&nbsp;</a></p>
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny</div><div id="footer">
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny<p class="apache">Copyright 2010 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny<p class="menu"><a href="/mod/">Modules</a> | <a href="/mod/directives.html">Directives</a> | <a href="/faq/">FAQ</a> | <a href="/glossary.html">Glossary</a> | <a href="/sitemap.html">Sitemap</a></p></div>
e76d78338026fa47dca32eaf7f5c15eabb1b951aJan Zeleny</body></html>