From 1402a68f3739e7dcdc869fb21648c53de1b31f01 Mon Sep 17 00:00:00 2001 From: Rossen Stoyanchev Date: Fri, 17 Sep 2010 09:07:41 +0000 Subject: [PATCH] SWF-1376 Show error dialog when response is empty and there is no Spring redirect header. --- .../web-resources/spring/Spring-Dojo.js | 24 +++++++++++++++---- .../webapp/WEB-INF/config/webmvc-config.xml | 6 +---- 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/spring-js-resources/src/main/resources/META-INF/web-resources/spring/Spring-Dojo.js b/spring-js-resources/src/main/resources/META-INF/web-resources/spring/Spring-Dojo.js index baabfb34..6cdda3f6 100644 --- a/spring-js-resources/src/main/resources/META-INF/web-resources/spring/Spring-Dojo.js +++ b/spring-js-resources/src/main/resources/META-INF/web-resources/spring/Spring-Dojo.js @@ -280,6 +280,10 @@ dojo.declare("Spring.RemotingHandler", Spring.AbstractRemotingHandler, { } return response; } + } else if ((dojo.string.trim(response).length == 0) && (ioArgs.xhr.status != 204) && (ioArgs.xhr.status != 205)) { + if (Spring.debug) { + Spring.remoting.showError('Received empty response with no Spring redirect headers. If this is intentional set the response status code to 204 or 205.'); + } } //Extract and store all