switched from system to java variable

This commit is contained in:
afischerdev 2024-09-12 12:25:06 +02:00
parent 7ead35e3f8
commit 48d474d34c
3 changed files with 6 additions and 6 deletions

View File

@ -40,7 +40,7 @@ public class ServerHandler extends RequestHandler {
private RoutingContext rc;
private static boolean useOldServerFormat = System.getenv("USEOLDSERVERFORMAT") != null;
private static boolean useRFCMimeType = Boolean.getBoolean("useRFCMimeType");
public ServerHandler(ServiceContext serviceContext, Map<String, String> params) {
super(serviceContext, params);
@ -109,10 +109,10 @@ public class ServerHandler extends RequestHandler {
} else if ("kml".equals(format)) {
result = "application/vnd.google-earth.kml+xml";
} else if ("geojson".equals(format)) {
if (useOldServerFormat)
result = "application/vnd.geo+json";
else
if (useRFCMimeType)
result = "application/geo+json";
else
result = "application/vnd.geo+json";
} else if ("csv".equals(format)) {
result = "text/tab-separated-values";
}

View File

@ -6,7 +6,7 @@ REM java -cp brouter.jar btools.brouter.RouteServer <segmentdir> <profile-map> <
pushd %~dp0
REM maxRunningTime is the request timeout in seconds, set to 0 to disable timeout
set JAVA_OPTS=-Xmx128M -Xms128M -Xmn8M -DmaxRunningTime=300
set JAVA_OPTS=-Xmx128M -Xms128M -Xmn8M -DmaxRunningTime=300 -DuseRFCMimeType=false
REM First search in locations matching the directory structure as found in the official BRouter zip archive
set CLASSPATH=../brouter.jar

View File

@ -5,7 +5,7 @@ cd "$(dirname "$0")"
# java -cp brouter.jar btools.brouter.RouteServer <segmentdir> <profile-map> <customprofiledir> <port> <maxthreads> [bindaddress]
# maxRunningTime is the request timeout in seconds, set to 0 to disable timeout
JAVA_OPTS="-Xmx128M -Xms128M -Xmn8M -DmaxRunningTime=300"
JAVA_OPTS="-Xmx128M -Xms128M -Xmn8M -DmaxRunningTime=300 -DuseRFCMimeType=false"
# If paths are unset, first search in locations matching the directory structure
# as found in the official BRouter zip archive