wsgi/request.py
changeset 9941 8dc1c96d29f1
parent 9940 292f786009ba
child 9942 4b99196102f0
equal deleted inserted replaced
9940:292f786009ba 9941:8dc1c96d29f1
    59 
    59 
    60         headers_in = dict((normalize_header(k[5:]), v) for k, v in self.environ.items()
    60         headers_in = dict((normalize_header(k[5:]), v) for k, v in self.environ.items()
    61                           if k.startswith('HTTP_'))
    61                           if k.startswith('HTTP_'))
    62         if 'CONTENT_TYPE' in environ:
    62         if 'CONTENT_TYPE' in environ:
    63             headers_in['Content-Type'] = environ['CONTENT_TYPE']
    63             headers_in['Content-Type'] = environ['CONTENT_TYPE']
    64         https = environ.get("HTTPS") in ('yes', 'on', '1')
    64         https = environ["wsgi.url_scheme"] == 'https'
       
    65         if self.path.startswith('/https/'):
       
    66             self.path = self.path[6:]
       
    67             self.environ['PATH_INFO'] = self.path
       
    68             https = True
       
    69 
    65         post, files = self.get_posted_data()
    70         post, files = self.get_posted_data()
    66 
    71 
    67         super(CubicWebWsgiRequest, self).__init__(vreg, https, post,
    72         super(CubicWebWsgiRequest, self).__init__(vreg, https, post,
    68                                                   headers= headers_in)
    73                                                   headers= headers_in)
    69         self.content = environ['wsgi.input']
    74         self.content = environ['wsgi.input']