PHP 8.2.30
Preview: utils.py Size: 742 B
/opt/alt/python37/lib/python3.7/site-packages/raven/contrib/webpy/utils.py

"""
raven.contrib.webpy.utils
~~~~~~~~~~~~~~~~~~~~~~~~~~

:copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import

import web

from raven.utils.wsgi import get_headers, get_environ


def get_data_from_request():
    """Returns request data extracted from web.ctx."""
    return {
        'request': {
            'url': '%s://%s%s' % (web.ctx['protocol'], web.ctx['host'], web.ctx['path']),
            'query_string': web.ctx.query,
            'method': web.ctx.method,
            'data': web.data(),
            'headers': dict(get_headers(web.ctx.environ)),
            'env': dict(get_environ(web.ctx.environ)),
        }
    }

Directory Contents

Dirs: 1 × Files: 2

Name Size Perms Modified Actions
- drwxr-xr-x 2024-03-03 23:10:23
Edit Download
742 B lrw-r--r-- 2017-10-29 17:41:19
Edit Download
2.10 KB lrw-r--r-- 2017-10-29 17:41:19
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).