mirror of
https://github.com/octoleo/plantuml-server.git
synced 2024-12-31 11:51:48 +00:00
[TASK] Using the "start" keyword in the URL is now deprecated.
This commit is contained in:
parent
76ad7acd21
commit
53fe54e397
@ -69,6 +69,7 @@ public class PlantUmlServlet extends HttpServlet {
|
|||||||
final String uri = request.getRequestURI();
|
final String uri = request.getRequestURI();
|
||||||
Matcher startumlMatcher = startumlPattern.matcher(uri);
|
Matcher startumlMatcher = startumlPattern.matcher(uri);
|
||||||
if (startumlMatcher.matches()) {
|
if (startumlMatcher.matches()) {
|
||||||
|
System.out.println("PlantUML WARNING This syntax is deprecated.");
|
||||||
String source = startumlMatcher.group(1);
|
String source = startumlMatcher.group(1);
|
||||||
handleImage(response, source, uri);
|
handleImage(response, source, uri);
|
||||||
} else {
|
} else {
|
||||||
@ -125,6 +126,7 @@ public class PlantUmlServlet extends HttpServlet {
|
|||||||
return TranscoderUtil.getDefaultTranscoder();
|
return TranscoderUtil.getDefaultTranscoder();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This method will be removed in a near future, please don't use it.
|
||||||
private void handleImage(HttpServletResponse response, String source, String uri) throws IOException {
|
private void handleImage(HttpServletResponse response, String source, String uri) throws IOException {
|
||||||
source = URLDecoder.decode(source, "UTF-8");
|
source = URLDecoder.decode(source, "UTF-8");
|
||||||
StringBuilder plantUmlSource = new StringBuilder();
|
StringBuilder plantUmlSource = new StringBuilder();
|
||||||
@ -138,6 +140,7 @@ public class PlantUmlServlet extends HttpServlet {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This method will be removed in a near future, please don't use it.
|
||||||
private void sendImage(HttpServletResponse response, String text, String uri) throws IOException {
|
private void sendImage(HttpServletResponse response, String text, String uri) throws IOException {
|
||||||
final String uml;
|
final String uml;
|
||||||
if (text.startsWith("@startuml")) {
|
if (text.startsWith("@startuml")) {
|
||||||
|
Loading…
Reference in New Issue
Block a user