• Facebook
  • Twitter
  • Reddit
  • StumbleUpon
  • Digg
  • email


src/p/o/pony-build-HEAD/examples/push-cgi-notifier/feedparser.py   pony-build(Download)
class _FeedURLHandler(urllib2.HTTPDigestAuthHandler, urllib2.HTTPRedirectHandler, urllib2.HTTPDefaultErrorHandler):
    def http_error_default(self, req, fp, code, msg, headers):
        if ((code / 100) == 3) and (code != 304):
            return self.http_error_302(req, fp, code, msg, headers)
        infourl = urllib.addinfourl(fp, headers, req.get_full_url())
        infourl.status = code
        return infourl

src/i/r/ironruby-HEAD/External.LCA_RESTRICTED/Languages/IronPython/27/Doc/sphinx/ext/intersphinx.py   ironruby(Download)
 
from sphinx.builders.html import INVENTORY_FILENAME
 
handlers = [urllib2.ProxyHandler(), urllib2.HTTPRedirectHandler(),
            urllib2.HTTPHandler()]
if hasattr(urllib2, 'HTTPSHandler'):
    handlers.append(urllib2.HTTPSHandler)

src/c/m/cmislib-0.3/src/cmislib/net.py   cmislib(Download)
'''
 
from urllib import urlencode
from urllib2 import HTTPBasicAuthHandler, \
                    HTTPPasswordMgrWithDefaultRealm, \
                    HTTPRedirectHandler, \
                    HTTPDefaultErrorHandler, \
                    HTTPError, \
                    Request, \
                    build_opener
 
 
class SmartRedirectHandler(HTTPRedirectHandler):

src/z/a/zamboni-lib-HEAD/lib/python/sphinx/ext/intersphinx.py   zamboni-lib(Download)
 
from sphinx.builders.html import INVENTORY_FILENAME
 
handlers = [urllib2.ProxyHandler(), urllib2.HTTPRedirectHandler(),
            urllib2.HTTPHandler()]
if hasattr(urllib2, 'HTTPSHandler'):
    handlers.append(urllib2.HTTPSHandler)

src/u/r/urlimport-0.86c-dev/urlimport/urlimport.py   urlimport(Download)
from base64 import encodestring
from urlparse import urlsplit, urlunsplit
from httplib import HTTPSConnection
from urllib2 import HTTPDefaultErrorHandler, HTTPSHandler, HTTPError, \
    HTTPRedirectHandler, build_opener, urlopen, Request
 
 
class DefaultErrorHandler(HTTPDefaultErrorHandler, HTTPRedirectHandler):
 
    def http_error_301(self, req, fp, code, msg, headers):
        response = \
            HTTPRedirectHandler.http_error_301(self, req, fp, code, msg, headers)
        response.status = code
        return response

src/s/h/shorty-python-HEAD/shorty.py   shorty-python(Download)
"""
## !!! This file is machine generated !! ##
 
from urllib2 import urlopen, Request, URLError, HTTPError, HTTPRedirectHandler, build_opener
from urllib import urlencode, quote
from urlparse import urlparse
from random import randint
    class StopRedirectHandler(HTTPRedirectHandler):
        def http_error_301(self, req, fp, code, smg, headers):
            return None
        def http_error_302(self, req, fp, code, smg, headers):
            return None
    o = build_opener(StopRedirectHandler())
    try:

src/n/o/noc-0.5/contrib/src/Sphinx/sphinx/ext/intersphinx.py   noc(Download)
 
from sphinx.builders.html import INVENTORY_FILENAME
 
handlers = [urllib2.ProxyHandler(), urllib2.HTTPRedirectHandler(),
            urllib2.HTTPHandler()]
if hasattr(urllib2, 'HTTPSHandler'):
    handlers.append(urllib2.HTTPSHandler)

src/s/h/shorty-python-HEAD/imports.py   shorty-python(Download)
## Shorty
## Copyright 2009 Joshua Roesslein
## See LICENSE
 
## Do all importing here
from urllib2 import urlopen, Request, URLError, HTTPError, HTTPRedirectHandler, build_opener
from urllib import urlencode, quote

src/a/r/arcs.shibboleth.client-0.2dev-20091210/src/main/python/arcs/shibboleth/client/shibboleth.py   arcs.shibboleth.client(Download)
 
from urlparse import urlsplit, urljoin
import urllib2
from urllib2 import HTTPCookieProcessor, HTTPRedirectHandler
from urllib2 import HTTPBasicAuthHandler
from time import time
import logging
class ShibbolethHandler(HTTPRedirectHandler, HTTPCookieProcessor):
 
    def __init__(self, cookiejar=None, **kwargs):
        HTTPCookieProcessor.__init__(self, cookiejar, **kwargs)
 
    def http_error_302(self, req, fp, code, msg, headers):
        if 'location' in headers:

src/n/o/nous.mailpost-0.5/src/nous/mailpost/smtp2zope.py   nous.mailpost(Download)
class BrokenHTTPRedirectHandler(urllib2.HTTPRedirectHandler):
    def http_error_302(self, req, fp, code, msg, headers):
        raise urllib2.HTTPError(req.get_full_url(), code, msg, headers, fp)
 
# Install the broken redirect handler
opener = urllib2.build_opener(BrokenHTTPRedirectHandler())
urllib2.install_opener(opener)

  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9  Next