MCPcopy Index your code
hub / github.com/sqlmapproject/sqlmap / mountpoint_wrapper

Method mountpoint_wrapper

thirdparty/bottle/bottle.py:704–728  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

702 path_depth = len(segments)
703
704 def mountpoint_wrapper():
705 try:
706 request.path_shift(path_depth)
707 rs = HTTPResponse([])
708
709 def start_response(status, headerlist, exc_info=None):
710 if exc_info:
711 _raise(*exc_info)
712 if py3k:
713 # Errors here mean that the mounted WSGI app did not
714 # follow PEP-3333 (which requires latin1) or used a
715 # pre-encoding other than utf8 :/
716 status = status.encode('latin1').decode('utf8')
717 headerlist = [(k, v.encode('latin1').decode('utf8'))
718 for (k, v) in headerlist]
719 rs.status = status
720 for name, value in headerlist:
721 rs.add_header(name, value)
722 return rs.body.append
723
724 body = app(request.environ, start_response)
725 rs.body = itertools.chain(rs.body, body) if rs.body else body
726 return rs
727 finally:
728 request.path_shift(-path_depth)
729
730 options.setdefault('skip', True)
731 options.setdefault('method', 'PROXY')

Callers

nothing calls this directly

Calls 2

path_shiftMethod · 0.80
HTTPResponseClass · 0.70

Tested by

no test coverage detected