1 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
5 <title>Reference
</title>
6 <link rel=
"stylesheet" href=
"../luadoc.css" type=
"text/css" />
7 <!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/-->
14 <div id=
"product_logo"></div>
15 <div id=
"product_name"><big><b></b></big></div>
16 <div id=
"product_description"></div>
17 </div> <!-- id="product" -->
27 <li><a href=
"../index.html">Index
</a></li>
38 <a href=
"../modules/luci.dispatcher.html">luci.dispatcher
</a>
42 <a href=
"../modules/luci.http.html">luci.http
</a>
45 <li><strong>luci.http.conditionals
</strong></li>
48 <a href=
"../modules/luci.http.date.html">luci.http.date
</a>
52 <a href=
"../modules/luci.http.mime.html">luci.http.mime
</a>
56 <a href=
"../modules/luci.i18n.html">luci.i18n
</a>
60 <a href=
"../modules/luci.ip.html">luci.ip
</a>
64 <a href=
"../modules/luci.ip.cidr.html">luci.ip.cidr
</a>
68 <a href=
"../modules/luci.json.html">luci.json
</a>
72 <a href=
"../modules/luci.jsonc.html">luci.jsonc
</a>
76 <a href=
"../modules/luci.jsonc.parser.html">luci.jsonc.parser
</a>
80 <a href=
"../modules/luci.model.ipkg.html">luci.model.ipkg
</a>
84 <a href=
"../modules/luci.model.uci.html">luci.model.uci
</a>
88 <a href=
"../modules/luci.rpcc.html">luci.rpcc
</a>
92 <a href=
"../modules/luci.rpcc.ruci.html">luci.rpcc.ruci
</a>
96 <a href=
"../modules/luci.sys.html">luci.sys
</a>
100 <a href=
"../modules/luci.sys.init.html">luci.sys.init
</a>
104 <a href=
"../modules/luci.sys.iptparser.html">luci.sys.iptparser
</a>
108 <a href=
"../modules/luci.sys.net.html">luci.sys.net
</a>
112 <a href=
"../modules/luci.sys.process.html">luci.sys.process
</a>
116 <a href=
"../modules/luci.sys.user.html">luci.sys.user
</a>
120 <a href=
"../modules/luci.sys.wifi.html">luci.sys.wifi
</a>
124 <a href=
"../modules/luci.util.html">luci.util
</a>
128 <a href=
"../modules/luci.xml.html">luci.xml
</a>
132 <a href=
"../modules/nixio.html">nixio
</a>
136 <a href=
"../modules/nixio.CHANGELOG.html">nixio.CHANGELOG
</a>
140 <a href=
"../modules/nixio.CryptoHash.html">nixio.CryptoHash
</a>
144 <a href=
"../modules/nixio.File.html">nixio.File
</a>
148 <a href=
"../modules/nixio.README.html">nixio.README
</a>
152 <a href=
"../modules/nixio.Socket.html">nixio.Socket
</a>
156 <a href=
"../modules/nixio.TLSContext.html">nixio.TLSContext
</a>
160 <a href=
"../modules/nixio.TLSSocket.html">nixio.TLSSocket
</a>
164 <a href=
"../modules/nixio.UnifiedIO.html">nixio.UnifiedIO
</a>
168 <a href=
"../modules/nixio.bin.html">nixio.bin
</a>
172 <a href=
"../modules/nixio.bit.html">nixio.bit
</a>
176 <a href=
"../modules/nixio.crypto.html">nixio.crypto
</a>
180 <a href=
"../modules/nixio.fs.html">nixio.fs
</a>
195 </div><!-- id="navigation" -->
199 <h1>Class
<code>luci.http.conditionals
</code></h1>
210 <table class=
"function_list">
213 <td class=
"name" nowrap
><a href=
"#if_match">if_match
</a> (req, stat)
</td>
218 Test whether the given message object contains an
"If-Match" header and
219 compare it against the given stat object.
</td>
223 <td class=
"name" nowrap
><a href=
"#if_modified_since">if_modified_since
</a> (req, stat)
</td>
226 14.25 / If-Modified-Since
228 Test whether the given message object contains an
"If-Modified-Since" header
229 and compare it against the given stat object.
</td>
233 <td class=
"name" nowrap
><a href=
"#if_none_match">if_none_match
</a> (req, stat)
</td>
236 14.26 / If-None-Match
238 Test whether the given message object contains an
"If-None-Match" header and
239 compare it against the given stat object.
</td>
243 <td class=
"name" nowrap
><a href=
"#if_range">if_range
</a> (req, stat)
</td>
248 The If-Range header is currently not implemented due to the lack of general
249 byte range stuff in luci.http.protocol .
</td>
253 <td class=
"name" nowrap
><a href=
"#if_unmodified_since">if_unmodified_since
</a> (req, stat)
</td>
256 14.28 / If-Unmodified-Since
258 Test whether the given message object contains an
"If-Unmodified-Since"
259 header and compare it against the given stat object.
</td>
263 <td class=
"name" nowrap
><a href=
"#mk_etag">mk_etag
</a> (stat)
</td>
266 Implement
14.19 / ETag.
</td>
280 <h2><a name=
"functions"></a>Functions
</h2>
281 <dl class=
"function">
285 <dt><a name=
"if_match"></a><strong>if_match
</strong> (req, stat)
</dt>
291 Test whether the given message object contains an
"If-Match" header and
292 compare it against the given stat object.
299 req: HTTP request message object
303 stat: A file.stat object
313 <h3>Return values:
</h3>
316 <li>Boolean indicating whether the precondition is ok
318 <li>Alternative status code if the precondition failed
329 <dt><a name=
"if_modified_since"></a><strong>if_modified_since
</strong> (req, stat)
</dt>
333 14.25 / If-Modified-Since
335 Test whether the given message object contains an
"If-Modified-Since" header
336 and compare it against the given stat object.
343 req: HTTP request message object
347 stat: A file.stat object
357 <h3>Return values:
</h3>
360 <li>Boolean indicating whether the precondition is ok
362 <li>Alternative status code if the precondition failed
364 <li>Table containing extra HTTP headers if the precondition failed
375 <dt><a name=
"if_none_match"></a><strong>if_none_match
</strong> (req, stat)
</dt>
379 14.26 / If-None-Match
381 Test whether the given message object contains an
"If-None-Match" header and
382 compare it against the given stat object.
389 req: HTTP request message object
393 stat: A file.stat object
403 <h3>Return values:
</h3>
406 <li>Boolean indicating whether the precondition is ok
408 <li>Alternative status code if the precondition failed
410 <li>Table containing extra HTTP headers if the precondition failed
421 <dt><a name=
"if_range"></a><strong>if_range
</strong> (req, stat)
</dt>
427 The If-Range header is currently not implemented due to the lack of general
428 byte range stuff in luci.http.protocol . This function will always return
429 false,
412 to indicate a failed precondition.
436 req: HTTP request message object
440 stat: A file.stat object
450 <h3>Return values:
</h3>
453 <li>Boolean indicating whether the precondition is ok
455 <li>Alternative status code if the precondition failed
466 <dt><a name=
"if_unmodified_since"></a><strong>if_unmodified_since
</strong> (req, stat)
</dt>
470 14.28 / If-Unmodified-Since
472 Test whether the given message object contains an
"If-Unmodified-Since"
473 header and compare it against the given stat object.
480 req: HTTP request message object
484 stat: A file.stat object
494 <h3>Return values:
</h3>
497 <li>Boolean indicating whether the precondition is ok
499 <li>Alternative status code if the precondition failed
510 <dt><a name=
"mk_etag"></a><strong>mk_etag
</strong> (stat)
</dt>
514 Implement
14.19 / ETag.
522 stat: A file.stat structure
532 <h3>Return value:
</h3>
533 String containing the generated tag suitable for ETag headers
546 </div> <!-- id="content" -->
548 </div> <!-- id="main" -->
551 <p><a href=
"http://validator.w3.org/check?uri=referer"><img src=
"http://www.w3.org/Icons/valid-xhtml10" alt=
"Valid XHTML 1.0!" height=
"31" width=
"88" /></a></p>
552 </div> <!-- id="about" -->
554 </div> <!-- id="container" -->