I want to return text/html and don't run the REST call to
writeCompletePage()
at all.
This can be acomplished by checking if the REST handler acually
returned a result. If you then process it via
writeCompletePage()
.
If not then do nothing.
Here's the patch (again a one-liner):
-- lib/TWiki/UI/Rest.pm (revision 10361)
+++ lib/TWiki/UI/Rest.pm (working copy)
@@ -70,7 +70,7 @@
if (defined($endPoint)) {
$session->redirect($session->getScriptUrl( 1, 'view', '', $endPoint ));
} else {
- $session->writeCompletePage( $result );
+ $session->writeCompletePage( $result ) if $result;
}
} else {
$session->writeCompletePage( 'Unknown Action '.$subject.'/'.$verb);
4.1.0 released
KJL