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