[Dive4elements-commits] [PATCH] Explicitly set Content-Type of shapefile upload response message to text/html. See flys/#657

Wald Commits scm-commit at wald.intevation.org
Mon May 27 13:35:29 CEST 2013


# HG changeset patch
# User Christian Lins <christian.lins at intevation.de>
# Date 1369654508 -7200
# Node ID d79bfbe55417b71d9bf84192ea7ba850c5e5bc93
# Parent  7e40264a1363a4e32262113c99cac5766aee4631
Explicitly set Content-Type of shapefile upload response message to text/html. See flys/#657.

diff -r 7e40264a1363 -r d79bfbe55417 artifacts/src/main/java/org/dive4elements/river/artifacts/states/HWSBarriersState.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/HWSBarriersState.java	Sat May 25 21:00:52 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/HWSBarriersState.java	Mon May 27 13:35:08 2013 +0200
@@ -219,7 +219,6 @@
     }
 
     private boolean extractUserShp(File dir) {
-        // TODO Auto-generated method stub
         File archive = new File(dir, USER_RGD_ZIP);
         boolean exists = archive.exists();
         logger.debug("Zip file exists: " + exists);
diff -r 7e40264a1363 -r d79bfbe55417 gwt-client/src/main/java/org/dive4elements/river/client/server/FileUploadServiceImpl.java
--- a/gwt-client/src/main/java/org/dive4elements/river/client/server/FileUploadServiceImpl.java	Sat May 25 21:00:52 2013 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/FileUploadServiceImpl.java	Mon May 27 13:35:08 2013 +0200
@@ -52,9 +52,10 @@
         try {
             Document result = client.callService(url, "fileupload", request);
 
+            resp.setContentType("text/html");
+            
             PrintWriter respWriter = resp.getWriter();
-            respWriter.write("<html><link href='FLYS.css' rel='stylesheet' type='text/css'>");
-            respWriter.write("<body><div style='font-face: Arial,Verdana,sans-serif; font-size: 11px'>");
+            respWriter.write("<html><body><div style='font-face: Arial,Verdana,sans-serif; font-size: 11px'>");
 
             if (result == null) {
                 logger.warn("FileUpload service returned no result.");


More information about the Dive4elements-commits mailing list