PNG  IHDR;IDATxܻn0K )(pA 7LeG{ §㻢|ذaÆ 6lذaÆ 6lذaÆ 6lom$^yذag5bÆ 6lذaÆ 6lذa{ 6lذaÆ `}HFkm,mӪôô! x|'ܢ˟;E:9&ᶒ}{v]n&6 h_tڠ͵-ҫZ;Z$.Pkž)!o>}leQfJTu іچ\X=8Rن4`Vwl>nG^is"ms$ui?wbs[m6K4O.4%/bC%t Mז -lG6mrz2s%9s@-k9=)kB5\+͂Zsٲ Rn~GRC wIcIn7jJhۛNCS|j08yiHKֶۛkɈ+;SzL/F*\Ԕ#"5m2[S=gnaPeғL lذaÆ 6l^ḵaÆ 6lذaÆ 6lذa; _ذaÆ 6lذaÆ 6lذaÆ RIENDB`  aNc@szdZddlZddlmZddlmZmZmZddlm Z ddl m Z m Z m Z mZdZdZd efd YZd efd YZd efdYZdefdYZdefdYZdefdYZdefdYZdefdYZdefdYZdefdYZdefdYZdefd YZd!efd"YZd#efd$YZd%efd&YZ d'efd(YZ!d)efd*YZ"d+efd,YZ#d-efd.YZ$d/efd0YZ%d1efd2YZ&d3efd4YZ'd5efd6YZ(d7efd8YZ)d9efd:YZ*d;efd<YZ+d=efd>YZ,d?efd@YZ-dAefdBYZ.dCefdDYZ/dEefdFYZ0dGe0fdHYZ1dIe0fdJYZ2dKe0fdLYZ3dMe0fdNYZ4dOe0fdPYZ5dQe0fdRYZ6d d d gZ7iZ8xje9j:D]Y\Z;Z<e=e<e>ej?fre@e<ere<jAre<e8e<jA %(title)s

%(title)s

%(body)s


%(server)s
t HTTPExceptioncBseZdZd Zd ZdZdZdZdZ d Z d d d dZ d dZ dZ dZdZdZd d ZeZd ZRS( s the HTTP exception base class 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's are exceptions in that they interrupt normal processing; however, they are not considered errors. This class is complicated by 4 factors: 1. The content given to the exception may either be plain-text or as html-text. 2. The template may want to have string-substitutions taken from the current ``environ`` or values from incoming headers. This is especially troublesome due to case sensitivity. 3. The final output may either be text/plain or text/html mime-type as requested by the client application. 4. Each exception has a default explanation, but those who raise exceptions may want to provide additional detail. Attributes: ``code`` the HTTP status code for the exception ``title`` remainder of the status line (stuff after the code) ``explanation`` 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 ``detail`` a plain-text message customization that is not subject to environment or header substitutions; accessible in the template via %(detail)s ``template`` 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 ``required_headers`` a sequence of headers which are required for proper construction of the exception Parameters: ``detail`` a plain-text override of the default ``detail`` ``headers`` a list of (k,v) header pairs ``comment`` a plain-text additional information which is usually stripped/hidden for end-users 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. ts6%(explanation)s
%(detail)s cCs|p t|_x|jD]}qW|dk r>||_n|dk rV||_ntj|d|j|j |j |jfdS(Ns %s %s %s %s ( ttupletheaderstrequired_headerstNonetdetailtcommentt Exceptiont__init__tcodettitlet explanation(tselfRR Rtreq((s8/usr/lib/python2.7/site-packages/paste/httpexceptions.pyRs      c Cs |p |}i||jd6||jd6||jd6}tj|jkrx*|jD]\}}||||(t __class__t__name__RR(R((s8/usr/lib/python2.7/site-packages/paste/httpexceptions.pyt__repr__ s N((R>t __module__t__doc__RRRRRRRR RR(R*R.R4R9R<t__call__R?(((s8/usr/lib/python2.7/site-packages/paste/httpexceptions.pyR _s"F     t HTTPErrorcBseZdZRS(s base class for status codes in the 400's and 500's 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's and 500's. (R>R@RA(((s8/usr/lib/python2.7/site-packages/paste/httpexceptions.pyRCstHTTPRedirectioncBseZdZRS(s base class for 300's status code (redirections) 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. (R>R@RA(((s8/usr/lib/python2.7/site-packages/paste/httpexceptions.pyRD$st _HTTPMovecBsYeZdZdZdZdZddddZddddZe eZdZ RS( s redirections which require a Location field Since a 'Location' header is a required attribute of 301, 302, 303, 305 and 307 (but not 304), this base class provides the mechanics to make this easy. While this has the same parameters as HTTPException, if a location is not provided in the headers; it is assumed that the detail _is_ the location (this for backward compatibility, otherwise we'd add a new attribute). tlocationsThe resource has been moved tos%(explanation)s %(location)s; you should be redirected automatically. %(detail)s cCsu|p g}t|d}|sC|}d}|jd|fntj|||||dk rq||_ndS(NRFR (RtappendRDRRR(RRR RRF((s8/usr/lib/python2.7/site-packages/paste/httpexceptions.pyR@s  cCsGt||}|pg}|jd|f|d|d|d|S(s Create a redirect object with the dest_uri, which may be relative, considering it relative to the uri implied by the given environ. tLocationRR R(RRG(tclstdest_uriR RR RRF((s8/usr/lib/python2.7/site-packages/paste/httpexceptions.pytrelative_redirectOs cCsDx=|jD]"\}}|jdkr |Sq Wtd|dS(NRFsNo location set for %s(R RtKeyError(RtnameR'((s8/usr/lib/python2.7/site-packages/paste/httpexceptions.pyRF[s(slocationN( R>R@RAR RRRRRKt classmethodRF(((s8/usr/lib/python2.7/site-packages/paste/httpexceptions.pyRE.s  tHTTPMultipleChoicescBseZdZdZRS(i,sMultiple Choices(R>R@RR(((s8/usr/lib/python2.7/site-packages/paste/httpexceptions.pyRObstHTTPMovedPermanentlycBseZdZdZRS(i-sMoved Permanently(R>R@RR(((s8/usr/lib/python2.7/site-packages/paste/httpexceptions.pyRPfst HTTPFoundcBseZdZdZdZRS(i.tFoundsThe resource was found at(R>R@RRR(((s8/usr/lib/python2.7/site-packages/paste/httpexceptions.pyRQjst HTTPSeeOthercBseZdZdZRS(i/s See Other(R>R@RR(((s8/usr/lib/python2.7/site-packages/paste/httpexceptions.pyRSqstHTTPNotModifiedcBs,eZdZdZdZdZdZRS(i0s Not ModifiedR cCsdS(NR ((RR ((s8/usr/lib/python2.7/site-packages/paste/httpexceptions.pyR*~scCsdS(s+ text/html representation of the exception R ((RR ((s8/usr/lib/python2.7/site-packages/paste/httpexceptions.pyR.s(R>R@RRtmessageR*R.(((s8/usr/lib/python2.7/site-packages/paste/httpexceptions.pyRTus  t HTTPUseProxycBseZdZdZdZRS(i1s Use Proxys8The resource must be accessed through a proxy located at(R>R@RRR(((s8/usr/lib/python2.7/site-packages/paste/httpexceptions.pyRVstHTTPTemporaryRedirectcBseZdZdZRS(i3sTemporary Redirect(R>R@RR(((s8/usr/lib/python2.7/site-packages/paste/httpexceptions.pyRWstHTTPClientErrorcBs eZdZdZdZdZRS(s8 base class for the 400's, where the client is in-error 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 '400 Bad Request' is Bad RequestsdThe server could not comply with the request since it is either malformed or otherwise incorrect. (R>R@RARRR(((s8/usr/lib/python2.7/site-packages/paste/httpexceptions.pyRXstHTTPBadRequestcBseZRS((R>R@(((s8/usr/lib/python2.7/site-packages/paste/httpexceptions.pyRYstHTTPUnauthorizedcBseZdZdZdZRS(it UnauthorizedsThis server could not verify that you are authorized to access the document you requested. Either you supplied the wrong credentials (e.g., bad password), or your browser does not understand how to supply the credentials required. (R>R@RRR(((s8/usr/lib/python2.7/site-packages/paste/httpexceptions.pyRZstHTTPPaymentRequiredcBseZdZdZdZRS(isPayment Requireds(Access was denied for financial reasons.(R>R@RRR(((s8/usr/lib/python2.7/site-packages/paste/httpexceptions.pyR\st HTTPForbiddencBseZdZdZdZRS(it Forbiddens#Access was denied to this resource.(R>R@RRR(((s8/usr/lib/python2.7/site-packages/paste/httpexceptions.pyR]st HTTPNotFoundcBseZdZdZdZRS(is Not Founds The resource could not be found.(R>R@RRR(((s8/usr/lib/python2.7/site-packages/paste/httpexceptions.pyR_stHTTPMethodNotAllowedcBs eZdZdZdZdZRS(tallowisMethod Not AllowedsKThe method %(REQUEST_METHOD)s is not allowed for this resource. %(detail)s(Ra(R>R@R RRR(((s8/usr/lib/python2.7/site-packages/paste/httpexceptions.pyR`stHTTPNotAcceptablecBseZdZdZdZRS(isNot AcceptableswThe resource could not be generated that was acceptable to your browser (content of type %(HTTP_ACCEPT)s). %(detail)s(R>R@RRR(((s8/usr/lib/python2.7/site-packages/paste/httpexceptions.pyRbstHTTPProxyAuthenticationRequiredcBseZdZdZdZRS(isProxy Authentication Requireds*Authentication /w a local proxy is needed.(R>R@RRR(((s8/usr/lib/python2.7/site-packages/paste/httpexceptions.pyRcstHTTPRequestTimeoutcBseZdZdZdZRS(isRequest TimeoutsHThe server has waited too long for the request to be sent by the client.(R>R@RRR(((s8/usr/lib/python2.7/site-packages/paste/httpexceptions.pyRdst HTTPConflictcBseZdZdZdZRS(itConflicts:There was a conflict when trying to complete your request.(R>R@RRR(((s8/usr/lib/python2.7/site-packages/paste/httpexceptions.pyRestHTTPGonecBseZdZdZdZRS(itGonesFThis resource is no longer available. No forwarding address is given.(R>R@RRR(((s8/usr/lib/python2.7/site-packages/paste/httpexceptions.pyRgstHTTPLengthRequiredcBseZdZdZdZRS(isLength RequiredsContent-Length header required.(R>R@RRR(((s8/usr/lib/python2.7/site-packages/paste/httpexceptions.pyRistHTTPPreconditionFailedcBseZdZdZdZRS(isPrecondition FailedsRequest precondition failed.(R>R@RRR(((s8/usr/lib/python2.7/site-packages/paste/httpexceptions.pyRjstHTTPRequestEntityTooLargecBseZdZdZdZRS(isRequest Entity Too Larges7The body of your request was too large for this server.(R>R@RRR(((s8/usr/lib/python2.7/site-packages/paste/httpexceptions.pyRkstHTTPRequestURITooLongcBseZdZdZdZRS(isRequest-URI Too Longs-The request URI was too long for this server.(R>R@RRR(((s8/usr/lib/python2.7/site-packages/paste/httpexceptions.pyRlstHTTPUnsupportedMediaTypecBseZdZdZdZRS(isUnsupported Media TypesTThe request media type %(CONTENT_TYPE)s is not supported by this server. %(detail)s(R>R@RRR(((s8/usr/lib/python2.7/site-packages/paste/httpexceptions.pyRmstHTTPRequestRangeNotSatisfiablecBseZdZdZdZRS(isRequest Range Not Satisfiables%The Range requested is not available.(R>R@RRR(((s8/usr/lib/python2.7/site-packages/paste/httpexceptions.pyRnstHTTPExpectationFailedcBseZdZdZdZRS(isExpectation FailedsExpectation failed.(R>R@RRR(((s8/usr/lib/python2.7/site-packages/paste/httpexceptions.pyRo stHTTPServerErrorcBs eZdZdZdZdZRS(sF base class for the 500's, where the server is in-error 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 '500 Internal Server Error' isInternal Server ErrorsUThe server has either erred or is incapable of performing the requested operation. (R>R@RARRR(((s8/usr/lib/python2.7/site-packages/paste/httpexceptions.pyRpstHTTPInternalServerErrorcBseZRS((R>R@(((s8/usr/lib/python2.7/site-packages/paste/httpexceptions.pyRq+stHTTPNotImplementedcBseZdZdZdZRS(isNot ImplementedsUThe request method %(REQUEST_METHOD)s is not implemented for this server. %(detail)s(R>R@RRR(((s8/usr/lib/python2.7/site-packages/paste/httpexceptions.pyRr.stHTTPBadGatewaycBseZdZdZdZRS(is Bad Gateways Bad gateway.(R>R@RRR(((s8/usr/lib/python2.7/site-packages/paste/httpexceptions.pyRs5stHTTPServiceUnavailablecBseZdZdZdZRS(isService UnavailablesFThe server is currently unavailable. Please try again at a later time.(R>R@RRR(((s8/usr/lib/python2.7/site-packages/paste/httpexceptions.pyRt:stHTTPGatewayTimeoutcBseZdZdZdZRS(isGateway TimeoutsThe gateway has timed out.(R>R@RRR(((s8/usr/lib/python2.7/site-packages/paste/httpexceptions.pyRu@stHTTPVersionNotSupportedcBseZdZdZdZRS(isHTTP Version Not Supporteds"The HTTP version is not supported.(R>R@RRR(((s8/usr/lib/python2.7/site-packages/paste/httpexceptions.pyRvEscCst|S(N(t _exceptions(R((s8/usr/lib/python2.7/site-packages/paste/httpexceptions.pyt get_exceptionUstHTTPExceptionHandlercBs#eZdZddZdZRS(s catches exceptions and turns them into proper HTTP responses This middleware catches any exceptions (which are subclasses of ``HTTPException``) 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. Note that you must raise the exception before returning the app_iter, and you cannot use this with generator apps that don't raise an exception until after their app_iter is iterated over. cCsJ|dk r.ddl}|jdtdn|p7d|_||_dS(Nis4The warning_level parameter is not used or supportedii(RtwarningstwarntDeprecationWarningt warning_levelt application(RR~R}Rz((s8/usr/lib/python2.7/site-packages/paste/httpexceptions.pyRjs     cCs[||d<|jdgjty|j||SWntk rV}|||SXdS(Nspaste.httpexceptionsspaste.expected_exceptions(t setdefaultRGR R~(RR R:texc((s8/usr/lib/python2.7/site-packages/paste/httpexceptions.pyRBts  N(R>R@RARRRB(((s8/usr/lib/python2.7/site-packages/paste/httpexceptions.pyRy\s  cOs,ddl}|jdtdt||S(Nis\httpexceptions.middleware is deprecated; use make_middleware or HTTPExceptionHandler insteadi(RzR{R|tmake_middleware(R#tkwRz((s8/usr/lib/python2.7/site-packages/paste/httpexceptions.pyt middleware}s   cCs%|rt|}nt|d|S(s ``httpexceptions`` middleware; this catches any ``paste.httpexceptions.HTTPException`` exceptions (exceptions like ``HTTPNotFound``, ``HTTPMovedPermanently``, etc) and turns them into proper HTTP responses. ``warning_level`` can be an integer corresponding to an HTTP code. Any code over that value will be passed 'up' the chain, potentially reported on by another piece of middleware. R}(tintRy(tappt global_confR}((s8/usr/lib/python2.7/site-packages/paste/httpexceptions.pyRs Rx(JRAttypest paste.wsgilibRtpaste.responseRRRt paste.requestRtpaste.util.quotingRRRRR-R,RR RCRDRERORPRQRSRTRVRWRXRYRZR\R]R_R`RbRcRdReRgRiRjRkRlRmRnRoRpRqRrRsRtRuRvt__all__RwtglobalsRRMR'Rttypet ClassTypet issubclassRRGRxtobjectRyRRRtextend(((s8/usr/lib/python2.7/site-packages/paste/httpexceptions.pytJsr "  4    !