# HG changeset patch # User Christophe de Vienne # Date 1405440837 -7200 # Node ID baa0988a60293f3469405765cb3ebe3f883311fb # Parent 04252e9ff549a2baf2461723b64d51f7b3cd6978 Add comments on parts we want to reconsider later Related to #4291173 diff -r 04252e9ff549 -r baa0988a6029 pyramid_cubicweb/handler.py --- a/pyramid_cubicweb/handler.py Tue Jul 15 17:37:50 2014 +0200 +++ b/pyramid_cubicweb/handler.py Tue Jul 15 18:13:57 2014 +0200 @@ -74,6 +74,9 @@ # XXX The validation_error_handler implementation is light, we # should redo it better in cw_to_pyramid, so it can be properly # handled when raised from a cubicweb view. + # BUT the real handling of validation errors should be done + # earlier in the controllers, not here. In the end, the + # ValidationError should never by handled here. content = self.appli.validation_error_handler(req, ex) except cubicweb.web.RemoteCallFailed as ex: # XXX The default pyramid error handler (or one that we provide @@ -84,8 +87,9 @@ if content is not None: request.response.body = content + # XXX CubicWebPyramidRequest.headers_out should + # access directly the pyramid response headers. request.response.headers.clear() - for k, v in req.headers_out.getAllRawHeaders(): for item in v: request.response.headers.add(k, item)