Module Expr Str Import alias alias alias alias alias alias Import alias ImportFrom alias Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Dict Assign NameStore Num ClassDef bases AttributeLoad NameLoad attr body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad Return NameLoad decorator_list decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str For NameStore Call AttributeLoad NameLoad attr body If CompareNotIn NameLoad ListLoad Str Str Str Str Str Str Str Str Str Str body Expr Call AttributeLoad NameLoad attr NameLoad SubscriptLoad NameLoad Index NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareIn NameLoad NameLoad body If CompareLtE BinOpSub Call AttributeLoad NameLoad attr SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index Str NameLoad body Expr Call NameLoad SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index Str NameLoad Return SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index Str Assign NameStore Call AttributeLoad NameLoad attr Call NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad TryExcept body Assign NameStore Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type AttributeLoad NameLoad attr name NameStore body Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad Call NameLoad AttributeLoad NameLoad attr NameLoad If BoolOpAnd NameLoad CompareIn NameLoad NameLoad body Expr Call NameLoad SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index Str NameLoad Return SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index Str Return Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str ExceptHandler type AttributeLoad NameLoad attr name NameStore body Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad AttributeLoad NameLoad attr If BoolOpAnd NameLoad CompareIn NameLoad NameLoad body Expr Call NameLoad SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index Str NameLoad Return SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index Str Return Call AttributeLoad NameLoad attr Num AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index NameLoad Dict Str Str Str NameLoad AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Expr Call NameLoad AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list
N/A N/A 
Proxy helper routines with simple caching

Created by: Rui Carmo
License: MIT (see LICENSE for details)
 N/A os sys time logging urllib urllib2 N/A bottle subprocess * N/A log N/A N/A logging getLogger N/A _cache N/A N/A cache_interval 120 SmartRedirectHandler N/A N/A urllib2 HTTPRedirectHandler N/A N/A Redirect handler helper class http_error_301 N/A N/A self req fp code msg headers N/A N/A N/A N/A N/A log debug Handling 301 redirect N/A result N/A N/A N/A urllib2 HTTPRedirectHandler http_error_301 self req fp code msg headers N/A N/A result status code N/A result N/A http_error_302 N/A N/A self req fp code msg headers N/A N/A N/A N/A N/A log debug Handling 302 redirect N/A result N/A N/A N/A urllib2 HTTPRedirectHandler http_error_302 self req fp code msg headers N/A N/A result status code N/A result N/A N/A sanitize_headers N/A N/A headers server_response N/A N/A N/A Remove potentially troublesome headers from the remote server response N/A h N/A N/A headers keys N/A N/A N/A h N/A connection cache-control server accept-ranges keep-alive proxy-authenticate proxy-authorization te trailers transfer-encoding N/A N/A N/A N/A server_response set_header h N/A headers N/A h N/A fetch N/A N/A uri server_response N/A N/A N/A Fetch an uri as required N/A N/A uri _cache N/A N/A N/A N/A N/A N/A time time N/A N/A _cache N/A uri N/A time cache_interval N/A N/A N/A sanitize_headers N/A N/A _cache N/A uri N/A headers server_response N/A N/A N/A _cache N/A uri N/A data N/A conn N/A N/A urllib2 build_opener N/A SmartRedirectHandler N/A req N/A N/A urllib2 Request uri N/A N/A N/A resp N/A N/A conn open req N/A N/A N/A N/A urllib2 HTTPError N/A e N/A N/A N/A N/A log error N/A Got error code %s while proxying %s N/A N/A str N/A e code uri N/A N/A cache_interval N/A uri _cache N/A N/A N/A sanitize_headers N/A N/A _cache N/A uri N/A headers server_response N/A N/A N/A _cache N/A uri N/A data N/A N/A N/A bottle HTTPError N/A e code Server could not fullfill request N/A N/A N/A urllib2 URLError N/A e N/A N/A N/A N/A log error N/A Got error while proxying %s: %s N/A uri N/A e reason N/A N/A cache_interval N/A uri _cache N/A N/A N/A sanitize_headers N/A N/A _cache N/A uri N/A headers server_response N/A N/A N/A _cache N/A uri N/A data N/A N/A N/A bottle HTTPError 500 N/A e reason N/A buffer N/A N/A resp read N/A N/A N/A conn close N/A N/A _cache N/A uri N/A data headers time buffer N/A resp headers N/A N/A time time N/A N/A sanitize_headers N/A resp headers server_response N/A buffer N/A