Skip to content

Commit

Permalink
Fix format management
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaudroques committed Dec 10, 2015
1 parent f348627 commit e7ed068
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/main/java/net/sourceforge/plantuml/servlet/ProxyServlet.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@
@SuppressWarnings("serial")
public class ProxyServlet extends HttpServlet {

private String format;

@Override
public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {

Expand All @@ -73,10 +71,6 @@ public void doGet(HttpServletRequest request, HttpServletResponse response) thro
return;
}

if (fmt != "") {
format = fmt;
}

// generate the response
String diagmarkup = getSource(srcUrl);
SourceStringReader reader = new SourceStringReader(diagmarkup);
Expand All @@ -89,7 +83,7 @@ public void doGet(HttpServletRequest request, HttpServletResponse response) thro
//System.out.println("uml=" + uml);

// generate the response
DiagramResponse dr = new DiagramResponse(response, getOutputFormat());
DiagramResponse dr = new DiagramResponse(response, getOutputFormat(fmt));
try {
dr.sendDiagram(uml);
} catch (IIOException iioe) {
Expand Down Expand Up @@ -121,7 +115,7 @@ private String getSource(final URL url) throws IOException {
return "";
}

private FileFormat getOutputFormat() {
private FileFormat getOutputFormat(String format) {
if (format == null) {
return FileFormat.PNG;
}
Expand Down

0 comments on commit e7ed068

Please sign in to comment.