diff options
author | Chris Beelby <cmbeelby@gmail.com> | 2012-12-06 22:01:30 -0500 |
---|---|---|
committer | Chris Beelby <cmbeelby@gmail.com> | 2012-12-06 22:01:30 -0500 |
commit | 22c28efc1b0d8bf9cc4135388f90bcd257d86361 (patch) | |
tree | 1b111bb741c03824c2cb6708102f6fefd182b2fe | |
parent | f98811dd0f0d427e37235f9e37b30f06e00f2113 (diff) | |
parent | efc62c27edb8db257ed72801f7e2873f2efee30f (diff) | |
download | cherrypy-22c28efc1b0d8bf9cc4135388f90bcd257d86361.tar.gz |
merging in changes from main cherrypy repo
-rw-r--r-- | cherrypy/__init__.py | 2 | ||||
-rw-r--r-- | cherrypy/_cpdispatch.py | 4 | ||||
-rw-r--r-- | cherrypy/_cpreqbody.py | 2 | ||||
-rw-r--r-- | cherrypy/_cptools.py | 4 | ||||
-rw-r--r-- | cherrypy/lib/caching.py | 2 | ||||
-rw-r--r-- | cherrypy/lib/httputil.py | 2 | ||||
-rw-r--r-- | cherrypy/lib/sessions.py | 2 | ||||
-rw-r--r-- | cherrypy/process/wspbus.py | 6 | ||||
-rw-r--r-- | cherrypy/test/test_config_server.py | 2 | ||||
-rw-r--r-- | cherrypy/test/test_conn.py | 2 | ||||
-rw-r--r-- | cherrypy/test/test_core.py | 2 | ||||
-rw-r--r-- | cherrypy/test/test_http.py | 2 | ||||
-rw-r--r-- | cherrypy/test/test_mime.py | 2 | ||||
-rw-r--r-- | cherrypy/test/test_objectmapping.py | 4 | ||||
-rw-r--r-- | cherrypy/test/test_proxy.py | 2 | ||||
-rw-r--r-- | cherrypy/test/test_request_obj.py | 10 | ||||
-rw-r--r-- | cherrypy/test/test_xmlrpc.py | 2 | ||||
-rw-r--r-- | cherrypy/wsgiserver/wsgiserver2.py | 18 | ||||
-rw-r--r-- | cherrypy/wsgiserver/wsgiserver3.py | 18 |
19 files changed, 44 insertions, 44 deletions
diff --git a/cherrypy/__init__.py b/cherrypy/__init__.py index a208d404..392ef352 100644 --- a/cherrypy/__init__.py +++ b/cherrypy/__init__.py @@ -295,7 +295,7 @@ class _GlobalLogManager(_cplogging.LogManager): def __call__(self, *args, **kwargs): """Log the given message to the app.log or global log as appropriate.""" - # Do NOT use try/except here. See http://www.cherrypy.org/ticket/945 + # Do NOT use try/except here. See https://bitbucket.org/cherrypy/cherrypy/issue/945 if hasattr(request, 'app') and hasattr(request.app, 'log'): log = request.app.log else: diff --git a/cherrypy/_cpdispatch.py b/cherrypy/_cpdispatch.py index e92d9306..a6774cd1 100644 --- a/cherrypy/_cpdispatch.py +++ b/cherrypy/_cpdispatch.py @@ -379,7 +379,7 @@ class Dispatcher(object): conf = getattr(defhandler, "_cp_config", {}) object_trail.insert(i+1, ["default", defhandler, conf, segleft]) request.config = set_conf() - # See http://www.cherrypy.org/ticket/613 + # See https://bitbucket.org/cherrypy/cherrypy/issue/613 request.is_index = path.endswith("/") return defhandler, fullpath[fullpath_len - segleft:-1] @@ -625,7 +625,7 @@ def VirtualHost(next_dispatcher=Dispatcher(), use_x_forwarded_host=True, **domai result = next_dispatcher(path_info) - # Touch up staticdir config. See http://www.cherrypy.org/ticket/614. + # Touch up staticdir config. See https://bitbucket.org/cherrypy/cherrypy/issue/614. section = request.config.get('tools.staticdir.section') if section: section = section[len(prefix):] diff --git a/cherrypy/_cpreqbody.py b/cherrypy/_cpreqbody.py index 9ee8d846..04ad7e38 100644 --- a/cherrypy/_cpreqbody.py +++ b/cherrypy/_cpreqbody.py @@ -895,7 +895,7 @@ class RequestBody(Entity): """The buffer size used when reading the socket.""" # Don't parse the request body at all if the client didn't provide - # a Content-Type header. See http://www.cherrypy.org/ticket/790 + # a Content-Type header. See https://bitbucket.org/cherrypy/cherrypy/issue/790 default_content_type = '' """This defines a default ``Content-Type`` to use if no Content-Type header is given. The empty string is used for RequestBody, which results in the diff --git a/cherrypy/_cptools.py b/cherrypy/_cptools.py index 2f24e65f..97faec2f 100644 --- a/cherrypy/_cptools.py +++ b/cherrypy/_cptools.py @@ -258,7 +258,7 @@ class SessionTool(Tool): When 'early', the session will be locked before reading the request body. This is off by default for safety reasons; for example, a large upload would block the session, denying an AJAX - progress meter (see http://www.cherrypy.org/ticket/630). + progress meter (see https://bitbucket.org/cherrypy/cherrypy/issue/630). When 'explicit' (or any other value), you need to call cherrypy.session.acquire_lock() yourself before using @@ -364,7 +364,7 @@ class XMLRPCController(object): body = subhandler(*(vpath + rpcparams), **params) else: - # http://www.cherrypy.org/ticket/533 + # https://bitbucket.org/cherrypy/cherrypy/issue/533 # if a method is not found, an xmlrpclib.Fault should be returned # raising an exception here will do that; see # cherrypy.lib.xmlrpcutil.on_error diff --git a/cherrypy/lib/caching.py b/cherrypy/lib/caching.py index fd6a2c98..42626fc5 100644 --- a/cherrypy/lib/caching.py +++ b/cherrypy/lib/caching.py @@ -348,7 +348,7 @@ def get(invalid_methods=("POST", "PUT", "DELETE"), debug=False, **kwargs): request.cacheable = True return False - # Copy the response headers. See http://www.cherrypy.org/ticket/721. + # Copy the response headers. See https://bitbucket.org/cherrypy/cherrypy/issue/721. response.headers = rh = httputil.HeaderMap() for k in h: dict.__setitem__(rh, k, dict.__getitem__(h, k)) diff --git a/cherrypy/lib/httputil.py b/cherrypy/lib/httputil.py index 51342820..5d5cffbf 100644 --- a/cherrypy/lib/httputil.py +++ b/cherrypy/lib/httputil.py @@ -12,7 +12,7 @@ from cherrypy._cpcompat import BaseHTTPRequestHandler, HTTPDate, ntob, ntou, rev from cherrypy._cpcompat import basestring, bytestr, iteritems, nativestr, unicodestr, unquote_qs response_codes = BaseHTTPRequestHandler.responses.copy() -# From http://www.cherrypy.org/ticket/361 +# From https://bitbucket.org/cherrypy/cherrypy/issue/361 response_codes[500] = ('Internal Server Error', 'The server encountered an unexpected condition ' 'which prevented it from fulfilling the request.') diff --git a/cherrypy/lib/sessions.py b/cherrypy/lib/sessions.py index 9c5a4b27..d45118ca 100644 --- a/cherrypy/lib/sessions.py +++ b/cherrypy/lib/sessions.py @@ -167,7 +167,7 @@ class Session(object): cherrypy.log('Expired or malicious session %r; ' 'making a new one' % id, 'TOOLS.SESSIONS') # Expired or malicious session. Make a new one. - # See http://www.cherrypy.org/ticket/709. + # See https://bitbucket.org/cherrypy/cherrypy/issue/709. self.id = None self.missing = True self._regenerate() diff --git a/cherrypy/process/wspbus.py b/cherrypy/process/wspbus.py index 3ef0217c..38288ee6 100644 --- a/cherrypy/process/wspbus.py +++ b/cherrypy/process/wspbus.py @@ -84,7 +84,7 @@ class ChannelFailures(Exception): def __init__(self, *args, **kwargs): # Don't use 'super' here; Exceptions are old-style in Py2.4 - # See http://www.cherrypy.org/ticket/959 + # See https://bitbucket.org/cherrypy/cherrypy/issue/959 Exception.__init__(self, *args, **kwargs) self._exceptions = list() @@ -311,10 +311,10 @@ class Bus(object): raise # Waiting for ALL child threads to finish is necessary on OS X. - # See http://www.cherrypy.org/ticket/581. + # See https://bitbucket.org/cherrypy/cherrypy/issue/581. # It's also good to let them all shut down before allowing # the main thread to call atexit handlers. - # See http://www.cherrypy.org/ticket/751. + # See https://bitbucket.org/cherrypy/cherrypy/issue/751. self.log("Waiting for child threads to terminate...") for t in threading.enumerate(): if t != threading.currentThread() and t.isAlive(): diff --git a/cherrypy/test/test_config_server.py b/cherrypy/test/test_config_server.py index 98a5b711..489904fa 100644 --- a/cherrypy/test/test_config_server.py +++ b/cherrypy/test/test_config_server.py @@ -90,7 +90,7 @@ class ServerConfigTests(helper.CPWebCase): self.getPage("/", headers=[('From', "x" * 500)]) self.assertStatus(413) - # Test for http://www.cherrypy.org/ticket/421 + # Test for https://bitbucket.org/cherrypy/cherrypy/issue/421 # (Incorrect border condition in readline of SizeCheckWrapper). # This hangs in rev 891 and earlier. lines256 = "x" * 248 diff --git a/cherrypy/test/test_conn.py b/cherrypy/test/test_conn.py index 1346f593..8f2512b7 100644 --- a/cherrypy/test/test_conn.py +++ b/cherrypy/test/test_conn.py @@ -182,7 +182,7 @@ class ConnectionCloseTests(helper.CPWebCase): # Make another request on the same connection, which should error. self.assertRaises(NotConnected, self.getPage, "/") - # Try HEAD. See http://www.cherrypy.org/ticket/864. + # Try HEAD. See https://bitbucket.org/cherrypy/cherrypy/issue/864. self.getPage("/stream", method='HEAD') self.assertStatus('200 OK') self.assertBody('') diff --git a/cherrypy/test/test_core.py b/cherrypy/test/test_core.py index 75a5310a..2c0a2552 100644 --- a/cherrypy/test/test_core.py +++ b/cherrypy/test/test_core.py @@ -398,7 +398,7 @@ class CoreRequestHandlingTest(helper.CPWebCase): self.assertStatus(('302 Found', '303 See Other')) # check injection protection - # See http://www.cherrypy.org/ticket/1003 + # See https://bitbucket.org/cherrypy/cherrypy/issue/1003 self.getPage("/redirect/custom?code=303&url=/foobar/%0d%0aSet-Cookie:%20somecookie=someval") self.assertStatus(303) loc = self.assertHeader('Location') diff --git a/cherrypy/test/test_http.py b/cherrypy/test/test_http.py index 334065dd..ff3797fd 100644 --- a/cherrypy/test/test_http.py +++ b/cherrypy/test/test_http.py @@ -161,7 +161,7 @@ class HTTPTests(helper.CPWebCase): c = HTTPConnection('%s:%s' % (self.interface(), self.PORT)) c.putrequest('GET', '/') c.putheader('Content-Type', 'text/plain') - # See http://www.cherrypy.org/ticket/941 + # See https://bitbucket.org/cherrypy/cherrypy/issue/941 c._output(ntob('Re, 1.2.3.4#015#012')) c.endheaders() diff --git a/cherrypy/test/test_mime.py b/cherrypy/test/test_mime.py index 478b7760..03cd078e 100644 --- a/cherrypy/test/test_mime.py +++ b/cherrypy/test/test_mime.py @@ -69,7 +69,7 @@ This is the <strong>HTML</strong> version 'bar', '--X', # Test a param with more than one value. - # See http://www.cherrypy.org/ticket/1028 + # See https://bitbucket.org/cherrypy/cherrypy/issue/1028 'Content-Disposition: form-data; name="baz"', '', '111', diff --git a/cherrypy/test/test_objectmapping.py b/cherrypy/test/test_objectmapping.py index 96910d51..86a0df33 100644 --- a/cherrypy/test/test_objectmapping.py +++ b/cherrypy/test/test_objectmapping.py @@ -268,7 +268,7 @@ class ObjectMappingTest(helper.CPWebCase): self.assertStatus("404 Not Found") # Make sure /foobar maps to Root.foobar and not to the app - # mounted at /foo. See http://www.cherrypy.org/ticket/573 + # mounted at /foo. See https://bitbucket.org/cherrypy/cherrypy/issue/573 self.getPage("/foobar") self.assertBody("bar") @@ -319,7 +319,7 @@ class ObjectMappingTest(helper.CPWebCase): self.assertBody("default for dir1, param is:('dir2', '5', '3', 'sir')") # test that extra positional args raises an 404 Not Found - # See http://www.cherrypy.org/ticket/733. + # See https://bitbucket.org/cherrypy/cherrypy/issue/733. self.getPage("/dir1/dir2/script_name/extra/stuff") self.assertStatus(404) diff --git a/cherrypy/test/test_proxy.py b/cherrypy/test/test_proxy.py index 280a6b0b..a620115a 100644 --- a/cherrypy/test/test_proxy.py +++ b/cherrypy/test/test_proxy.py @@ -122,7 +122,7 @@ class ProxyTest(helper.CPWebCase): self.getPage(sn + "/pageurl") self.assertBody(expected) - # Test trailing slash (see http://www.cherrypy.org/ticket/562). + # Test trailing slash (see https://bitbucket.org/cherrypy/cherrypy/issue/562). self.getPage("/xhost/", headers=[('X-Host', 'www.example.test')]) self.assertHeader('Location', "%s://www.example.test/xhost" % self.scheme) diff --git a/cherrypy/test/test_request_obj.py b/cherrypy/test/test_request_obj.py index 26df353a..3f1fc03c 100644 --- a/cherrypy/test/test_request_obj.py +++ b/cherrypy/test/test_request_obj.py @@ -178,7 +178,7 @@ class RequestObjectTests(helper.CPWebCase): return cherrypy.request.headers[headername] def doubledheaders(self): - # From http://www.cherrypy.org/ticket/165: + # From https://bitbucket.org/cherrypy/cherrypy/issue/165: # "header field names should not be case sensitive sayes the rfc. # if i set a headerfield in complete lowercase i end up with two # header fields, one in lowercase, the other in mixed-case." @@ -575,7 +575,7 @@ class RequestObjectTests(helper.CPWebCase): "en-gb;q=0.8\n" "en;q=0.7") - # Test malformed header parsing. See http://www.cherrypy.org/ticket/763. + # Test malformed header parsing. See https://bitbucket.org/cherrypy/cherrypy/issue/763. self.getPage("/headerelements/get_elements?headername=Content-Type", # Note the illegal trailing ";" headers=[('Content-Type', 'text/html; charset=utf-8;')]) @@ -584,7 +584,7 @@ class RequestObjectTests(helper.CPWebCase): def test_repeated_headers(self): # Test that two request headers are collapsed into one. - # See http://www.cherrypy.org/ticket/542. + # See https://bitbucket.org/cherrypy/cherrypy/issue/542. self.getPage("/headers/Accept-Charset", headers=[("Accept-Charset", "iso-8859-5"), ("Accept-Charset", "unicode-1-1;q=0.8")]) @@ -667,7 +667,7 @@ class RequestObjectTests(helper.CPWebCase): self.assertBody(b) # Request a PUT method with a file body but no Content-Type. - # See http://www.cherrypy.org/ticket/790. + # See https://bitbucket.org/cherrypy/cherrypy/issue/790. b = ntob("one thing on top of another") self.persistent = True try: @@ -686,7 +686,7 @@ class RequestObjectTests(helper.CPWebCase): self.persistent = False # Request a PUT method with no body whatsoever (not an empty one). - # See http://www.cherrypy.org/ticket/650. + # See https://bitbucket.org/cherrypy/cherrypy/issue/650. # Provide a C-T or webtest will provide one (and a C-L) for us. h = [("Content-Type", "text/plain")] self.getPage("/method/reachable", headers=h, method="PUT") diff --git a/cherrypy/test/test_xmlrpc.py b/cherrypy/test/test_xmlrpc.py index 9d34ed52..90f28e9c 100644 --- a/cherrypy/test/test_xmlrpc.py +++ b/cherrypy/test/test_xmlrpc.py @@ -156,7 +156,7 @@ class XmlRpcTest(helper.CPWebCase): else: self.fail("Expected xmlrpclib.Fault") - # http://www.cherrypy.org/ticket/533 + # https://bitbucket.org/cherrypy/cherrypy/issue/533 # if a method is not found, an xmlrpclib.Fault should be raised try: proxy.non_method() diff --git a/cherrypy/wsgiserver/wsgiserver2.py b/cherrypy/wsgiserver/wsgiserver2.py index 91ef3226..541eb933 100644 --- a/cherrypy/wsgiserver/wsgiserver2.py +++ b/cherrypy/wsgiserver/wsgiserver2.py @@ -275,7 +275,7 @@ class SizeCheckWrapper(object): self.bytes_read += len(data) self._check_length() res.append(data) - # See http://www.cherrypy.org/ticket/421 + # See https://bitbucket.org/cherrypy/cherrypy/issue/421 if len(data) < 256 or data[-1:] == "\n": return EMPTY.join(res) @@ -763,7 +763,7 @@ class HTTPRequest(object): # but it seems like it would be a big slowdown for such a rare case. if self.inheaders.get("Expect", "") == "100-continue": # Don't use simple_response here, because it emits headers - # we don't want. See http://www.cherrypy.org/ticket/951 + # we don't want. See https://bitbucket.org/cherrypy/cherrypy/issue/951 msg = self.server.protocol + " 100 Continue\r\n\r\n" try: self.conn.wfile.sendall(msg) @@ -1310,7 +1310,7 @@ class HTTPConnection(object): # Don't error if we're between requests; only error # if 1) no request has been started at all, or 2) we're # in the middle of a request. - # See http://www.cherrypy.org/ticket/853 + # See https://bitbucket.org/cherrypy/cherrypy/issue/853 if (not request_seen) or (req and req.started_request): # Don't bother writing the 408 if the response # has already started being written. @@ -1553,7 +1553,7 @@ class ThreadPool(object): worker.join() except (AssertionError, # Ignore repeated Ctrl-C. - # See http://www.cherrypy.org/ticket/691. + # See https://bitbucket.org/cherrypy/cherrypy/issue/691. KeyboardInterrupt): pass @@ -1877,7 +1877,7 @@ class HTTPServer(object): self.socket = self.ssl_adapter.bind(self.socket) # If listening on the IPV6 any address ('::' = IN6ADDR_ANY), - # activate dual-stack. See http://www.cherrypy.org/ticket/871. + # activate dual-stack. See https://bitbucket.org/cherrypy/cherrypy/issue/871. if (hasattr(socket, 'AF_INET6') and family == socket.AF_INET6 and self.bind_addr[0] in ('::', '::0', '::0.0.0.0')): try: @@ -1964,14 +1964,14 @@ class HTTPServer(object): # is received during the accept() call; all docs say retry # the call, and I *think* I'm reading it right that Python # will then go ahead and poll for and handle the signal - # elsewhere. See http://www.cherrypy.org/ticket/707. + # elsewhere. See https://bitbucket.org/cherrypy/cherrypy/issue/707. return if x.args[0] in socket_errors_nonblocking: - # Just try again. See http://www.cherrypy.org/ticket/479. + # Just try again. See https://bitbucket.org/cherrypy/cherrypy/issue/479. return if x.args[0] in socket_errors_to_ignore: # Our socket was closed. - # See http://www.cherrypy.org/ticket/686. + # See https://bitbucket.org/cherrypy/cherrypy/issue/686. return raise @@ -2002,7 +2002,7 @@ class HTTPServer(object): x = sys.exc_info()[1] if x.args[0] not in socket_errors_to_ignore: # Changed to use error code and not message - # See http://www.cherrypy.org/ticket/860. + # See https://bitbucket.org/cherrypy/cherrypy/issue/860. raise else: # Note that we're explicitly NOT using AI_PASSIVE, diff --git a/cherrypy/wsgiserver/wsgiserver3.py b/cherrypy/wsgiserver/wsgiserver3.py index e734a1a1..4f5343ed 100644 --- a/cherrypy/wsgiserver/wsgiserver3.py +++ b/cherrypy/wsgiserver/wsgiserver3.py @@ -265,7 +265,7 @@ class SizeCheckWrapper(object): self.bytes_read += len(data) self._check_length() res.append(data) - # See http://www.cherrypy.org/ticket/421 + # See https://bitbucket.org/cherrypy/cherrypy/issue/421 if len(data) < 256 or data[-1:] == "\n": return EMPTY.join(res) @@ -754,7 +754,7 @@ class HTTPRequest(object): # but it seems like it would be a big slowdown for such a rare case. if self.inheaders.get(b"Expect", b"") == b"100-continue": # Don't use simple_response here, because it emits headers - # we don't want. See http://www.cherrypy.org/ticket/951 + # we don't want. See https://bitbucket.org/cherrypy/cherrypy/issue/951 msg = self.server.protocol.encode('ascii') + b" 100 Continue\r\n\r\n" try: self.conn.wfile.write(msg) @@ -1044,7 +1044,7 @@ class HTTPConnection(object): # Don't error if we're between requests; only error # if 1) no request has been started at all, or 2) we're # in the middle of a request. - # See http://www.cherrypy.org/ticket/853 + # See https://bitbucket.org/cherrypy/cherrypy/issue/853 if (not request_seen) or (req and req.started_request): # Don't bother writing the 408 if the response # has already started being written. @@ -1287,7 +1287,7 @@ class ThreadPool(object): worker.join() except (AssertionError, # Ignore repeated Ctrl-C. - # See http://www.cherrypy.org/ticket/691. + # See https://bitbucket.org/cherrypy/cherrypy/issue/691. KeyboardInterrupt): pass @@ -1591,7 +1591,7 @@ class HTTPServer(object): self.socket = self.ssl_adapter.bind(self.socket) # If listening on the IPV6 any address ('::' = IN6ADDR_ANY), - # activate dual-stack. See http://www.cherrypy.org/ticket/871. + # activate dual-stack. See https://bitbucket.org/cherrypy/cherrypy/issue/871. if (hasattr(socket, 'AF_INET6') and family == socket.AF_INET6 and self.bind_addr[0] in ('::', '::0', '::0.0.0.0')): try: @@ -1678,14 +1678,14 @@ class HTTPServer(object): # is received during the accept() call; all docs say retry # the call, and I *think* I'm reading it right that Python # will then go ahead and poll for and handle the signal - # elsewhere. See http://www.cherrypy.org/ticket/707. + # elsewhere. See https://bitbucket.org/cherrypy/cherrypy/issue/707. return if x.args[0] in socket_errors_nonblocking: - # Just try again. See http://www.cherrypy.org/ticket/479. + # Just try again. See https://bitbucket.org/cherrypy/cherrypy/issue/479. return if x.args[0] in socket_errors_to_ignore: # Our socket was closed. - # See http://www.cherrypy.org/ticket/686. + # See https://bitbucket.org/cherrypy/cherrypy/issue/686. return raise @@ -1716,7 +1716,7 @@ class HTTPServer(object): x = sys.exc_info()[1] if x.args[0] not in socket_errors_to_ignore: # Changed to use error code and not message - # See http://www.cherrypy.org/ticket/860. + # See https://bitbucket.org/cherrypy/cherrypy/issue/860. raise else: # Note that we're explicitly NOT using AI_PASSIVE, |