figuring out, what is wrong with maven-built jar

This commit is contained in:
Stephan Richter
2020-11-13 18:40:48 +01:00
parent 56d19ddcf1
commit 7f481974e3
2 changed files with 5 additions and 2 deletions

View File

@@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>de.srsoftware</groupId>
<artifactId>web4rail</artifactId>
<version>0.11.17</version>
<version>0.11.18</version>
<name>Web4Rail</name>
<packaging>jar</packaging>
<description>Java Model Railway Control</description>

View File

@@ -207,8 +207,11 @@ public class Application extends BaseClass{
LOG.debug("requesting file: {}",file);
if (file.exists()) {
LOG.debug("found...");
client.getResponseHeaders().add("Content-Type", Files.probeContentType(file.toPath()));
String ct = Files.probeContentType(file.toPath());
client.getResponseHeaders().add("Content-Type", ct);
LOG.debug("Content-Type: {}",ct);
client.sendResponseHeaders(200, file.length());
LOG.debug("Length: {}",file.length());
OutputStream out = client.getResponseBody();
FileInputStream in = new FileInputStream(file);
in.transferTo(out);