ÿØÿà JFIF    ÿÛ „  ( %!1!%)+//.383,7(-.+  -%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ  ¥2" ÿÄ     ÿÄ J    ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ   ÿÄ *  !1AQa‘"2q3±ð#b¡ÿÚ   ? ¼QxJQaÍuò¸Zö Úü8,ÐÚú "SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁT­ÃÛ5 ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßw­pŽF|È¥ù®häðÍѶ¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e ríV ?> ......................................... ............................................................................. ÿØÿà JFIF    ÿÛ „  ( %!1!%)+//.383,7(-.+  -%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ  ¥2" ÿÄ     ÿÄ J    ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ   ÿÄ *  !1AQa‘"2q3±ð#b¡ÿÚ   ? ¼QxJQaÍuò¸Zö Úü8,ÐÚú "SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁT­ÃÛ5 ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßw­pŽF|È¥ù®häðÍѶ¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e ríV ?> ......................................... ............................................................................. ???????????????????????????????????? ???????????????????????????????????? ÿØÿà JFIF    ÿÛ „  ( %!1!%)+//.383,7(-.+  -%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ  ¥2" ÿÄ     ÿÄ J    ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ   ÿÄ *  !1AQa‘"2q3±ð#b¡ÿÚ   ? ¼QxJQaÍuò¸Zö Úü8,ÐÚú "SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁT­ÃÛ5 ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßw­pŽF|È¥ù®häðÍѶ¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e ríV ?> ......................................... ............................................................................. ÿØÿà JFIF    ÿÛ „  ( %!1!%)+//.383,7(-.+  -%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ  ¥2" ÿÄ     ÿÄ J    ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ   ÿÄ *  !1AQa‘"2q3±ð#b¡ÿÚ   ? ¼QxJQaÍuò¸Zö Úü8,ÐÚú "SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁT­ÃÛ5 ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßw­pŽF|È¥ù®häðÍѶ¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e ríV ?> ......................................... ............................................................................. ???????????????????????????????????? ????????????????????????????????????  Yc@@sfdZddlmZddlmZmZdZdZdZe e e dZ dZ d S( s This module implements WSGI related helpers adapted from ``werkzeug.wsgi`` :copyright: (c) 2010 by the Werkzeug Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. i(tabsolute_import(t iteritemst urllib_quotecc@sxt|D]\}}t|}|jdrd|d krd|djddj|fVq |d kr |jddj|fVq q Wd S( s+ Returns only proper HTTP headers. tHTTP_tHTTP_CONTENT_TYPEtHTTP_CONTENT_LENGTHit_t-t CONTENT_TYPEtCONTENT_LENGTHN(RR(RR (Rtstrt startswithtreplacettitle(tenvirontkeytvalue((sA/opt/alt/python27/lib/python2.7/site-packages/raven/utils/wsgi.pyt get_headers s  $ cc@s3x,dD]$}||kr|||fVqqWdS(s8 Returns our whitelisted environment variables. t REMOTE_ADDRt SERVER_NAMEt SERVER_PORTN(RRR((RR((sA/opt/alt/python27/lib/python2.7/site-packages/raven/utils/wsgi.pyt get_environs  cC@s|jd}d|kr(|d}nZd|krA|d}nA|d}|t|dfddfkr|d |d7}n|jd r|dkr|d }n(|jd r|dkr|d }n|S(sReturn the real host for the given WSGI environment. This takes care of the `X-Forwarded-Host` header. :param environ: the WSGI environment to get the host of. swsgi.url_schemetHTTP_X_FORWARDED_HOSTt HTTP_HOSTRRthttpst443thttpt80t:s:80is:443i(RR(RR(tgetR tendswith(Rtschemetresult((sA/opt/alt/python27/lib/python2.7/site-packages/raven/utils/wsgi.pytget_host$s       cC@s|ddt|g}|j}|r9dj|dS|t|jddjd|rq|dnX|td|jddjd|s|jd}|r|d|qndj|S( s3A handy helper function that recreates the full URL for the current request or parts of it. Here an example: >>> from werkzeug import create_environ >>> env = create_environ("/?param=foo", "http://localhost/script") >>> get_current_url(env) 'http://localhost/script/?param=foo' >>> get_current_url(env, root_only=True) 'http://localhost/script/' >>> get_current_url(env, host_only=True) 'http://localhost/' >>> get_current_url(env, strip_querystring=True) 'http://localhost/script/' :param environ: the WSGI environment to get the current URL from. :param root_only: set `True` if you only want the root URL. :param strip_querystring: set to `True` if you don't want the querystring. :param host_only: set to `True` if the host URL should be returned. swsgi.url_schemes://tt/t SCRIPT_NAMEt PATH_INFOt QUERY_STRINGt?(R!tappendtjoinRRtrstriptlstrip(Rt root_onlytstrip_querystringt host_onlyttmptcattqs((sA/opt/alt/python27/lib/python2.7/site-packages/raven/utils/wsgi.pytget_current_url<s % )cC@sGy|djddjSWn!ttfk rB|jdSXdS(s Naively yank the first IP address in an X-Forwarded-For header and assume this is correct. Note: Don't use this in security sensitive situations since this value may be forged from a client. tHTTP_X_FORWARDED_FORt,iRN(tsplittstriptKeyErrort IndexErrorR(R((sA/opt/alt/python27/lib/python2.7/site-packages/raven/utils/wsgi.pyt get_client_ipasN( t__doc__t __future__Rtraven.utils.compatRRRRR!tFalseR2R9(((sA/opt/alt/python27/lib/python2.7/site-packages/raven/utils/wsgi.pyts  $