File: httpexceptions.html

package info (click to toggle)
paste 1.7.5.1-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 3,180 kB
  • ctags: 2,709
  • sloc: python: 20,660; makefile: 47
file content (505 lines) | stat: -rw-r--r-- 30,797 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>paste.httpexceptions – Easily product HTTP errors &mdash; Paste v1.7.5 documentation</title>
    <link rel="stylesheet" href="../_static/default.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../',
        VERSION:     '1.7.5',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <link rel="top" title="Paste v1.7.5 documentation" href="../index.html" />
 
<link rel="stylesheet" type="text/css"
 href="../_static/paste.css.html">

  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li><a href="../index.html">Paste v1.7.5 documentation</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="module-paste.httpexceptions">
<span id="paste-httpexceptions-easily-product-http-errors"></span><h1><a class="reference internal" href="#module-paste.httpexceptions"><tt class="xref py py-mod docutils literal"><span class="pre">paste.httpexceptions</span></tt></a> &#8211; Easily product HTTP errors<a class="headerlink" href="#module-paste.httpexceptions" title="Permalink to this headline">¶</a></h1>
<p>HTTP Exception Middleware</p>
<p>This module processes Python exceptions that relate to HTTP exceptions
by defining a set of exceptions, all subclasses of HTTPException, and a
request handler (<cite>middleware</cite>) that catches these exceptions and turns
them into proper responses.</p>
<p>This module defines exceptions according to RFC 2068 <a class="footnote-reference" href="#id3" id="id1">[1]</a> : codes with
100-300 are not really errors; 400&#8217;s are client errors, and 500&#8217;s are
server errors.  According to the WSGI specification <a class="footnote-reference" href="#id4" id="id2">[2]</a> , the application
can call <tt class="docutils literal"><span class="pre">start_response</span></tt> more then once only under two conditions:
(a) the response has not yet been sent, or (b) if the second and
subsequent invocations of <tt class="docutils literal"><span class="pre">start_response</span></tt> have a valid <tt class="docutils literal"><span class="pre">exc_info</span></tt>
argument obtained from <tt class="docutils literal"><span class="pre">sys.exc_info()</span></tt>.  The WSGI specification then
requires the server or gateway to handle the case where content has been
sent and then an exception was encountered.</p>
<p>Exceptions in the 5xx range and those raised after <tt class="docutils literal"><span class="pre">start_response</span></tt>
has been called are treated as serious errors and the <tt class="docutils literal"><span class="pre">exc_info</span></tt> is
filled-in with information needed for a lower level module to generate a
stack trace and log information.</p>
<dl class="docutils">
<dt>Exception</dt>
<dd><dl class="first last docutils">
<dt>HTTPException</dt>
<dd><dl class="first last docutils">
<dt>HTTPRedirection</dt>
<dd><ul class="first last simple">
<li>300 - HTTPMultipleChoices</li>
<li>301 - HTTPMovedPermanently</li>
<li>302 - HTTPFound</li>
<li>303 - HTTPSeeOther</li>
<li>304 - HTTPNotModified</li>
<li>305 - HTTPUseProxy</li>
<li>306 - Unused (not implemented, obviously)</li>
<li>307 - HTTPTemporaryRedirect</li>
</ul>
</dd>
<dt>HTTPError</dt>
<dd><dl class="first last docutils">
<dt>HTTPClientError</dt>
<dd><ul class="first last simple">
<li>400 - HTTPBadRequest</li>
<li>401 - HTTPUnauthorized</li>
<li>402 - HTTPPaymentRequired</li>
<li>403 - HTTPForbidden</li>
<li>404 - HTTPNotFound</li>
<li>405 - HTTPMethodNotAllowed</li>
<li>406 - HTTPNotAcceptable</li>
<li>407 - HTTPProxyAuthenticationRequired</li>
<li>408 - HTTPRequestTimeout</li>
<li>409 - HTTPConfict</li>
<li>410 - HTTPGone</li>
<li>411 - HTTPLengthRequired</li>
<li>412 - HTTPPreconditionFailed</li>
<li>413 - HTTPRequestEntityTooLarge</li>
<li>414 - HTTPRequestURITooLong</li>
<li>415 - HTTPUnsupportedMediaType</li>
<li>416 - HTTPRequestRangeNotSatisfiable</li>
<li>417 - HTTPExpectationFailed</li>
</ul>
</dd>
<dt>HTTPServerError</dt>
<dd><ul class="first last simple">
<li>500 - HTTPInternalServerError</li>
<li>501 - HTTPNotImplemented</li>
<li>502 - HTTPBadGateway</li>
<li>503 - HTTPServiceUnavailable</li>
<li>504 - HTTPGatewayTimeout</li>
<li>505 - HTTPVersionNotSupported</li>
</ul>
</dd>
</dl>
</dd>
</dl>
</dd>
</dl>
</dd>
</dl>
<p>References:</p>
<table class="docutils footnote" frame="void" id="id3" rules="none">
<colgroup><col class="label" /><col /></colgroup>
<tbody valign="top">
<tr><td class="label"><a class="fn-backref" href="#id1">[1]</a></td><td><a class="reference external" href="http://www.python.org/peps/pep-0333.html#error-handling">http://www.python.org/peps/pep-0333.html#error-handling</a></td></tr>
</tbody>
</table>
<table class="docutils footnote" frame="void" id="id4" rules="none">
<colgroup><col class="label" /><col /></colgroup>
<tbody valign="top">
<tr><td class="label"><a class="fn-backref" href="#id2">[2]</a></td><td><a class="reference external" href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5">http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5</a></td></tr>
</tbody>
</table>
<div class="section" id="module-contents">
<h2>Module Contents<a class="headerlink" href="#module-contents" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="paste.httpexceptions.HTTPExceptionHandler">
<em class="property">class </em><tt class="descclassname">paste.httpexceptions.</tt><tt class="descname">HTTPExceptionHandler</tt><big>(</big><em>application</em>, <em>warning_level=None</em><big>)</big><a class="headerlink" href="#paste.httpexceptions.HTTPExceptionHandler" title="Permalink to this definition">¶</a></dt>
<dd><p>catches exceptions and turns them into proper HTTP responses</p>
<p>This middleware catches any exceptions (which are subclasses of
<tt class="docutils literal"><span class="pre">HTTPException</span></tt>) and turns them into proper HTTP responses.
Note if the headers have already been sent, the stack trace is
always maintained as this indicates a programming error.</p>
<p>Note that you must raise the exception before returning the
app_iter, and you cannot use this with generator apps that don&#8217;t
raise an exception until after their app_iter is iterated over.</p>
</dd></dl>

<dl class="function">
<dt id="paste.httpexceptions.make_middleware">
<tt class="descclassname">paste.httpexceptions.</tt><tt class="descname">make_middleware</tt><big>(</big><em>app</em>, <em>global_conf=None</em>, <em>warning_level=None</em><big>)</big><a class="headerlink" href="#paste.httpexceptions.make_middleware" title="Permalink to this definition">¶</a></dt>
<dd><p><tt class="docutils literal"><span class="pre">httpexceptions</span></tt> middleware; this catches any
<tt class="docutils literal"><span class="pre">paste.httpexceptions.HTTPException</span></tt> exceptions (exceptions like
<tt class="docutils literal"><span class="pre">HTTPNotFound</span></tt>, <tt class="docutils literal"><span class="pre">HTTPMovedPermanently</span></tt>, etc) and turns them
into proper HTTP responses.</p>
<p><tt class="docutils literal"><span class="pre">warning_level</span></tt> can be an integer corresponding to an HTTP code.
Any code over that value will be passed &#8216;up&#8217; the chain, potentially
reported on by another piece of middleware.</p>
</dd></dl>

</div>
<div class="section" id="exceptions">
<h2>Exceptions<a class="headerlink" href="#exceptions" title="Permalink to this headline">¶</a></h2>
<dl class="exception">
<dt id="paste.httpexceptions.HTTPException">
<em class="property">exception </em><tt class="descclassname">paste.httpexceptions.</tt><tt class="descname">HTTPException</tt><big>(</big><em>detail=None</em>, <em>headers=None</em>, <em>comment=None</em><big>)</big><a class="headerlink" href="#paste.httpexceptions.HTTPException" title="Permalink to this definition">¶</a></dt>
<dd><p>the HTTP exception base class</p>
<p>This encapsulates an HTTP response that interrupts normal application
flow; but one which is not necessarly an error condition. For
example, codes in the 300&#8217;s are exceptions in that they interrupt
normal processing; however, they are not considered errors.</p>
<p>This class is complicated by 4 factors:</p>
<blockquote>
<ol class="arabic simple">
<li>The content given to the exception may either be plain-text or
as html-text.</li>
<li>The template may want to have string-substitutions taken from
the current <tt class="docutils literal"><span class="pre">environ</span></tt> or values from incoming headers. This
is especially troublesome due to case sensitivity.</li>
<li>The final output may either be text/plain or text/html
mime-type as requested by the client application.</li>
<li>Each exception has a default explanation, but those who
raise exceptions may want to provide additional detail.</li>
</ol>
</blockquote>
<p>Attributes:</p>
<blockquote>
<dl class="docutils">
<dt><tt class="docutils literal"><span class="pre">code</span></tt></dt>
<dd>the HTTP status code for the exception</dd>
<dt><tt class="docutils literal"><span class="pre">title</span></tt></dt>
<dd>remainder of the status line (stuff after the code)</dd>
<dt><tt class="docutils literal"><span class="pre">explanation</span></tt></dt>
<dd>a plain-text explanation of the error message that is
not subject to environment or header substitutions;
it is accessible in the template via %(explanation)s</dd>
<dt><tt class="docutils literal"><span class="pre">detail</span></tt></dt>
<dd>a plain-text message customization that is not subject
to environment or header substitutions; accessible in
the template via %(detail)s</dd>
<dt><tt class="docutils literal"><span class="pre">template</span></tt></dt>
<dd>a content fragment (in HTML) used for environment and
header substitution; the default template includes both
the explanation and further detail provided in the
message</dd>
<dt><tt class="docutils literal"><span class="pre">required_headers</span></tt></dt>
<dd>a sequence of headers which are required for proper
construction of the exception</dd>
</dl>
</blockquote>
<p>Parameters:</p>
<blockquote>
<dl class="docutils">
<dt><tt class="docutils literal"><span class="pre">detail</span></tt></dt>
<dd>a plain-text override of the default <tt class="docutils literal"><span class="pre">detail</span></tt></dd>
<dt><tt class="docutils literal"><span class="pre">headers</span></tt></dt>
<dd>a list of (k,v) header pairs</dd>
<dt><tt class="docutils literal"><span class="pre">comment</span></tt></dt>
<dd>a plain-text additional information which is
usually stripped/hidden for end-users</dd>
</dl>
</blockquote>
<p>To override the template (which is HTML content) or the plain-text
explanation, one must subclass the given exception; or customize it
after it has been created.  This particular breakdown of a message
into explanation, detail and template allows both the creation of
plain-text and html messages for various clients as well as
error-free substitution of environment variables and headers.</p>
</dd></dl>

<dl class="exception">
<dt id="paste.httpexceptions.HTTPError">
<em class="property">exception </em><tt class="descclassname">paste.httpexceptions.</tt><tt class="descname">HTTPError</tt><big>(</big><em>detail=None</em>, <em>headers=None</em>, <em>comment=None</em><big>)</big><a class="headerlink" href="#paste.httpexceptions.HTTPError" title="Permalink to this definition">¶</a></dt>
<dd><p>base class for status codes in the 400&#8217;s and 500&#8217;s</p>
<p>This is an exception which indicates that an error has occurred,
and that any work in progress should not be committed.  These are
typically results in the 400&#8217;s and 500&#8217;s.</p>
</dd></dl>

<dl class="exception">
<dt id="paste.httpexceptions.HTTPRedirection">
<em class="property">exception </em><tt class="descclassname">paste.httpexceptions.</tt><tt class="descname">HTTPRedirection</tt><big>(</big><em>detail=None</em>, <em>headers=None</em>, <em>comment=None</em><big>)</big><a class="headerlink" href="#paste.httpexceptions.HTTPRedirection" title="Permalink to this definition">¶</a></dt>
<dd><p>base class for 300&#8217;s status code (redirections)</p>
<p>This is an abstract base class for 3xx redirection.  It indicates
that further action needs to be taken by the user agent in order
to fulfill the request.  It does not necessarly signal an error
condition.</p>
</dd></dl>

<dl class="exception">
<dt id="paste.httpexceptions.HTTPMultipleChoices">
<em class="property">exception </em><tt class="descclassname">paste.httpexceptions.</tt><tt class="descname">HTTPMultipleChoices</tt><big>(</big><em>detail=None</em>, <em>headers=None</em>, <em>comment=None</em><big>)</big><a class="headerlink" href="#paste.httpexceptions.HTTPMultipleChoices" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="exception">
<dt id="paste.httpexceptions.HTTPMovedPermanently">
<em class="property">exception </em><tt class="descclassname">paste.httpexceptions.</tt><tt class="descname">HTTPMovedPermanently</tt><big>(</big><em>detail=None</em>, <em>headers=None</em>, <em>comment=None</em><big>)</big><a class="headerlink" href="#paste.httpexceptions.HTTPMovedPermanently" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="exception">
<dt id="paste.httpexceptions.HTTPFound">
<em class="property">exception </em><tt class="descclassname">paste.httpexceptions.</tt><tt class="descname">HTTPFound</tt><big>(</big><em>detail=None</em>, <em>headers=None</em>, <em>comment=None</em><big>)</big><a class="headerlink" href="#paste.httpexceptions.HTTPFound" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="exception">
<dt id="paste.httpexceptions.HTTPNotModified">
<em class="property">exception </em><tt class="descclassname">paste.httpexceptions.</tt><tt class="descname">HTTPNotModified</tt><big>(</big><em>detail=None</em>, <em>headers=None</em>, <em>comment=None</em><big>)</big><a class="headerlink" href="#paste.httpexceptions.HTTPNotModified" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="exception">
<dt id="paste.httpexceptions.HTTPUseProxy">
<em class="property">exception </em><tt class="descclassname">paste.httpexceptions.</tt><tt class="descname">HTTPUseProxy</tt><big>(</big><em>detail=None</em>, <em>headers=None</em>, <em>comment=None</em><big>)</big><a class="headerlink" href="#paste.httpexceptions.HTTPUseProxy" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="exception">
<dt id="paste.httpexceptions.HTTPTemporaryRedirect">
<em class="property">exception </em><tt class="descclassname">paste.httpexceptions.</tt><tt class="descname">HTTPTemporaryRedirect</tt><big>(</big><em>detail=None</em>, <em>headers=None</em>, <em>comment=None</em><big>)</big><a class="headerlink" href="#paste.httpexceptions.HTTPTemporaryRedirect" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="exception">
<dt id="paste.httpexceptions.HTTPClientError">
<em class="property">exception </em><tt class="descclassname">paste.httpexceptions.</tt><tt class="descname">HTTPClientError</tt><big>(</big><em>detail=None</em>, <em>headers=None</em>, <em>comment=None</em><big>)</big><a class="headerlink" href="#paste.httpexceptions.HTTPClientError" title="Permalink to this definition">¶</a></dt>
<dd><p>base class for the 400&#8217;s, where the client is in-error</p>
<p>This is an error condition in which the client is presumed to be
in-error.  This is an expected problem, and thus is not considered
a bug.  A server-side traceback is not warranted.  Unless specialized,
this is a &#8216;400 Bad Request&#8217;</p>
</dd></dl>

<dl class="exception">
<dt id="paste.httpexceptions.HTTPBadRequest">
<em class="property">exception </em><tt class="descclassname">paste.httpexceptions.</tt><tt class="descname">HTTPBadRequest</tt><big>(</big><em>detail=None</em>, <em>headers=None</em>, <em>comment=None</em><big>)</big><a class="headerlink" href="#paste.httpexceptions.HTTPBadRequest" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="exception">
<dt id="paste.httpexceptions.HTTPUnauthorized">
<em class="property">exception </em><tt class="descclassname">paste.httpexceptions.</tt><tt class="descname">HTTPUnauthorized</tt><big>(</big><em>detail=None</em>, <em>headers=None</em>, <em>comment=None</em><big>)</big><a class="headerlink" href="#paste.httpexceptions.HTTPUnauthorized" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="exception">
<dt id="paste.httpexceptions.HTTPPaymentRequired">
<em class="property">exception </em><tt class="descclassname">paste.httpexceptions.</tt><tt class="descname">HTTPPaymentRequired</tt><big>(</big><em>detail=None</em>, <em>headers=None</em>, <em>comment=None</em><big>)</big><a class="headerlink" href="#paste.httpexceptions.HTTPPaymentRequired" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="exception">
<dt id="paste.httpexceptions.HTTPForbidden">
<em class="property">exception </em><tt class="descclassname">paste.httpexceptions.</tt><tt class="descname">HTTPForbidden</tt><big>(</big><em>detail=None</em>, <em>headers=None</em>, <em>comment=None</em><big>)</big><a class="headerlink" href="#paste.httpexceptions.HTTPForbidden" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="exception">
<dt id="paste.httpexceptions.HTTPNotFound">
<em class="property">exception </em><tt class="descclassname">paste.httpexceptions.</tt><tt class="descname">HTTPNotFound</tt><big>(</big><em>detail=None</em>, <em>headers=None</em>, <em>comment=None</em><big>)</big><a class="headerlink" href="#paste.httpexceptions.HTTPNotFound" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="exception">
<dt id="paste.httpexceptions.HTTPMethodNotAllowed">
<em class="property">exception </em><tt class="descclassname">paste.httpexceptions.</tt><tt class="descname">HTTPMethodNotAllowed</tt><big>(</big><em>detail=None</em>, <em>headers=None</em>, <em>comment=None</em><big>)</big><a class="headerlink" href="#paste.httpexceptions.HTTPMethodNotAllowed" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="exception">
<dt id="paste.httpexceptions.HTTPNotAcceptable">
<em class="property">exception </em><tt class="descclassname">paste.httpexceptions.</tt><tt class="descname">HTTPNotAcceptable</tt><big>(</big><em>detail=None</em>, <em>headers=None</em>, <em>comment=None</em><big>)</big><a class="headerlink" href="#paste.httpexceptions.HTTPNotAcceptable" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="exception">
<dt id="paste.httpexceptions.HTTPProxyAuthenticationRequired">
<em class="property">exception </em><tt class="descclassname">paste.httpexceptions.</tt><tt class="descname">HTTPProxyAuthenticationRequired</tt><big>(</big><em>detail=None</em>, <em>headers=None</em>, <em>comment=None</em><big>)</big><a class="headerlink" href="#paste.httpexceptions.HTTPProxyAuthenticationRequired" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="exception">
<dt id="paste.httpexceptions.HTTPRequestTimeout">
<em class="property">exception </em><tt class="descclassname">paste.httpexceptions.</tt><tt class="descname">HTTPRequestTimeout</tt><big>(</big><em>detail=None</em>, <em>headers=None</em>, <em>comment=None</em><big>)</big><a class="headerlink" href="#paste.httpexceptions.HTTPRequestTimeout" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="exception">
<dt id="paste.httpexceptions.HTTPConflict">
<em class="property">exception </em><tt class="descclassname">paste.httpexceptions.</tt><tt class="descname">HTTPConflict</tt><big>(</big><em>detail=None</em>, <em>headers=None</em>, <em>comment=None</em><big>)</big><a class="headerlink" href="#paste.httpexceptions.HTTPConflict" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="exception">
<dt id="paste.httpexceptions.HTTPGone">
<em class="property">exception </em><tt class="descclassname">paste.httpexceptions.</tt><tt class="descname">HTTPGone</tt><big>(</big><em>detail=None</em>, <em>headers=None</em>, <em>comment=None</em><big>)</big><a class="headerlink" href="#paste.httpexceptions.HTTPGone" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="exception">
<dt id="paste.httpexceptions.HTTPLengthRequired">
<em class="property">exception </em><tt class="descclassname">paste.httpexceptions.</tt><tt class="descname">HTTPLengthRequired</tt><big>(</big><em>detail=None</em>, <em>headers=None</em>, <em>comment=None</em><big>)</big><a class="headerlink" href="#paste.httpexceptions.HTTPLengthRequired" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="exception">
<dt id="paste.httpexceptions.HTTPPreconditionFailed">
<em class="property">exception </em><tt class="descclassname">paste.httpexceptions.</tt><tt class="descname">HTTPPreconditionFailed</tt><big>(</big><em>detail=None</em>, <em>headers=None</em>, <em>comment=None</em><big>)</big><a class="headerlink" href="#paste.httpexceptions.HTTPPreconditionFailed" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="exception">
<dt id="paste.httpexceptions.HTTPRequestEntityTooLarge">
<em class="property">exception </em><tt class="descclassname">paste.httpexceptions.</tt><tt class="descname">HTTPRequestEntityTooLarge</tt><big>(</big><em>detail=None</em>, <em>headers=None</em>, <em>comment=None</em><big>)</big><a class="headerlink" href="#paste.httpexceptions.HTTPRequestEntityTooLarge" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="exception">
<dt id="paste.httpexceptions.HTTPRequestURITooLong">
<em class="property">exception </em><tt class="descclassname">paste.httpexceptions.</tt><tt class="descname">HTTPRequestURITooLong</tt><big>(</big><em>detail=None</em>, <em>headers=None</em>, <em>comment=None</em><big>)</big><a class="headerlink" href="#paste.httpexceptions.HTTPRequestURITooLong" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="exception">
<dt id="paste.httpexceptions.HTTPUnsupportedMediaType">
<em class="property">exception </em><tt class="descclassname">paste.httpexceptions.</tt><tt class="descname">HTTPUnsupportedMediaType</tt><big>(</big><em>detail=None</em>, <em>headers=None</em>, <em>comment=None</em><big>)</big><a class="headerlink" href="#paste.httpexceptions.HTTPUnsupportedMediaType" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="exception">
<dt id="paste.httpexceptions.HTTPRequestRangeNotSatisfiable">
<em class="property">exception </em><tt class="descclassname">paste.httpexceptions.</tt><tt class="descname">HTTPRequestRangeNotSatisfiable</tt><big>(</big><em>detail=None</em>, <em>headers=None</em>, <em>comment=None</em><big>)</big><a class="headerlink" href="#paste.httpexceptions.HTTPRequestRangeNotSatisfiable" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="exception">
<dt id="paste.httpexceptions.HTTPExpectationFailed">
<em class="property">exception </em><tt class="descclassname">paste.httpexceptions.</tt><tt class="descname">HTTPExpectationFailed</tt><big>(</big><em>detail=None</em>, <em>headers=None</em>, <em>comment=None</em><big>)</big><a class="headerlink" href="#paste.httpexceptions.HTTPExpectationFailed" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="exception">
<dt id="paste.httpexceptions.HTTPServerError">
<em class="property">exception </em><tt class="descclassname">paste.httpexceptions.</tt><tt class="descname">HTTPServerError</tt><big>(</big><em>detail=None</em>, <em>headers=None</em>, <em>comment=None</em><big>)</big><a class="headerlink" href="#paste.httpexceptions.HTTPServerError" title="Permalink to this definition">¶</a></dt>
<dd><p>base class for the 500&#8217;s, where the server is in-error</p>
<p>This is an error condition in which the server is presumed to be
in-error.  This is usually unexpected, and thus requires a traceback;
ideally, opening a support ticket for the customer. Unless specialized,
this is a &#8216;500 Internal Server Error&#8217;</p>
</dd></dl>

<dl class="exception">
<dt id="paste.httpexceptions.HTTPInternalServerError">
<em class="property">exception </em><tt class="descclassname">paste.httpexceptions.</tt><tt class="descname">HTTPInternalServerError</tt><big>(</big><em>detail=None</em>, <em>headers=None</em>, <em>comment=None</em><big>)</big><a class="headerlink" href="#paste.httpexceptions.HTTPInternalServerError" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="exception">
<dt id="paste.httpexceptions.HTTPNotImplemented">
<em class="property">exception </em><tt class="descclassname">paste.httpexceptions.</tt><tt class="descname">HTTPNotImplemented</tt><big>(</big><em>detail=None</em>, <em>headers=None</em>, <em>comment=None</em><big>)</big><a class="headerlink" href="#paste.httpexceptions.HTTPNotImplemented" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="exception">
<dt id="paste.httpexceptions.HTTPBadGateway">
<em class="property">exception </em><tt class="descclassname">paste.httpexceptions.</tt><tt class="descname">HTTPBadGateway</tt><big>(</big><em>detail=None</em>, <em>headers=None</em>, <em>comment=None</em><big>)</big><a class="headerlink" href="#paste.httpexceptions.HTTPBadGateway" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="exception">
<dt id="paste.httpexceptions.HTTPServiceUnavailable">
<em class="property">exception </em><tt class="descclassname">paste.httpexceptions.</tt><tt class="descname">HTTPServiceUnavailable</tt><big>(</big><em>detail=None</em>, <em>headers=None</em>, <em>comment=None</em><big>)</big><a class="headerlink" href="#paste.httpexceptions.HTTPServiceUnavailable" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="exception">
<dt id="paste.httpexceptions.HTTPGatewayTimeout">
<em class="property">exception </em><tt class="descclassname">paste.httpexceptions.</tt><tt class="descname">HTTPGatewayTimeout</tt><big>(</big><em>detail=None</em>, <em>headers=None</em>, <em>comment=None</em><big>)</big><a class="headerlink" href="#paste.httpexceptions.HTTPGatewayTimeout" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="exception">
<dt id="paste.httpexceptions.HTTPVersionNotSupported">
<em class="property">exception </em><tt class="descclassname">paste.httpexceptions.</tt><tt class="descname">HTTPVersionNotSupported</tt><big>(</big><em>detail=None</em>, <em>headers=None</em>, <em>comment=None</em><big>)</big><a class="headerlink" href="#paste.httpexceptions.HTTPVersionNotSupported" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
<h3><a href="http://pythonpaste.org/" class="invisible-link">Python Paste</a></h3>

<ul>
<li><a href="http://trac.pythonpaste.org">Issue tracker</a></li>
<li><a href="http://pythonpaste.org/">Paste core</a></li>
<li><a href="http://pythonpaste.org/webob/">WebOb</a></li>
<li><a href="http://pythonpaste.org/deploy/">Paste Deploy</a></li>
<li><a href="http://pythonpaste.org/script/">Paste Script</a></li>
<li><a href="http://pythonpaste.org/webtest/">WebTest</a></li>
<li><a href="http://pythonpaste.org/scripttest/">ScriptType</a></li>
<li><a href="http://pythonpaste.org/initools/">INITools</a></li>
<li><a href="http://pythonpaste.org/tempita/">Tempita</a></li>
<li><a href="http://pythonpaste.org/waitforit/">WaitForIt</a></li>
<li><a href="http://pythonpaste.org/wphp/">WPHP</a></li>
<li><a href="http://pythonpaste.org/wsgifilter/">WSGIFilter</a></li>
<li><a href="http://pythonpaste.org/wsgiproxy/">WSGIProxy</a></li>
</ul>


  <h3><a href="../index.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#"><tt class="docutils literal"><span class="pre">paste.httpexceptions</span></tt> &#8211; Easily product HTTP errors</a><ul>
<li><a class="reference internal" href="#module-contents">Module Contents</a></li>
<li><a class="reference internal" href="#exceptions">Exceptions</a></li>
</ul>
</li>
</ul>


  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="../_sources/modules/httpexceptions.txt"
           rel="nofollow">Show Source</a></li>
  </ul>
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" size="18" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li><a href="../index.html">Paste v1.7.5 documentation</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright 2008, Ian Bicking.
      Last updated on Sep 14, 2010.
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.1.
    </div>
  </body>
</html>