[wsgi] Delete unused instance_uri and get_full_path methods on CubicWebWsgiRequest
authorJulien Cristau <julien.cristau@logilab.fr>
Tue, 06 May 2014 15:58:20 +0200
changeset 9755 566d90bdc565
parent 9741 b6cc9da206df
child 9814 faf0511ac181
[wsgi] Delete unused instance_uri and get_full_path methods on CubicWebWsgiRequest
wsgi/request.py
--- a/wsgi/request.py	Tue May 06 16:00:36 2014 +0200
+++ b/wsgi/request.py	Tue May 06 15:58:20 2014 +0200
@@ -103,29 +103,6 @@
 
     ## wsgi request helpers ###################################################
 
-    def instance_uri(self):
-        """Return the instance's base URI (no PATH_INFO or QUERY_STRING)
-
-        see python2.5's wsgiref.util.instance_uri code
-        """
-        environ = self.environ
-        url = environ['wsgi.url_scheme'] + '://'
-        if environ.get('HTTP_HOST'):
-            url += environ['HTTP_HOST']
-        else:
-            url += environ['SERVER_NAME']
-            if environ['wsgi.url_scheme'] == 'https':
-                if environ['SERVER_PORT'] != '443':
-                    url += ':' + environ['SERVER_PORT']
-            else:
-                if environ['SERVER_PORT'] != '80':
-                    url += ':' + environ['SERVER_PORT']
-        url += quote(environ.get('SCRIPT_NAME') or '/')
-        return url
-
-    def get_full_path(self):
-        return '%s%s' % (self.path, self.environ.get('QUERY_STRING', '') and ('?' + self.environ.get('QUERY_STRING', '')) or '')
-
     def is_secure(self):
         return self.environ['wsgi.url_scheme'] == 'https'