py311-WSGIProxy2-0.5.1nb2 0.5.1nb2
Bundled Python dependency library pathImports the Python urllib3 library
SHA-25645c6bf4e57791f77a9efb8a03fe819124c8e3152d82bfd28b8e2c36a02c8e206
Evidence
1# -*- coding: utf-8 -
2from webob import exc
3from webob.compat import PY3, url_quote
4import logging
5import socket
6import re
7
8try:
9 import urlparse
10except ImportError: # pragma: nocover
11 import urllib.parse as urlparse # NOQA
12
13try:
14 import httplib
15except ImportError: # pragma: nocover
16 import http.client as httplib # NOQA
17
18LOW_CHAR_SAFE = ''.join(chr(n) for n in range(128))
19
20ABSOLUTE_URL_RE = re.compile(r"^https?://", re.I)
21
22ALLOWED_METHODS = ['GET', 'HEAD', 'POST', 'PUT', 'DELETE', 'OPTIONS', 'PATCH']
23
24WEBOB_ERROR = (
25 "Content-Length is set to -1. This usually mean that WebOb has "
26 "already parsed the content body. You should set the Content-Length "
27 "header to the correct value before forwa …
40:17… ath = prefix_path.strip('/')
41 if prefix_path:
42 location = location.replace(host_uri,
43 host_uri + '/' + prefix_path)
44 return location
45 elif url.scheme == host_url.scheme and url.netloc == host_url.netloc:
46 return urlparse.urlunparse((host_url.scheme, host_url.ne …
61:35… , body, headers):
62 ssl = uri.startswith('https://')
63 ConnClass = ssl and self.HTTPSConnection or self.HTTPConnection
64 uri = ssl and uri[8:] or uri[7:]
65 port = ssl and 443 or 80
66 try:
67 host, path = uri.split('/', 1)
68 except ValueError:
69 host = uri
70 path = '' …
78:44… ontent-Length']))
79 else:
80 body = None
81 conn.request(method, path, body, headers, **self.options)
82 response = conn.getresponse()
83 status = '%s %s' % (response.status, …
113:42…
114 self.http = client
115 else:
116 mod = __import__('wsgiproxy.%s_client' % client,
117 globals(), locals(), [''])
118 self.http = mod.HttpClient(**client_options)
119 self.logger = logging.getLogger(__name__)
120
121 def extract_uri …
Showing the top 5 files — 6 more files (36 regions) not shown.
No evidence locations were recorded for this file. Raw result