wsgi/request.py
changeset 9988 623707a0c404
parent 9944 9b3b21b7ff3e
child 9995 c9f1111e0ee8
equal deleted inserted replaced
9987:bf4f5064c7f5 9988:623707a0c404
    79         super(CubicWebWsgiRequest, self).__init__(vreg, https, post,
    79         super(CubicWebWsgiRequest, self).__init__(vreg, https, post,
    80                                                   headers= headers_in)
    80                                                   headers= headers_in)
    81         self.content = environ['wsgi.input']
    81         self.content = environ['wsgi.input']
    82         if files is not None:
    82         if files is not None:
    83             for key, part in files.iteritems():
    83             for key, part in files.iteritems():
    84                 name = None
    84                 self.form[key] = (part.filename, part.file)
    85                 if part.filename is not None:
       
    86                     name = unicode(part.filename, self.encoding)
       
    87                 self.form[key] = (name, part.file)
       
    88 
    85 
    89     def __repr__(self):
    86     def __repr__(self):
    90         # Since this is called as part of error handling, we need to be very
    87         # Since this is called as part of error handling, we need to be very
    91         # robust against potentially malformed input.
    88         # robust against potentially malformed input.
    92         form = pformat(self.form)
    89         form = pformat(self.form)