Lines Matching +full:macosx +full:- +full:version +full:- +full:min
5 below). It opens the URL and returns the results as file-like
13 non-error returns. The HTTPRedirectHandler automatically deals with
17 urlopen(url, data=None) -- Basic usage is the same as original
19 get a file-like object back. One difference is that you can also pass
24 build_opener -- Function that creates a new OpenerDirector instance.
30 install_opener -- Installs a new opener as the default opener.
34 OpenerDirector -- Sets up the User Agent as the Python-urllib client and manages
37 Request -- An object that encapsulates the state of a request. The
39 headers, e.g. a User-Agent.
41 BaseHandler --
54 uri='https://mahler:8092/site-updates.py',
58 proxy_support = urllib.request.ProxyHandler({"http" : "http://ahad-haam:3128"})
78 # check digest against correct (i.e. non-apache) implementation
135 # used in User-Agent header sent
173 msg attribute contains the same information as the reason attribute ---
174 the reason phrase returned by the server --- instead of the response
260 size = -1
263 if "content-length" in headers:
264 size = int(headers["Content-Length"])
302 """Return request-host, as defined by RFC 2965.
345 # unwrap('<URL:type://host/path>') --> 'type://host/path'
365 # if we change data we need to remove content-length header
367 if self.has_header("Content-length"):
368 self.remove_header("Content-length")
428 client_version = "Python-urllib/%s" % __version__
429 self.addheaders = [('User-agent', client_version)]
512 # pre-process request
521 # post-process response
546 # XXX http[s] protocols are special-cased
659 perform the redirect. Otherwise, raise HTTPError if no-one
679 CONTENT_HEADERS = ("content-length", "content-type")
689 # have already seen. Do this by adding a handler-specific
710 "%s - Redirection to url '%s' is not allowed" % (msg, newurl),
718 # http.client.parse_headers() decodes as ISO-8859-1. Recover the
719 # original bytes and percent-encode non-ASCII bytes, and any special
722 newurl, encoding="iso-8859-1", safe=string.punctuation)
727 # handlers that also use handler-specific request attributes
774 # We have an authority, so for RFC 3986-compliant URLs (by ss 3.
781 if end == -1:
819 req.add_header('Proxy-authorization', 'Basic ' + creds)
941 # XXX this allows for multiple auth-schemes, but will stupidly pick
944 # allow for double- and single-quoted realm values
956 # XXX could pre-emptively send auth info already accepted (RFC 2617,
967 # parse WWW-Authenticate header: accept multiple challenges per header
1056 response = self.http_error_auth_reqed('www-authenticate',
1063 auth_header = 'Proxy-authorization'
1071 response = self.http_error_auth_reqed('proxy-authenticate',
1083 # XXX The client does not inspect the Authentication-Info header
1089 # XXX qop="auth-int" supports is shaky
1106 # Don't fail endlessly - if we failed once, we'll probably
1136 # The cnonce-value is an opaque
1176 … # NOTE: As per RFC 2617, when server sends "auth,auth-int", the client could use either `auth`
1177 # or `auth-int` to the response back. we use `auth` to send the response back.
1191 # XXX handle auth-int.
1214 # XXX MD5-sess
1238 retry = self.http_error_auth_reqed('www-authenticate',
1246 auth_header = 'Proxy-Authorization'
1251 retry = self.http_error_auth_reqed('proxy-authenticate',
1280 if not request.has_header('Content-type'):
1282 'Content-type',
1283 'application/x-www-form-urlencoded')
1284 if (not request.has_header('Content-length')
1285 and not request.has_header('Transfer-encoding')):
1289 'Content-length', str(content_length))
1292 'Transfer-encoding', 'chunked')
1338 proxy_auth_hdr = "Proxy-Authorization"
1341 # Proxy-Authorization should not be sent to origin
1349 encode_chunked=req.has_header('Transfer-encoding'))
1426 if v[0] == '"' and v[-1] == '"':
1427 v = v[1:-1]
1434 In particular, parse comma-separated lists where the elements of
1435 the list may include quoted-strings. A quoted-string could
1436 contain a comma. A non-quoted string could have quotes in the
1438 Only double-quotes count, not single-quotes.
1510 'Content-type: %s\nContent-length: %d\nLast-modified: %s\n' %
1561 dirs, file = dirs[:-1], dirs[-1]
1576 headers += "Content-type: %s\n" % mtype
1578 headers += "Content-length: %d\n" % retrlen
1625 self.soonest = min(list(self.timeout.values()))
1634 self.soonest = min(list(self.timeout.values()))
1662 mediatype = mediatype[:-7]
1665 mediatype = "text/plain;charset=US-ASCII"
1667 headers = email.message_from_string("Content-type: %s\nContent-length: %d\n" %
1677 # Helper for non-unix systems
1682 """OS-specific conversion from a relative URL of the 'file' scheme
1687 """OS-specific conversion from a file system path to a relative URL
1698 more than one set of global protocol-specific options.
1699 Note -- this is a base class for those who don't want the
1705 version = "Python-urllib/%s" % __version__ variable in URLopener
1718 self.addheaders = [('User-Agent', self.version), ('Accept', '*/*')]
1780 name = name.replace('-', '_')
1841 size = -1
1844 if "content-length" in headers:
1845 size = int(headers["Content-Length"])
1862 # raise exception if actual size does not match content-length header
1879 - connection_factory should take a host name and return an
1881 - url is the url to retrieval or a host, relative-path pair.
1882 - data is payload for a POST request or None.
1928 headers["Proxy-Authorization"] = "Basic %s" % proxy_auth
1943 headers["Content-Type"] = "application/x-www-form-urlencoded"
1972 named http_error_DDD where DDD is the 3-digit error code."""
2022 'Content-Type: %s\nContent-Length: %d\nLast-modified: %s\n' %
2063 dirs, file = dirs[:-1], dirs[-1]
2090 headers += "Content-Type: %s\n" % mtype
2092 headers += "Content-Length: %d\n" % retrlen
2114 type = 'text/plain;charset=US-ASCII'
2124 msg.append('Content-type: %s' % type)
2127 data = base64.decodebytes(data.encode('ascii')).decode('latin-1')
2130 msg.append('Content-Length: %d' % len(data))
2150 """Default error handling -- don't raise an exception."""
2154 """Error 302 -- relocated (temporarily)."""
2200 """Error 301 -- also relocated (permanently)."""
2204 """Error 303 -- also relocated (essentially identical to 302)."""
2208 """Error 307 -- relocated, but turn POST into error."""
2216 """Error 401 -- authentication required.
2218 if 'www-authenticate' not in headers:
2221 stuff = headers['www-authenticate']
2241 """Error 407 -- proxy authentication required.
2243 if 'proxy-authenticate' not in headers:
2246 stuff = headers['proxy-authenticate']
2476 self.refcount -= 1
2489 """Return a dictionary of scheme -> proxy server URL mappings.
2502 if value and name[-6:] == '_proxy':
2503 proxies[name[:-6]] = value
2504 # CVE-2016-1000110 - If we are running as CGI script, forget HTTP_PROXY
2505 # (non-all-lowercase) as it may be set from the web server by a "Proxy:"
2511 if name[-6:] == '_proxy':
2514 proxies[name[:-6]] = value
2516 proxies.pop(name[:-6], None)
2560 This function uses the MacOSX framework SystemConfiguration
2610 mask = 32 - mask
2629 """Return a dictionary of scheme -> proxy server URL mappings.
2631 This function uses the MacOSX framework SystemConfiguration
2642 or from the MacOSX framework SystemConfiguration.
2657 """Return a dictionary of scheme -> proxy server URL mappings.
2666 # Std module, so should be around - but you never know!
2678 # Per-protocol settings
2702 """Return a dictionary of scheme -> proxy server URL mappings.
2714 # Std modules, so should be around - but you never know!