1
<?xml version="1.0" encoding="iso-8859-1"?>
2
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3
"DTD/xhtml1-transitional.dtd">
4
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
6
<title>twisted.web.static</title>
7
<link rel="stylesheet" href="epydoc.css" type="text/css"></link>
9
<body bgcolor="white" text="black" link="blue" vlink="#204080"
12
<!-- =========== START OF NAVBAR =========== -->
13
<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
15
<th class="navbar"> <a class="navbar" href="twisted.html">Home</a> </th>
16
<th class="navbar"> <a class="navbar" href="trees.html">Trees</a> </th>
17
<th class="navbar"> <a class="navbar" href="indices.html">Index</a> </th>
18
<th class="navbar"> <a class="navbar" href="help.html">Help</a> </th>
19
<th class="navbar" align="right" width="100%">
20
<table border="0" cellpadding="0" cellspacing="0">
21
<tr><th class="navbar" align="center">
23
<a class="navbar" target="_top" href="http://twistedmatrix.com/">Twisted 1.3.0rc1</a>
24
</p></th></tr></table>
28
<table width="100%" cellpadding="0" cellspacing="0">
31
<font size="-1"><b class="breadcrumbs">
32
<a href="twisted.html">Package twisted</a> ::
33
<a href="twisted.web.html">Package web</a> ::
37
<td><table cellpadding="0" cellspacing="0">
38
<tr><td align="right"><font size="-2">[<a href="frames.html"target="_top">frames</a> | <a href="twisted.web.static.html" target="_top">no frames</a>]</font></td></tr>
42
<!-- =========== START OF MODULE DESCRIPTION =========== -->
43
<h2 class="module">Module twisted.web.static</h2>
45
I deal with static resources.
48
<!-- =========== START OF CLASSES =========== -->
49
<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
50
<tr bgcolor="#70b0f0" class="summary">
51
<th colspan="2">Classes</th></tr>
53
<b><a href="twisted.web.static.ASISProcessor.html"><code>ASISProcessor</code></a></b></td>
56
<b><a href="twisted.web.static.Data.html"><code>Data</code></a></b></td>
57
<td>This is a static, in-memory resource.</td></tr>
59
<b><a href="twisted.web.static.File.html"><code>File</code></a></b></td>
60
<td>File is a resource that represents a plain non-interpreted file
61
(although it can look for an extension like .rpy or .cgi and hand the
62
file to a processor for interpretation if you wish).</td></tr>
64
<b><a href="twisted.web.static.FileTransfer.html"><code>FileTransfer</code></a></b></td>
65
<td>A class to represent the transfer of a file over the network.</td></tr>
67
<b><a href="twisted.web.static.Redirect.html"><code>Redirect</code></a></b></td>
70
<b><a href="twisted.web.static.Registry.html"><code>Registry</code></a></b></td>
71
<td>I am a Componentized object that will be made available to internal
72
Twisted file-based dynamic web content such as .rpy and .epy scripts.</td></tr>
76
<!-- =========== START OF FUNCTION SUMMARY =========== -->
77
<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
78
<tr bgcolor="#70b0f0" class="summary">
79
<th colspan="2">Function Summary</th></tr>
80
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
81
<td><code><a name="addSlash"></a><span class="summary-sig"><span class="summary-sig-name">addSlash</span>(<span class=summary-sig-arg>request</span>)</span></code>
83
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
84
<td><code><a name="getTypeAndEncoding"></a><span class="summary-sig"><span class="summary-sig-name">getTypeAndEncoding</span>(<span class=summary-sig-arg>filename</span>,
85
<span class=summary-sig-arg>types</span>,
86
<span class=summary-sig-arg>encodings</span>,
87
<span class=summary-sig-arg>defaultType</span>)</span></code>
89
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
90
<td><code><a name="isDangerous"></a><span class="summary-sig"><span class="summary-sig-name">isDangerous</span>(<span class=summary-sig-arg>path</span>)</span></code>
92
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
93
<td><code><span class="summary-sig"><a href="twisted.web.static.html#loadMimeTypes" class="summary-sig-name"><code>loadMimeTypes</code></a>(<span class=summary-sig-arg>mimetype_locations</span>)</span></code>
95
Multiple file locations containing mime-types can be passed as a
100
<!-- =========== START OF VARIABLE SUMMARY =========== -->
101
<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
102
<tr bgcolor="#70b0f0" class="summary">
103
<th colspan="2">Variable Summary</th></tr>
104
<tr><td align="right" valign="top" width="15%"><font size="-1"><a href="twisted.web.error.NoResource.html"
105
class="link"><code>NoResource</code></a></font></td>
106
<td><b><a href="twisted.web.static.html#dangerousPathError"><code>dangerousPathError</code></a></b> = <span title="<twisted.web.error.NoResource instance at 0x85492c4>"><code><twisted.web.error.NoResource insta<span class="variable-ellipsis">...</span></code>
111
<!-- =========== START OF FUNCTION DETAILS =========== -->
112
<table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
113
<tr bgcolor="#70b0f0" class="details">
114
<th colspan="2">Function Details</th></tr>
117
<a name="loadMimeTypes"></a>
118
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
119
<h3><span class="sig"><span class="sig-name">loadMimeTypes</span>(<span class=sig-arg>mimetype_locations</span>=<span class=sig-default>['/etc/mime.types']</span>)</span>
121
Multiple file locations containing mime-types can be passed as a
122
list. The files will be sourced in that order, overriding mime-types
123
from the files sourced beforehand, but only if a new entry explicitly
124
overrides the current entry.
131
<!-- =========== START OF VARIABLE DETAILS =========== -->
132
<table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
133
<tr bgcolor="#70b0f0" class="details">
134
<th colspan="2">Variable Details</th></tr>
136
<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
137
<a name="dangerousPathError"></a>
138
<h3>dangerousPathError</h3>
143
<dt><b>Type:</b></dt>
145
<a href="twisted.web.error.NoResource.html"
146
class="link"><code>NoResource</code></a>
149
<span title="<twisted.web.error.NoResource instance at 0x85492c4>"> <dt><b>Value:</b></dt>
151
<pre class="variable">
152
<twisted.web.error.NoResource instance at 0x85492c4> </pre>
153
</td></tr></table></dd>
156
</dl></td></tr></table>
160
<!-- =========== START OF NAVBAR =========== -->
161
<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
163
<th class="navbar"> <a class="navbar" href="twisted.html">Home</a> </th>
164
<th class="navbar"> <a class="navbar" href="trees.html">Trees</a> </th>
165
<th class="navbar"> <a class="navbar" href="indices.html">Index</a> </th>
166
<th class="navbar"> <a class="navbar" href="help.html">Help</a> </th>
167
<th class="navbar" align="right" width="100%">
168
<table border="0" cellpadding="0" cellspacing="0">
169
<tr><th class="navbar" align="center">
171
<a class="navbar" target="_top" href="http://twistedmatrix.com/">Twisted 1.3.0rc1</a>
172
</p></th></tr></table>
177
<table border="0" cellpadding="0" cellspacing="0" width="100%">
179
<td align="left"><font size="-2">Generated by Epydoc 2.0 on Sat May 15 20:08:29 2004</font></td>
180
<td align="right"><a href="http://epydoc.sourceforge.net"
181
><font size="-2">http://epydoc.sf.net</font></a></td>