Commits

Michiel Overtoom committed 30f2074

Comments (0)

Files changed (19)

 
     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:

cherrypy/_cpdispatch.py

                     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]
 
 
         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):]

cherrypy/_cpreqbody.py

     """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
         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
             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

cherrypy/lib/caching.py

             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))

cherrypy/lib/httputil.py

 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.')

cherrypy/lib/sessions.py

                     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()

cherrypy/process/wspbus.py

 
     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()
 
             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():

cherrypy/test/test_config_server.py

             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

cherrypy/test/test_conn.py

                     # 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('')

cherrypy/test/test_core.py

         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')

cherrypy/test/test_http.py

             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()
 

cherrypy/test/test_mime.py

                           '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',

cherrypy/test/test_objectmapping.py

         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")
 
         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)
 

cherrypy/test/test_proxy.py

             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)

cherrypy/test/test_request_obj.py

                 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."
                         "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;')])
 
     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")])
         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:
             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")

cherrypy/test/test_xmlrpc.py

         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()

cherrypy/wsgiserver/wsgiserver2.py

             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)
 
         # 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)
                 # 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.
                             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
 
             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:
                 # 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
 
                     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,

cherrypy/wsgiserver/wsgiserver3.py

             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)
 
         # 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)
                 # 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.
                             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
 
             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:
                 # 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
 
                     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,