Tornado is a Python web framework and asynchronous networking library, originally developed at FriendFeed.
642 matches across 12 categories. Click a row to expand file-level details.
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | docs/conf.py | 139 | def missing_reference_handler(app, env, node, contnode): |
| LOW | tornado/auth.py | 216 | def _on_authentication_verified( |
| LOW | tornado/auth.py | 509 | def _oauth_request_parameters( |
| LOW | tornado/auth.py | 879 | def get_google_oauth_settings(self) -> dict[str, str]: |
| LOW | tornado/concurrent.py | 117 | def run_on_executor_decorator(fn: Callable) -> Callable[..., Future]: |
| LOW | tornado/concurrent.py | 178 | def future_set_result_unless_cancelled( |
| LOW | tornado/concurrent.py | 192 | def future_set_exception_unless_cancelled( |
| LOW | tornado/web.py | 163 | class RequestHandler: |
| LOW | tornado/web.py | 915 | def get_signed_cookie_key_version( |
| LOW | tornado/web.py | 1903 | def _handle_request_exception(self, e: BaseException) -> None: |
| LOW | tornado/web.py | 1968 | def _clear_representation_headers(self) -> None: |
| LOW | tornado/web.py | 3776 | def get_signature_key_version(value: str | bytes) -> int | None: |
| LOW | tornado/gen.py | 126 | def _value_from_stopiteration(e: Union[StopIteration, "Return"]) -> Any: |
| LOW | tornado/iostream.py | 991 | def _maybe_add_error_listener(self) -> None: |
| LOW | tornado/httputil.py | 1031 | def parse_multipart_form_data( |
| LOW | tornado/httputil.py | 1153 | def parse_response_start_line(line: str) -> ResponseStartLine: |
| LOW | tornado/locale.py | 178 | def load_gettext_translations(directory: str, domain: str) -> None: |
| LOW | tornado/curl_httpclient.py | 286 | def handle_callback_exception(self, callback: Any) -> None: |
| LOW | tornado/testing.py | 753 | def setup_with_context_manager(testcase: unittest.TestCase, cm: Any) -> Any: |
| LOW | tornado/http1connection.py | 871 | def is_transfer_encoding_chunked(headers: httputil.HTTPHeaders) -> bool: |
| LOW | tornado/websocket.py | 635 | def _raise_not_supported_for_websockets(*args: Any, **kwargs: Any) -> None: |
| LOW | tornado/websocket.py | 895 | def _handle_websocket_headers(self, handler: WebSocketHandler) -> None: |
| LOW | tornado/test/httpclient_test.py | 109 | def _clear_representation_headers(self): |
| LOW | tornado/test/httpclient_test.py | 204 | def test_patch_receives_payload(self): |
| LOW | tornado/test/httpclient_test.py | 285 | def test_basic_auth_explicit_mode(self): |
| LOW | tornado/test/httpclient_test.py | 311 | def test_unsupported_auth_mode(self): |
| LOW | tornado/test/httpclient_test.py | 335 | def test_redirect_without_location(self): |
| LOW | tornado/test/httpclient_test.py | 343 | def test_redirect_put_with_body(self): |
| LOW | tornado/test/httpclient_test.py | 349 | def test_redirect_put_without_body(self): |
| LOW | tornado/test/httpclient_test.py | 358 | def test_method_after_redirect(self): |
| LOW | tornado/test/httpclient_test.py | 497 | def test_header_callback_to_parse_line(self): |
| LOW | tornado/test/httpclient_test.py | 604 | def test_future_http_error_no_raise(self): |
| LOW | tornado/test/httpclient_test.py | 611 | def test_reuse_request_from_response(self): |
| LOW | tornado/test/httpclient_test.py | 773 | def test_strip_headers_on_redirect(self): |
| LOW | tornado/test/httpclient_test.py | 982 | def test_if_modified_since_naive_deprecated(self): |
| LOW | tornado/test/queues_test.py | 88 | def test_nonblocking_get_exception(self): |
| LOW | tornado/test/queues_test.py | 121 | def test_get_timeout_preempted(self): |
| LOW | tornado/test/queues_test.py | 129 | def test_get_clears_timed_out_putters(self): |
| LOW | tornado/test/queues_test.py | 145 | def test_get_clears_timed_out_getters(self): |
| LOW | tornado/test/queues_test.py | 184 | def test_nonblocking_put_exception(self): |
| LOW | tornado/test/queues_test.py | 200 | def test_nonblocking_put_with_getters(self): |
| LOW | tornado/test/queues_test.py | 243 | def test_put_timeout_preempted(self): |
| LOW | tornado/test/queues_test.py | 252 | def test_put_clears_timed_out_putters(self): |
| LOW | tornado/test/queues_test.py | 267 | def test_put_clears_timed_out_getters(self): |
| LOW | tornado/test/auth_test.py | 481 | def test_twitter_redirect_gen_coroutine(self): |
| LOW | tornado/test/auth_test.py | 484 | def test_twitter_authenticate_redirect(self): |
| LOW | tornado/test/auth_test.py | 528 | def test_twitter_show_user_error(self): |
| LOW | tornado/test/httpserver_test.py | 85 | class HelloWorldRequestHandler(RequestHandler): |
| LOW | tornado/test/httpserver_test.py | 360 | def test_query_string_encoding(self): |
| LOW | tornado/test/httpserver_test.py | 370 | def test_empty_post_parameters(self): |
| LOW | tornado/test/httpserver_test.py | 433 | def test_malformed_first_line_response(self): |
| LOW | tornado/test/httpserver_test.py | 443 | def test_malformed_first_line_log(self): |
| LOW | tornado/test/httpserver_test.py | 461 | def test_invalid_host_header_with_whitespace(self): |
| LOW | tornado/test/httpserver_test.py | 473 | def test_chunked_request_body(self): |
| LOW | tornado/test/httpserver_test.py | 1399 | def test_large_body_buffered_chunked(self): |
| LOW | tornado/test/httpserver_test.py | 1409 | def test_large_body_streaming(self): |
| LOW | tornado/test/httpserver_test.py | 1415 | def test_large_body_streaming_chunked(self): |
| LOW | tornado/test/httpserver_test.py | 1424 | def test_large_body_streaming_override(self): |
| LOW | tornado/test/httpserver_test.py | 1430 | def test_large_body_streaming_chunked_override(self): |
| LOW | tornado/test/httpserver_test.py | 494 | def test_chunked_request_uppercase(self): |
| 311 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | requirements.txt | 1 | # |
| LOW | requirements.txt | 21 | click==8.3.1 |
| LOW | requirements.txt | 41 | # via requests |
| LOW | requirements.txt | 61 | # build |
| LOW | requirements.txt | 81 | # via flake8 |
| LOW | requirements.txt | 101 | # via sphinx |
| LOW | requirements.txt | 121 | sphinxcontrib-serializinghtml==2.0.0 |
| LOW | runtests.sh | 1 | #!/bin/sh |
| LOW | setup.py | 1 | # |
| LOW | tox.ini | 1 | # Tox (https://tox.readthedocs.io) is a tool for running tests |
| LOW | tox.ini | 21 | py310,py311,py312,py313,py314,pypy3 |
| LOW | tox.ini | 61 | # cog.outl(f"{{{",".join(versions)}}}: TORNADO_EXTENSION=1") |
| LOW | tox.ini | 81 | |
| LOW | tox.ini | 121 | commands = |
| LOW | tornado/options.py | 1 | # |
| LOW | tornado/auth.py | 1 | # |
| LOW | tornado/concurrent.py | 1 | # |
| LOW | tornado/escape.py | 1 | # |
| LOW | tornado/web.py | 1 | # |
| LOW | tornado/web.py | 681 | # in the next feature release. |
| LOW | tornado/web.py | 2801 | and (start >= size or (end is not None and start >= end)) |
| LOW | tornado/web.py | 2961 | # abspath always removes a trailing slash, except when |
| LOW | tornado/web.py | 3581 | # The v2 format consists of a version number and a series of |
| LOW | tornado/queues.py | 1 | # Copyright 2015 The Tornado Authors |
| LOW | tornado/_locale_data.py | 1 | # Copyright 2012 Facebook |
| LOW | tornado/iostream.py | 1 | # |
| LOW | tornado/iostream.py | 781 | # StreamClosedError instead of AssertionError. In particular, this |
| LOW | tornado/iostream.py | 1421 | self._server_hostname = server_hostname |
| LOW | tornado/log.py | 1 | # |
| LOW | tornado/locks.py | 1 | # Copyright 2015 The Tornado Authors |
| LOW | tornado/httpserver.py | 1 | # |
| LOW | tornado/__init__.py | 1 | # |
| LOW | tornado/netutil.py | 1 | # |
| LOW | tornado/netutil.py | 161 | try: |
| LOW | tornado/netutil.py | 261 | # entered this method, but this information is not available |
| LOW | tornado/httputil.py | 1 | # |
| LOW | tornado/httputil.py | 521 | # We test for the presence of a comma instead of the number of |
| LOW | tornado/httputil.py | 1161 | match = _ABNF.status_line.fullmatch(line) |
| LOW | tornado/ioloop.py | 1 | # |
| LOW | tornado/ioloop.py | 781 | # We accept both raw file descriptors and file-like objects as |
| LOW | tornado/ioloop.py | 961 | math.floor((current_time - self._next_timeout) / callback_time_sec) + 1 |
| LOW | tornado/routing.py | 1 | # Copyright 2015 The Tornado Authors |
| LOW | tornado/tcpserver.py | 1 | # |
| LOW | tornado/template.py | 1 | # |
| LOW | tornado/locale.py | 1 | # Copyright 2009 Facebook |
| LOW | tornado/curl_httpclient.py | 1 | # |
| LOW | tornado/curl_httpclient.py | 161 | # call _set_timeout whenever the timeout changes. However, |
| LOW | tornado/process.py | 1 | # |
| LOW | tornado/autoreload.py | 1 | # |
| LOW | tornado/autoreload.py | 41 | Additionally, modifying these variables will cause reloading to behave |
| LOW | tornado/autoreload.py | 61 | # |
| LOW | tornado/testing.py | 161 | def tearDown(self) -> None: |
| LOW | tornado/http1connection.py | 1 | # |
| LOW | tornado/http1connection.py | 141 | self._body_timeout = self.params.body_timeout |
| LOW | tornado/tcpclient.py | 1 | # |
| LOW | tornado/wsgi.py | 1 | # |
| LOW | tornado/test/httpclient_test.py | 681 | ) |
| LOW | tornado/test/queues_test.py | 1 | # Licensed under the Apache License, Version 2.0 (the "License"); you may |
| LOW | tornado/test/twisted_test.py | 1 | # Author: Ovidiu Predescu |
| LOW | tornado/test/concurrent_test.py | 1 | # |
| 23 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | tornado/options.py | 657 | except Exception: |
| LOW | tornado/concurrent.py | 63 | except Exception: |
| LOW | tornado/web.py | 1348 | except Exception: |
| LOW | tornado/web.py | 1362 | except Exception: |
| LOW | tornado/web.py | 1633 | except Exception: |
| LOW | tornado/web.py | 1864 | except Exception as e: |
| LOW | tornado/web.py | 1867 | except Exception: |
| LOW | tornado/web.py | 1911 | except Exception: |
| LOW | tornado/web.py | 2908 | except Exception: |
| LOW | tornado/web.py | 3206 | except Exception: |
| LOW | tornado/web.py | 3712 | except Exception: |
| LOW | tornado/web.py | 3772 | except Exception: |
| MEDIUM | tornado/httpclient.py | 75 | print("Error: " + str(e)) |
| LOW | tornado/httpclient.py | 76 | except Exception as e: |
| MEDIUM | tornado/httpclient.py | 78 | print("Error: " + str(e)) |
| LOW | tornado/httpclient.py | 149 | except Exception as e: |
| MEDIUM | tornado/httpclient.py | 150 | print("Error: %s" % e) |
| LOW | tornado/gen.py | 208 | except Exception: |
| LOW | tornado/gen.py | 228 | except Exception: |
| LOW | tornado/gen.py | 317 | except Exception as e: |
| MEDIUM | tornado/gen.py | 318 | print("Error {} from {}".format(e, wait_iterator.current_future)) |
| LOW | tornado/gen.py | 531 | except Exception as e: |
| LOW | tornado/gen.py | 628 | except Exception as e: |
| LOW | tornado/gen.py | 768 | except Exception as e: |
| LOW | tornado/gen.py | 796 | except Exception: |
| LOW | tornado/iostream.py | 716 | except Exception as e: |
| LOW | tornado/iostream.py | 769 | except Exception as e: |
| LOW | tornado/iostream.py | 1367 | except Exception: |
| MEDIUM | tornado/iostream.py | 762 | def _handle_read(self) -> None: |
| LOW | tornado/log.py | 68 | except Exception: |
| LOW | tornado/log.py | 190 | except Exception as e: |
| MEDIUM | tornado/log.py | 56 | def _stderr_supports_color() -> bool: |
| LOW | tornado/httputil.py | 555 | except Exception: |
| LOW | tornado/httputil.py | 561 | except Exception: |
| LOW | tornado/httputil.py | 1003 | except Exception as e: |
| LOW | tornado/httputil.py | 1027 | except Exception as e: |
| LOW | tornado/ioloop.py | 501 | except Exception: |
| LOW | tornado/ioloop.py | 771 | except Exception: |
| LOW | tornado/ioloop.py | 940 | except Exception: |
| MEDIUM | tornado/ioloop.py | 494 | def run() -> None: |
| LOW | tornado/tcpserver.py | 382 | except Exception: |
| LOW | tornado/template.py | 329 | except Exception: |
| LOW | tornado/locale.py | 212 | except Exception as e: |
| LOW | tornado/curl_httpclient.py | 215 | except Exception as e: |
| LOW | tornado/curl_httpclient.py | 283 | except Exception: |
| LOW | tornado/autoreload.py | 190 | except Exception: |
| LOW | tornado/autoreload.py | 315 | except Exception as e: |
| LOW | tornado/testing.py | 325 | except Exception: |
| MEDIUM | tornado/testing.py | 320 | def timeout_func() -> None: |
| LOW | tornado/simple_httpclient.py | 440 | except Exception: |
| MEDIUM | tornado/simple_httpclient.py | 283 | def run(self) -> None: |
| LOW | tornado/http1connection.py | 809 | except Exception: |
| LOW | tornado/http1connection.py | 842 | except Exception: |
| LOW | tornado/tcpclient.py | 136 | except Exception as e: |
| LOW | tornado/websocket.py | 658 | except Exception: |
| LOW | tornado/websocket.py | 964 | except Exception: |
| LOW | tornado/test/auth_test.py | 100 | except Exception as e: |
| MEDIUM | tornado/test/httpserver_test.py | 341 | def decode_argument(self, value, name=None): |
| LOW | tornado/test/httpserver_test.py | 344 | except Exception: |
| LOW | tornado/test/process_test.py | 125 | except Exception: |
| 16 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | tornado/options.py | 361 | |
| LOW | tornado/escape.py | 266 | |
| LOW | tornado/web.py | 2015 | |
| LOW | tornado/web.py | 3356 | |
| LOW | tornado/web.py | 404 | |
| LOW | tornado/web.py | 1427 | |
| LOW | tornado/web.py | 2026 | |
| LOW | tornado/web.py | 2312 | |
| LOW | tornado/web.py | 2327 | |
| LOW | tornado/web.py | 2995 | |
| LOW | tornado/web.py | 3371 | |
| LOW | tornado/gen.py | 492 | |
| LOW | tornado/gen.py | 856 | |
| LOW | tornado/gen.py | 524 | |
| LOW | tornado/gen.py | 750 | |
| LOW | tornado/iostream.py | 551 | |
| LOW | tornado/iostream.py | 836 | |
| LOW | tornado/iostream.py | 892 | |
| LOW | tornado/iostream.py | 1349 | |
| LOW | tornado/log.py | 56 | |
| LOW | tornado/netutil.py | 56 | |
| LOW | tornado/httputil.py | 976 | |
| LOW | tornado/httputil.py | 548 | |
| LOW | tornado/routing.py | 613 | |
| LOW | tornado/template.py | 844 | |
| LOW | tornado/locale.py | 91 | |
| LOW | tornado/locale.py | 329 | |
| LOW | tornado/simple_httpclient.py | 283 | |
| LOW | tornado/simple_httpclient.py | 615 | |
| LOW | tornado/http1connection.py | 187 | |
| LOW | tornado/http1connection.py | 645 | |
| LOW | tornado/http1connection.py | 659 | |
| LOW | tornado/http1connection.py | 733 | |
| LOW | tornado/websocket.py | 1216 | |
| LOW | tornado/test/httpserver_test.py | 395 | |
| LOW | tornado/test/httpserver_test.py | 1265 | |
| LOW | tornado/test/circlerefs_test.py | 64 | |
| LOW | tornado/test/gen_test.py | 795 | |
| LOW | tornado/test/gen_test.py | 860 | |
| LOW | tornado/test/autoreload_test.py | 103 | |
| LOW | tornado/test/httputil_test.py | 388 | |
| LOW | tornado/test/util_test.py | 316 | |
| LOW | tornado/platform/asyncio.py | 570 | |
| LOW | maint/test/redbot/red_test.py | 76 | |
| LOW | demos/file_upload/file_uploader.py | 26 |
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | docs/conf.py | 151 | # Define the canonical URL if you are using a custom domain on Read the Docs |
| MEDIUM | tornado/httpclient.py | 102 | # Create the client while our IOLoop is "current", without |
| MEDIUM | tornado/gen.py | 200 | # This function is type-annotated with a comment to work around |
| MEDIUM | tornado/iostream.py | 722 | # This method is called from _handle_read and _try_inline_read. |
| MEDIUM | tornado/iostream.py | 992 | # This method is part of an optimization: to detect a connection that |
| MEDIUM | tornado/httputil.py | 654 | """This method is called by the server when a new request has started. |
| MEDIUM | tornado/httputil.py | 666 | """This method is called when a connection has been closed. |
| MEDIUM | tornado/ioloop.py | 268 | # Create a new asyncio event loop for this thread. |
| MEDIUM | tornado/ioloop.py | 789 | # This method is provided for use by `IOLoop` subclasses and should |
| MEDIUM | tornado/ioloop.py | 804 | # This method is provided for use by `IOLoop` subclasses (in |
| MEDIUM | tornado/wsgi.py | 50 | # This function is like those in the tornado.escape module, but defined |
| MEDIUM | tornado/platform/asyncio.py | 523 | # Create a thread to run the select system call. We manage this thread |
| MEDIUM | tornado/platform/asyncio.py | 703 | # This class is a __getattribute__-based proxy. All attributes other than those |
| MEDIUM | demos/blog/blog.py | 300 | # Create the global connection pool. |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | tornado/web.py | 106 | |
| LOW | tornado/web.py | 106 | |
| LOW | tornado/queues.py | 28 | |
| LOW | tornado/httpclient.py | 46 | |
| LOW | tornado/httpclient.py | 46 | |
| LOW | tornado/gen.py | 77 | |
| LOW | tornado/gen.py | 77 | |
| LOW | tornado/gen.py | 77 | |
| LOW | tornado/gen.py | 77 | |
| LOW | tornado/util.py | 13 | |
| LOW | tornado/locks.py | 19 | |
| LOW | tornado/locks.py | 19 | |
| LOW | tornado/httputil.py | 22 | |
| LOW | tornado/ioloop.py | 26 | |
| LOW | tornado/template.py | 208 | |
| LOW | tornado/locale.py | 40 | |
| LOW | tornado/testing.py | 26 | |
| LOW | tornado/testing.py | 26 | |
| LOW | tornado/simple_httpclient.py | 14 | |
| LOW | tornado/simple_httpclient.py | 14 | |
| LOW | tornado/http1connection.py | 26 | |
| LOW | tornado/http1connection.py | 26 | |
| LOW | tornado/tcpclient.py | 24 | |
| LOW | tornado/websocket.py | 27 | |
| LOW | tornado/websocket.py | 27 | |
| LOW | tornado/wsgi.py | 45 | |
| LOW | tornado/test/twisted_test.py | 37 | |
| LOW | tornado/test/ioloop_test.py | 12 | |
| LOW | tornado/test/ioloop_test.py | 18 | |
| LOW | tornado/test/websocket_test.py | 23 | |
| LOW | tornado/platform/asyncio.py | 49 | |
| LOW | tornado/platform/caresresolver.py | 3 |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | tox.ini | 127 | # here (must be completely unset, not just set to zero/empty). Remove this |
| LOW | tornado/httpclient.py | 208 | # It can't simply call _async_clients() because we may be in |
| LOW | tornado/iostream.py | 1512 | # simply return 0 bytes written. |
| MEDIUM | tornado/template.py | 893 | # This is especially useful in conjunction with jquery templates, |
| LOW | tornado/curl_httpclient.py | 52 | # Typeshed is incomplete for CurlMulti, so just use Any for now. |
| MEDIUM | tornado/curl_httpclient.py | 313 | # a bug in conjunction with the curl_multi_socket_action API |
| LOW | tornado/test/httpserver_test.py | 831 | # Unix sockets don't have remote addresses so they just return an |
| MEDIUM | tornado/test/circlerefs_test.py | 106 | # Construct a known leak scenario to make sure the test harness works. |
| MEDIUM | tornado/test/web_test.py | 1540 | # to disable Tornado's path validation (in conjunction with |
| MEDIUM | tornado/test/tcpserver_test.py | 141 | # harness too. |
| LOW | tornado/platform/asyncio.py | 606 | # polling the waker alone. If we are, just return to the |
| Severity | File | Line | Snippet |
|---|---|---|---|
| HIGH | tornado/test/httputil_test.py | 0 | \ --1234 content-disposition: form-data; name="files"; filename="ab.txt" foo --1234-- |
| HIGH | tornado/test/httputil_test.py | 0 | \ --1234 content-disposition: form-data; name="files"; filename="ab.txt" foo --1234-- |
| HIGH | tornado/test/httputil_test.py | 0 | \ --1234 content-disposition: form-data; name="files"; filename="ab.txt" foo --1234-- |
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | tornado/autoreload.py | 50 | # ----------------- |
| Severity | File | Line | Snippet |
|---|---|---|---|
| HIGH | tornado/web.py | 1987 | * `.HTTPServerRequest.body` is undefined, and body arguments will not |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | tornado/wsgi.py | 134 | async def handle_request(self, request: httputil.HTTPServerRequest) -> None: |
| LOW | tornado/test/httpserver_test.py | 1488 | def handle_request(request): |
| LOW | tornado/test/gen_test.py | 975 | def do_something(): |
| LOW | tornado/test/gen_test.py | 1010 | def do_something(): |
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | tornado/routing.py | 64 | Here is a simple example of how we can we route to |