예제 #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
 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("/") + "/"