1
0
mirror of https://github.com/octoleo/plantuml-server.git synced 2024-06-01 16:10:47 +00:00

Added support for specifying format to proxy

The proxy servlet only could generate PNG. Should be possible to
proxy the other supported formats too.
This commit is contained in:
Shane McCarron 2015-12-07 09:49:17 -06:00
parent a785860f36
commit d21bb445f8

View File

@ -61,6 +61,7 @@ public class ProxyServlet extends HttpServlet {
@Override
public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {
final String fmt = request.getParameter("format");
final String source = request.getParameter("src");
final String index = request.getParameter("idx");
final URL srcUrl;
@ -72,6 +73,10 @@ public class ProxyServlet extends HttpServlet {
return;
}
if (fmt != "") {
format = fmt;
}
// generate the response
String diagmarkup = getSource(srcUrl);
System.out.println("getSource=>" + diagmarkup);