• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

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


Summary REST always tries to return text/html
ReportedBy TWiki:Main.MichaelDaum
Codebase 4.0.4, ~twiki4
SVN Range Wed, 17 May 2006 build 10226
AppliesTo Engine

Priority Enhancement
CurrentState Closed

Checkins 11319 11320
TargetRelease minor
Edit | Attach | Watch | Print version | History: r7 < r6 < r5 < r4 < r3 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r7 - 2007-01-16 - KennethLavrsen
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2022 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback