How to use the waitress.compat.unquote_bytes_to_wsgi function in waitress

To help you get started, we’ve selected a few waitress examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Pylons / waitress / tests / test_compat.py View on Github external
def _callFUT(self, v):
        from waitress.compat import unquote_bytes_to_wsgi

        return unquote_bytes_to_wsgi(v)
github Pylons / waitress / src / waitress / parser.py View on Github external
if b"#" in path:
            path, fragment = path.split(b"#", 1)

        if b"?" in path:
            path, query = path.split(b"?", 1)
    else:
        try:
            scheme, netloc, path, query, fragment = urlparse.urlsplit(uri)
        except UnicodeError:
            raise ParsingError("Bad URI")

    return (
        tostr(scheme),
        tostr(netloc),
        unquote_bytes_to_wsgi(path),
        tostr(query),
        tostr(fragment),
    )
github snakeleon / YouCompleteMe-x64 / third_party / ycmd / third_party / waitress / waitress / parser.py View on Github external
def split_uri(uri):
    # urlsplit handles byte input by returning bytes on py3, so
    # scheme, netloc, path, query, and fragment are bytes
    try:
        scheme, netloc, path, query, fragment = urlparse.urlsplit(uri)
    except UnicodeError:
        raise ParsingError('Bad URI')
    return (
        tostr(scheme),
        tostr(netloc),
        unquote_bytes_to_wsgi(path),
        tostr(query),
        tostr(fragment),
    )