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.proxy.ReverseProxyRequest</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> ::
34
<a href="twisted.web.proxy.html">Module proxy</a> ::
35
Class ReverseProxyRequest
38
<td><table cellpadding="0" cellspacing="0">
39
<tr><td align="right"><font size="-2">[<a href="frames.html"target="_top">frames</a> | <a href="twisted.web.proxy.ReverseProxyRequest.html" target="_top">no frames</a>]</font></td></tr>
43
<!-- =========== START OF CLASS DESCRIPTION =========== -->
44
<h2 class="class">Class ReverseProxyRequest</h2>
46
<pre class="base-tree">
47
<a href="twisted.protocols.http.Request.html"><code>Request</code></a> --+
49
<b>ReverseProxyRequest</b>
54
Used by ReverseProxy to implement a simple reverse proxy.
58
<!-- =========== START OF METHOD SUMMARY =========== -->
59
<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
60
<tr bgcolor="#70b0f0" class="summary">
61
<th colspan="2">Method Summary</th></tr>
62
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
63
<td><code><span class="summary-sig"><a href="twisted.web.proxy.ReverseProxyRequest.html#process" class="summary-sig-name"><code>process</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
65
Override in subclasses.</td></tr>
66
<tr bgcolor="#e8f0f8" class="group">
67
<th colspan="2"> Inherited from Request</th></tr>
68
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
69
<td><code><span class="summary-sig"><a href="twisted.protocols.http.Request.html#__init__" class="summary-sig-name"><code>__init__</code></a>(<span class=summary-sig-arg>self</span>,
70
<span class=summary-sig-arg>channel</span>,
71
<span class=summary-sig-arg>queued</span>)</span></code>
73
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
74
<td><code><span class="summary-sig"><a href="twisted.protocols.http.Request.html#__repr__" class="summary-sig-name"><code>__repr__</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
76
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
77
<td><code><span class="summary-sig"><a href="twisted.protocols.http.Request.html#_authorize" class="summary-sig-name"><code>_authorize</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
79
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
80
<td><code><span class="summary-sig"><a href="twisted.protocols.http.Request.html#_cleanup" class="summary-sig-name"><code>_cleanup</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
82
Called when have finished responding and are no longer queued.</td></tr>
83
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
84
<td><code><span class="summary-sig"><a href="twisted.protocols.http.Request.html#_sendError" class="summary-sig-name"><code>_sendError</code></a>(<span class=summary-sig-arg>self</span>,
85
<span class=summary-sig-arg>code</span>,
86
<span class=summary-sig-arg>resp</span>)</span></code>
88
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
89
<td><code><span class="summary-sig"><a href="twisted.protocols.http.Request.html#addCookie" class="summary-sig-name"><code>addCookie</code></a>(<span class=summary-sig-arg>self</span>,
90
<span class=summary-sig-arg>k</span>,
91
<span class=summary-sig-arg>v</span>,
92
<span class=summary-sig-arg>expires</span>,
93
<span class=summary-sig-arg>domain</span>,
94
<span class=summary-sig-arg>path</span>,
95
<span class=summary-sig-arg>max_age</span>,
96
<span class=summary-sig-arg>comment</span>,
97
<span class=summary-sig-arg>secure</span>)</span></code>
99
Set an outgoing HTTP cookie.</td></tr>
100
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
101
<td><code><span class="summary-sig"><a href="twisted.protocols.http.Request.html#connectionLost" class="summary-sig-name"><code>connectionLost</code></a>(<span class=summary-sig-arg>self</span>,
102
<span class=summary-sig-arg>reason</span>)</span></code>
104
connection was lost</td></tr>
105
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
106
<td><code><span class="summary-sig"><a href="twisted.protocols.http.Request.html#finish" class="summary-sig-name"><code>finish</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
108
We are finished writing data.</td></tr>
109
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
110
<td><code><span class="summary-sig"><a href="twisted.protocols.http.Request.html#getAllHeaders" class="summary-sig-name"><code>getAllHeaders</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
112
Return dictionary of all headers the request received.</td></tr>
113
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
114
<td><code><span class="summary-sig"><a href="twisted.protocols.http.Request.html#getClient" class="summary-sig-name"><code>getClient</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
116
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
117
<td><code><span class="summary-sig"><a href="twisted.protocols.http.Request.html#getClientIP" class="summary-sig-name"><code>getClientIP</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
119
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
120
<td><code><span class="summary-sig"><a href="twisted.protocols.http.Request.html#getCookie" class="summary-sig-name"><code>getCookie</code></a>(<span class=summary-sig-arg>self</span>,
121
<span class=summary-sig-arg>key</span>)</span></code>
123
Get a cookie that was sent from the network.</td></tr>
124
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
125
<td><code><span class="summary-sig"><a href="twisted.protocols.http.Request.html#getHeader" class="summary-sig-name"><code>getHeader</code></a>(<span class=summary-sig-arg>self</span>,
126
<span class=summary-sig-arg>key</span>)</span></code>
128
Get a header that was sent from the network.</td></tr>
129
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
130
<td><code><span class="summary-sig"><a href="twisted.protocols.http.Request.html#getHost" class="summary-sig-name"><code>getHost</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
132
Get my originally requesting transport's host.</td></tr>
133
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
134
<td><code><span class="summary-sig"><a href="twisted.protocols.http.Request.html#getPassword" class="summary-sig-name"><code>getPassword</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
136
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
137
<td><code><span class="summary-sig"><a href="twisted.protocols.http.Request.html#getRequestHostname" class="summary-sig-name"><code>getRequestHostname</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
139
Get the hostname that the user passed in to the request.</td></tr>
140
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
141
<td><code><span class="summary-sig"><a href="twisted.protocols.http.Request.html#getUser" class="summary-sig-name"><code>getUser</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
143
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
144
<td><code><span class="summary-sig"><a href="twisted.protocols.http.Request.html#gotLength" class="summary-sig-name"><code>gotLength</code></a>(<span class=summary-sig-arg>self</span>,
145
<span class=summary-sig-arg>length</span>)</span></code>
147
Called when HTTP channel got length of content in this request.</td></tr>
148
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
149
<td><code><span class="summary-sig"><a href="twisted.protocols.http.Request.html#handleContentChunk" class="summary-sig-name"><code>handleContentChunk</code></a>(<span class=summary-sig-arg>self</span>,
150
<span class=summary-sig-arg>data</span>)</span></code>
152
Write a chunk of data.</td></tr>
153
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
154
<td><code><span class="summary-sig"><a href="twisted.protocols.http.Request.html#isSecure" class="summary-sig-name"><code>isSecure</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
156
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
157
<td><code><span class="summary-sig"><a href="twisted.protocols.http.Request.html#noLongerQueued" class="summary-sig-name"><code>noLongerQueued</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
159
Notify the object that it is no longer queued.</td></tr>
160
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
161
<td><code><span class="summary-sig"><a href="twisted.protocols.http.Request.html#parseCookies" class="summary-sig-name"><code>parseCookies</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
163
Parse cookie headers.</td></tr>
164
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
165
<td><code><span class="summary-sig"><a href="twisted.protocols.http.Request.html#redirect" class="summary-sig-name"><code>redirect</code></a>(<span class=summary-sig-arg>self</span>,
166
<span class=summary-sig-arg>url</span>)</span></code>
168
Utility function that does a redirect.</td></tr>
169
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
170
<td><code><span class="summary-sig"><a href="twisted.protocols.http.Request.html#registerProducer" class="summary-sig-name"><code>registerProducer</code></a>(<span class=summary-sig-arg>self</span>,
171
<span class=summary-sig-arg>producer</span>,
172
<span class=summary-sig-arg>streaming</span>)</span></code>
174
Register a producer.</td></tr>
175
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
176
<td><code><span class="summary-sig"><a href="twisted.protocols.http.Request.html#requestReceived" class="summary-sig-name"><code>requestReceived</code></a>(<span class=summary-sig-arg>self</span>,
177
<span class=summary-sig-arg>command</span>,
178
<span class=summary-sig-arg>path</span>,
179
<span class=summary-sig-arg>version</span>)</span></code>
181
Called by channel when all data has been received.</td></tr>
182
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
183
<td><code><span class="summary-sig"><a href="twisted.protocols.http.Request.html#setETag" class="summary-sig-name"><code>setETag</code></a>(<span class=summary-sig-arg>self</span>,
184
<span class=summary-sig-arg>etag</span>)</span></code>
186
Set an <a name="index-entity_tag"></a><i class="indexterm">entity
187
tag</i> for the outgoing response.</td></tr>
188
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
189
<td><code><span class="summary-sig"><a href="twisted.protocols.http.Request.html#setHeader" class="summary-sig-name"><code>setHeader</code></a>(<span class=summary-sig-arg>self</span>,
190
<span class=summary-sig-arg>k</span>,
191
<span class=summary-sig-arg>v</span>)</span></code>
193
Set an outgoing HTTP header.</td></tr>
194
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
195
<td><code><span class="summary-sig"><a href="twisted.protocols.http.Request.html#setHost" class="summary-sig-name"><code>setHost</code></a>(<span class=summary-sig-arg>self</span>,
196
<span class=summary-sig-arg>host</span>,
197
<span class=summary-sig-arg>port</span>,
198
<span class=summary-sig-arg>ssl</span>)</span></code>
200
Change the host and port the request thinks it's using.</td></tr>
201
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
202
<td><code><span class="summary-sig"><a href="twisted.protocols.http.Request.html#setLastModified" class="summary-sig-name"><code>setLastModified</code></a>(<span class=summary-sig-arg>self</span>,
203
<span class=summary-sig-arg>when</span>)</span></code>
205
Set the <a name="index-Last_Modified"></a><i
206
class="indexterm">Last-Modified</i> time for the response to this
208
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
209
<td><code><span class="summary-sig"><a href="twisted.protocols.http.Request.html#setResponseCode" class="summary-sig-name"><code>setResponseCode</code></a>(<span class=summary-sig-arg>self</span>,
210
<span class=summary-sig-arg>code</span>,
211
<span class=summary-sig-arg>message</span>)</span></code>
213
Set the HTTP response code.</td></tr>
214
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
215
<td><code><span class="summary-sig"><a href="twisted.protocols.http.Request.html#unregisterProducer" class="summary-sig-name"><code>unregisterProducer</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
217
Unregister the producer.</td></tr>
218
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
219
<td><code><span class="summary-sig"><a href="twisted.protocols.http.Request.html#write" class="summary-sig-name"><code>write</code></a>(<span class=summary-sig-arg>self</span>,
220
<span class=summary-sig-arg>data</span>)</span></code>
222
Write some data as a result of an HTTP request.</td></tr>
226
<!-- =========== START OF INSTANCE VARIABLE SUMMARY =========== -->
227
<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
228
<tr bgcolor="#70b0f0" class="summary">
229
<th colspan="2">Instance Variable Summary</th></tr>
230
<tr bgcolor="#e8f0f8" class="group">
231
<th colspan="2"> Inherited from Request</th></tr>
232
<tr><td align="right" valign="top" width="15%"><font size="-1">A mapping of strings (the argument names) to lists of
233
values. i.e., ?foo=bar&foo=baz&quux=spam results in
234
{'foo': ['bar', 'baz'], 'quux': ['spam']}.</font></td>
235
<td><b><a href="twisted.protocols.http.Request.html#args"><code>args</code></a></b>: All of the arguments, including URL and POST arguments.</td></tr>
236
<tr><td align="right" valign="top" width="15%"><font size="-1"><code>str</code></font></td>
237
<td><b><a href="twisted.protocols.http.Request.html#method"><code>method</code></a></b>: The HTTP method that was used.</td></tr>
238
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
239
<td><b><a href="twisted.protocols.http.Request.html#path"><code>path</code></a></b>: The path only (arguments not included).</td></tr>
240
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
241
<td><b><a href="twisted.protocols.http.Request.html#received_headers"><code>received_headers</code></a></b>: All received headers</td></tr>
242
<tr><td align="right" valign="top" width="15%"><font size="-1"><code>str</code></font></td>
243
<td><b><a href="twisted.protocols.http.Request.html#uri"><code>uri</code></a></b>: The full URI that was requested (includes arguments).</td></tr>
247
<!-- =========== START OF CLASS VARIABLE SUMMARY =========== -->
248
<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
249
<tr bgcolor="#70b0f0" class="summary">
250
<th colspan="2">Class Variable Summary</th></tr>
251
<tr bgcolor="#e8f0f8" class="group">
252
<th colspan="2"> Inherited from Request</th></tr>
253
<tr><td align="right" valign="top" width="15%"><font size="-1"><code>tuple</code></font></td>
254
<td><b><a href="twisted.protocols.http.Request.html#__implements__"><code>__implements__</code></a></b> = <span title="(<class twisted.internet.interfaces.IConsumer at 0x824feb4>,)"><code>(<class twisted.internet.interfaces.ICo<span class="variable-ellipsis">...</span></code>
256
<tr><td align="right" valign="top" width="15%"><font size="-1"><code>int</code></font></td>
257
<td><b><a href="twisted.protocols.http.Request.html#_forceSSL"><code>_forceSSL</code></a></b> = <span title="0">0 </span></td></tr>
258
<tr><td align="right" valign="top" width="15%"><font size="-1"><code>int</code></font></td>
259
<td><b><a href="twisted.protocols.http.Request.html#chunked"><code>chunked</code></a></b> = <span title="0">0 </span></td></tr>
260
<tr><td align="right" valign="top" width="15%"><font size="-1"><code>str</code></font></td>
261
<td><b><a href="twisted.protocols.http.Request.html#clientproto"><code>clientproto</code></a></b> = <span title="'(no clientproto yet)'"><code><span class="variable-quote">'</span>(no clientproto yet)<span class="variable-quote">'</span> </code>
263
<tr><td align="right" valign="top" width="15%"><font size="-1"><code>int</code></font></td>
264
<td><b><a href="twisted.protocols.http.Request.html#code"><code>code</code></a></b> = <span title="200">200 </span></td></tr>
265
<tr><td align="right" valign="top" width="15%"><font size="-1"><code>str</code></font></td>
266
<td><b><a href="twisted.protocols.http.Request.html#code_message"><code>code_message</code></a></b> = <span title="'OK'"><code><span class="variable-quote">'</span>OK<span class="variable-quote">'</span> </code>
268
<tr><td align="right" valign="top" width="15%"><font size="-1"><code>NoneType</code></font></td>
269
<td><b><a href="twisted.protocols.http.Request.html#etag"><code>etag</code></a></b> = <span title="None">None </span></td></tr>
270
<tr><td align="right" valign="top" width="15%"><font size="-1"><code>int</code></font></td>
271
<td><b><a href="twisted.protocols.http.Request.html#finished"><code>finished</code></a></b> = <span title="0">0 </span></td></tr>
272
<tr><td align="right" valign="top" width="15%"><font size="-1"><code>NoneType</code></font></td>
273
<td><b><a href="twisted.protocols.http.Request.html#lastModified"><code>lastModified</code></a></b> = <span title="None">None </span></td></tr>
274
<tr><td align="right" valign="top" width="15%"><font size="-1"><code>NoneType</code></font></td>
275
<td><b><a href="twisted.protocols.http.Request.html#producer"><code>producer</code></a></b> = <span title="None">None </span></td></tr>
276
<tr><td align="right" valign="top" width="15%"><font size="-1"><code>int</code></font></td>
277
<td><b><a href="twisted.protocols.http.Request.html#sentLength"><code>sentLength</code></a></b> = <span title="0">0 </span></td></tr>
278
<tr><td align="right" valign="top" width="15%"><font size="-1"><code>int</code></font></td>
279
<td><b><a href="twisted.protocols.http.Request.html#startedWriting"><code>startedWriting</code></a></b> = <span title="0">0 </span></td></tr>
283
<!-- =========== START OF METHOD DETAILS =========== -->
284
<table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
285
<tr bgcolor="#70b0f0" class="details">
286
<th colspan="2">Method Details</th></tr>
289
<a name="process"></a>
290
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
291
<h3><span class="sig"><span class="sig-name">process</span>(<span class=sig-arg>self</span>)</span>
293
<p>Override in subclasses.</p>
294
This method is not intended for users.
296
<dl><dt><b>Overrides:</b></dt>
297
<dd><a href="twisted.protocols.http.Request.html#process"><code>twisted.protocols.http.Request.process</code></a> <i>(inherited documentation)</i>
305
<!-- =========== START OF NAVBAR =========== -->
306
<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
308
<th class="navbar"> <a class="navbar" href="twisted.html">Home</a> </th>
309
<th class="navbar"> <a class="navbar" href="trees.html">Trees</a> </th>
310
<th class="navbar"> <a class="navbar" href="indices.html">Index</a> </th>
311
<th class="navbar"> <a class="navbar" href="help.html">Help</a> </th>
312
<th class="navbar" align="right" width="100%">
313
<table border="0" cellpadding="0" cellspacing="0">
314
<tr><th class="navbar" align="center">
316
<a class="navbar" target="_top" href="http://twistedmatrix.com/">Twisted 1.3.0rc1</a>
317
</p></th></tr></table>
322
<table border="0" cellpadding="0" cellspacing="0" width="100%">
324
<td align="left"><font size="-2">Generated by Epydoc 2.0 on Sat May 15 20:08:05 2004</font></td>
325
<td align="right"><a href="http://epydoc.sourceforge.net"
326
><font size="-2">http://epydoc.sf.net</font></a></td>