capybara/virtualenv/lib/python2.7/site-packages/pip/index.py
def _get_content_type(url, session):
        """Get the Content-Type of the given url, using a HEAD request"""
        scheme, netloc, path, query, fragment = urllib_parse.urlsplit(url)
        if scheme not in ('http', 'https'):
            # FIXME: some warning or something?
            # assertion error?
            return ''

        resp = session.head(url, allow_redirects=True)
        resp.raise_for_status()

        return resp.headers.get("Content-Type", "")
def _get_content_type(url, session):
        scheme, netloc, path, query, fragment = urllib_parse.urlsplit(url)
        if scheme not in ('http', 'https'):
            # FIXME: some warning or something?
            # assertion error?
            return ''

        resp = session.head(url, allow_redirects=True)
        resp.raise_for_status()

        return resp.headers.get("Content-Type", "")
def _get_content_type ( url , session ) : scheme , netloc , path , query , fragment = urllib_parse . urlsplit ( url ) if scheme not in ( 'http' , 'https' ) : # FIXME: some warning or something? # assertion error? return '' resp = session . head ( url , allow_redirects = True ) resp . raise_for_status ( ) return resp . headers . get ( "Content-Type" , "" )
Get the Content-Type of the given url, using a HEAD request
Get the Content - Type of the given url using a HEAD request