コード例 #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
ファイル: wrappers.py プロジェクト: syguer/werkzeug
 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
ファイル: wrappers.py プロジェクト: syguer/werkzeug
 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
ファイル: SimpleFrame.py プロジェクト: hb44/uliweb
 def _get_wsgi_string(name):
     val = environ.get(name)
     if val is not None:
         return wsgi_decoding_dance(val, "utf-8")
コード例 #11
0
ファイル: SimpleFrame.py プロジェクト: longhongjun/uliweb
 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
ファイル: wrappers.py プロジェクト: chandshilpa/flaskapi
 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("/") + "/"