示例#1
0
 def script_root(self):
     """The root path of the script includling a trailing slash."""
     # noinspection PyUnresolvedReferences
     path = wsgi_decoding_dance(
         self.environ.get('SCRIPT_NAME') or '', self.charset,
         self.encoding_errors)
     return path.rstrip('/') + '/'
示例#2
0
文件: wrappers.py 项目: 0x00xw/wooyun
 def path(self):
     """Requested path as unicode.  This works a bit like the regular path
     info in the WSGI environment but will not include a leading slash.
     """
     path = wsgi_decoding_dance(self.environ.get('PATH_INFO') or '',
                                self.charset, self.encoding_errors)
     return path.lstrip('/')
示例#3
0
 def path(self):
     """Requested path as unicode.  This works a bit like the regular path
     info in the WSGI environment but will not include a leading slash.
     """
     path = wsgi_decoding_dance(
         self.environ.get('PATH_INFO') or '', self.charset,
         self.encoding_errors)
     return path.lstrip('/')
示例#4
0
 def path(self):
     """Requested path as unicode.  This works a bit like the regular path
     info in the WSGI environment but will always include a leading slash,
     even if the URL root is accessed.
     """
     raw_path = wsgi_decoding_dance(
         self.environ.get('PATH_INFO') or '', self.charset,
         self.encoding_errors)
     return '/' + raw_path.lstrip('/')
示例#5
0
 def script_root(self):
     """The root path of the script includling a trailing slash."""
     warnings.warn(
         "'werkzeug.contrib.wrappers.ReverseSlashBehaviorRequestMixin'"
         " is deprecated as of version 0.15 and will be removed in"
         " version 1.0.",
         DeprecationWarning,
         stacklevel=2,
     )
     path = wsgi_decoding_dance(self.environ.get('SCRIPT_NAME') or '',
                                self.charset, self.encoding_errors)
     return path.rstrip('/') + '/'
示例#6
0
 def script_root(self):
     """The root path of the script includling a trailing slash."""
     warnings.warn(
         "'werkzeug.contrib.wrappers.ReverseSlashBehaviorRequestMixin'"
         " is deprecated as of version 0.15 and will be removed in"
         " version 1.0.",
         DeprecationWarning,
         stacklevel=2,
     )
     path = wsgi_decoding_dance(
         self.environ.get('SCRIPT_NAME') or '', self.charset,
         self.encoding_errors)
     return path.rstrip('/') + '/'
示例#7
0
 def path(self):
     """Requested path as unicode.  This works a bit like the regular path
     info in the WSGI environment but will not include a leading slash.
     """
     warnings.warn(
         "'werkzeug.contrib.wrappers.ReverseSlashBehaviorRequestMixin'"
         " is deprecated as of version 0.15 and will be removed in"
         " version 1.0.",
         DeprecationWarning,
         stacklevel=2,
     )
     path = wsgi_decoding_dance(self.environ.get('PATH_INFO') or '',
                                self.charset, self.encoding_errors)
     return path.lstrip('/')
示例#8
0
 def path(self):
     """Requested path as unicode.  This works a bit like the regular path
     info in the WSGI environment but will not include a leading slash.
     """
     warnings.warn(
         "'werkzeug.contrib.wrappers.ReverseSlashBehaviorRequestMixin'"
         " is deprecated as of version 0.15 and will be removed in"
         " version 1.0.",
         DeprecationWarning,
         stacklevel=2,
     )
     path = wsgi_decoding_dance(
         self.environ.get('PATH_INFO') or '', self.charset,
         self.encoding_errors)
     return path.lstrip('/')
示例#9
0
文件: wrappers.py 项目: 0x00xw/wooyun
 def script_root(self):
     """The root path of the script includling a trailing slash."""
     path = wsgi_decoding_dance(self.environ.get('SCRIPT_NAME') or '',
                                self.charset, self.encoding_errors)
     return path.rstrip('/') + '/'
示例#10
0
 def _get_wsgi_string(name):
     val = environ.get(name)
     if val is not None:
         return wsgi_decoding_dance(val, "utf-8")
示例#11
0
 def _get_wsgi_string(name):
     val = environ.get(name)
     if val is not None:
         return wsgi_decoding_dance(val, "utf-8")
示例#12
0
 def _get_wsgi_string(name):
     val = environ.get(name)
     if val is not None:
         return wsgi_decoding_dance(val, self.charset)
示例#13
0
 def script_root(self):
     """The root path of the script without the trailing slash."""
     raw_path = wsgi_decoding_dance(
         self.environ.get('SCRIPT_NAME') or '', self.charset,
         self.encoding_errors)
     return raw_path.rstrip('/')
示例#14
0
 def script_root(self):
     """The root path of the script includling a trailing slash."""
     path = wsgi_decoding_dance(
         self.environ.get("SCRIPT_NAME") or "", self.charset,
         self.encoding_errors)
     return path.rstrip("/") + "/"