Ticket #1237: modpython.py.diff

File modpython.py.diff, 1.0 KB (added by junzhang.jn@…, 19 years ago)
  • modpython.py

     
    137137        try:
    138138            request = ModPythonRequest(req)
    139139            response = self.get_response(req.uri, request)
     140
     141            # Apply response middleware
     142            for middleware_method in self._response_middleware:
     143                response = middleware_method(request, response)
     144
     145            # Convert our custom HttpResponse object back into the mod_python req.
     146            populate_apache_request(response, req)
    140147        finally:
    141148            db.db.close()
    142 
    143         # Apply response middleware
    144         for middleware_method in self._response_middleware:
    145             response = middleware_method(request, response)
    146 
    147         # Convert our custom HttpResponse object back into the mod_python req.
    148         populate_apache_request(response, req)
    149149        return 0 # mod_python.apache.OK
    150150
    151151def populate_apache_request(http_response, mod_python_req):
Back to Top