The rest dispatcher fails to set the content type to "text/plain" when 
reporting back an error message
------------------------------------------------------------------------------------------------------

                 Key: GEOS-4341
                 URL: http://jira.codehaus.org/browse/GEOS-4341
             Project: GeoServer
          Issue Type: Bug
            Reporter: Andrea Aime
            Assignee: Andrea Aime
             Fix For: 2.1-RC2


Since the error message representation is sent back as plain text the content 
type should be set accordingly.

The patch is simply:

{code}
--- a/src/rest/src/main/java/org/geoserver/rest/RESTDispatcher.java
+++ b/src/rest/src/main/java/org/geoserver/rest/RESTDispatcher.java
@@ -91,6 +91,7 @@ public class RESTDispatcher extends AbstractController {
                 String reStr = re.getRepresentation().getText();
                 if ( reStr != null ) {
                     LOG.severe( reStr );
+                    resp.setContentType("text/plain");
                     resp.getOutputStream().write(reStr.getBytes());    
                 }
{code}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to