dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #16401
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 6235: Web api, setting correct http headers for map view
------------------------------------------------------------
revno: 6235
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2012-03-09 17:50:51 +0100
message:
Web api, setting correct http headers for map view
modified:
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/MapController.java
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/MapController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/MapController.java 2012-02-07 16:03:05 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/MapController.java 2012-03-09 16:50:51 +0000
@@ -194,7 +194,8 @@
if ( image != null )
{
- response.setContentType( ContextUtils.CONTENT_TYPE_PNG );
+ ContextUtils.configureResponse( response, ContextUtils.CONTENT_TYPE_PNG, true, "mapview.png", false );
+
ImageIO.write( image, "PNG", response.getOutputStream() );
}
else