36 from cubicweb.web.http_headers import Headers |
36 from cubicweb.web.http_headers import Headers |
37 |
37 |
38 |
38 |
39 |
39 |
40 class CubicWebWsgiRequest(CubicWebRequestBase): |
40 class CubicWebWsgiRequest(CubicWebRequestBase): |
41 """most of this code COMES FROM DJANO |
41 """most of this code COMES FROM DJANGO |
42 """ |
42 """ |
43 |
43 |
44 def __init__(self, environ, vreg): |
44 def __init__(self, environ, vreg): |
45 self.environ = environ |
45 self.environ = environ |
46 self.path = environ['PATH_INFO'] |
46 self.path = environ['PATH_INFO'] |
47 self.method = environ['REQUEST_METHOD'].upper() |
47 self.method = environ['REQUEST_METHOD'].upper() |
|
48 self.content = environ['wsgi.input'] |
48 |
49 |
49 headers_in = dict((normalize_header(k[5:]), v) for k, v in self.environ.items() |
50 headers_in = dict((normalize_header(k[5:]), v) for k, v in self.environ.items() |
50 if k.startswith('HTTP_')) |
51 if k.startswith('HTTP_')) |
51 https = environ.get("HTTPS") in ('yes', 'on', '1') |
52 https = environ.get("HTTPS") in ('yes', 'on', '1') |
52 post, files = self.get_posted_data() |
53 post, files = self.get_posted_data() |