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/nixio.html">nixio
</a>
132 <a href=
"../modules/nixio.CHANGELOG.html">nixio.CHANGELOG
</a>
136 <a href=
"../modules/nixio.CryptoHash.html">nixio.CryptoHash
</a>
140 <a href=
"../modules/nixio.File.html">nixio.File
</a>
144 <a href=
"../modules/nixio.README.html">nixio.README
</a>
148 <a href=
"../modules/nixio.Socket.html">nixio.Socket
</a>
152 <a href=
"../modules/nixio.TLSContext.html">nixio.TLSContext
</a>
156 <a href=
"../modules/nixio.TLSSocket.html">nixio.TLSSocket
</a>
160 <a href=
"../modules/nixio.UnifiedIO.html">nixio.UnifiedIO
</a>
164 <a href=
"../modules/nixio.bin.html">nixio.bin
</a>
168 <a href=
"../modules/nixio.bit.html">nixio.bit
</a>
172 <a href=
"../modules/nixio.crypto.html">nixio.crypto
</a>
176 <a href=
"../modules/nixio.fs.html">nixio.fs
</a>
191 </div><!-- id="navigation" -->
195 <h1>Class
<code>luci.http.conditionals
</code></h1>
206 <table class=
"function_list">
209 <td class=
"name" nowrap
><a href=
"#if_match">if_match
</a> (req, stat)
</td>
214 Test whether the given message object contains an
"If-Match" header and
215 compare it against the given stat object.
</td>
219 <td class=
"name" nowrap
><a href=
"#if_modified_since">if_modified_since
</a> (req, stat)
</td>
222 14.25 / If-Modified-Since
224 Test whether the given message object contains an
"If-Modified-Since" header
225 and compare it against the given stat object.
</td>
229 <td class=
"name" nowrap
><a href=
"#if_none_match">if_none_match
</a> (req, stat)
</td>
232 14.26 / If-None-Match
234 Test whether the given message object contains an
"If-None-Match" header and
235 compare it against the given stat object.
</td>
239 <td class=
"name" nowrap
><a href=
"#if_range">if_range
</a> (req, stat)
</td>
244 The If-Range header is currently not implemented due to the lack of general
245 byte range stuff in luci.http.protocol .
</td>
249 <td class=
"name" nowrap
><a href=
"#if_unmodified_since">if_unmodified_since
</a> (req, stat)
</td>
252 14.28 / If-Unmodified-Since
254 Test whether the given message object contains an
"If-Unmodified-Since"
255 header and compare it against the given stat object.
</td>
259 <td class=
"name" nowrap
><a href=
"#mk_etag">mk_etag
</a> (stat)
</td>
262 Implement
14.19 / ETag.
</td>
276 <h2><a name=
"functions"></a>Functions
</h2>
277 <dl class=
"function">
281 <dt><a name=
"if_match"></a><strong>if_match
</strong> (req, stat)
</dt>
287 Test whether the given message object contains an
"If-Match" header and
288 compare it against the given stat object.
295 req: HTTP request message object
299 stat: A file.stat object
309 <h3>Return values:
</h3>
312 <li>Boolean indicating whether the precondition is ok
314 <li>Alternative status code if the precondition failed
325 <dt><a name=
"if_modified_since"></a><strong>if_modified_since
</strong> (req, stat)
</dt>
329 14.25 / If-Modified-Since
331 Test whether the given message object contains an
"If-Modified-Since" header
332 and compare it against the given stat object.
339 req: HTTP request message object
343 stat: A file.stat object
353 <h3>Return values:
</h3>
356 <li>Boolean indicating whether the precondition is ok
358 <li>Alternative status code if the precondition failed
360 <li>Table containing extra HTTP headers if the precondition failed
371 <dt><a name=
"if_none_match"></a><strong>if_none_match
</strong> (req, stat)
</dt>
375 14.26 / If-None-Match
377 Test whether the given message object contains an
"If-None-Match" header and
378 compare it against the given stat object.
385 req: HTTP request message object
389 stat: A file.stat object
399 <h3>Return values:
</h3>
402 <li>Boolean indicating whether the precondition is ok
404 <li>Alternative status code if the precondition failed
406 <li>Table containing extra HTTP headers if the precondition failed
417 <dt><a name=
"if_range"></a><strong>if_range
</strong> (req, stat)
</dt>
423 The If-Range header is currently not implemented due to the lack of general
424 byte range stuff in luci.http.protocol . This function will always return
425 false,
412 to indicate a failed precondition.
432 req: HTTP request message object
436 stat: A file.stat object
446 <h3>Return values:
</h3>
449 <li>Boolean indicating whether the precondition is ok
451 <li>Alternative status code if the precondition failed
462 <dt><a name=
"if_unmodified_since"></a><strong>if_unmodified_since
</strong> (req, stat)
</dt>
466 14.28 / If-Unmodified-Since
468 Test whether the given message object contains an
"If-Unmodified-Since"
469 header and compare it against the given stat object.
476 req: HTTP request message object
480 stat: A file.stat object
490 <h3>Return values:
</h3>
493 <li>Boolean indicating whether the precondition is ok
495 <li>Alternative status code if the precondition failed
506 <dt><a name=
"mk_etag"></a><strong>mk_etag
</strong> (stat)
</dt>
510 Implement
14.19 / ETag.
518 stat: A file.stat structure
528 <h3>Return value:
</h3>
529 String containing the generated tag suitable for ETag headers
542 </div> <!-- id="content" -->
544 </div> <!-- id="main" -->
547 <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>
548 </div> <!-- id="about" -->
550 </div> <!-- id="container" -->