Application handlers should not write directly to the request

Bug #492481 reported by William Grant
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
IVLE
Fix Released
Medium
William Grant

Bug Description

All output from application handlers is currently written directly to the
request, by the application. This is bad, as it means that neither
exceptions nor transactions can be handled nicely.

We should alter the application specification to be more in line with other
frameworks, in that transaction management is handled by dispatch, and the
handlers should return a string rather than writing to the request object.

An application handler that returns without throwing an exception is
assumed to have completed successfully, and any transaction in progress
should be committed without the application having to explicitly ask for it.

The only issue I can see with this approach is that it will break streaming
in the 'serve' app. As we probably want to retain this ability, we could
provide a special case for it (particularly as it doesn't need the IVLE
header or footer).

Revision history for this message
William Grant (wgrant) wrote :

Almost done, in new-dispatch.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.