Mercurial > dive4elements > river
comparison gwt-client/src/main/java/org/dive4elements/river/client/server/ChartOutputServiceImpl.java @ 7486:6b278187ed9d
Removed charset encoding on outs. They are mainly binary data which simply should be proxied through.
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Thu, 31 Oct 2013 19:03:57 +0100 |
parents | fd8b27cdf498 |
children | 238fc722f87a |
comparison
equal
deleted
inserted
replaced
7485:47905b570eaf | 7486:6b278187ed9d |
---|---|
53 String url = getServletContext().getInitParameter("server-url"); | 53 String url = getServletContext().getInitParameter("server-url"); |
54 | 54 |
55 String uuid = req.getParameter("uuid"); | 55 String uuid = req.getParameter("uuid"); |
56 String type = req.getParameter("type"); | 56 String type = req.getParameter("type"); |
57 String locale = req.getParameter("locale"); | 57 String locale = req.getParameter("locale"); |
58 String encoding = req.getParameter("encoding"); | |
59 | 58 |
60 prepareHeader(req, resp); | 59 prepareHeader(req, resp); |
61 | 60 |
62 Document request = ClientProtocolUtils.newOutCollectionDocument( | 61 Document request = ClientProtocolUtils.newOutCollectionDocument( |
63 uuid, type, type, | 62 uuid, type, type, |
64 ChartServiceHelper.getChartAttributes(prepareChartAttributes(req))); | 63 ChartServiceHelper.getChartAttributes(prepareChartAttributes(req))); |
65 | 64 |
66 HttpClient client = new HttpClientImpl(url, locale); | 65 HttpClient client = new HttpClientImpl(url, locale); |
67 | 66 |
68 if (encoding != null) { | |
69 try { | |
70 client.setOutEncoding( | |
71 java.nio.charset.Charset.forName(encoding)); | |
72 } | |
73 catch(java.nio.charset.UnsupportedCharsetException e) { | |
74 logger.warn("Unsupported encoding: " + encoding); | |
75 } | |
76 } | |
77 client.collectionOut(request, uuid, "chart", out); | 67 client.collectionOut(request, uuid, "chart", out); |
78 | 68 |
79 out.close(); | 69 out.close(); |
80 out.flush(); | 70 out.flush(); |
81 } | 71 } |