figuring out, what is wrong with maven-built jar

This commit is contained in:
Stephan Richter
2020-11-13 18:43:33 +01:00
parent 7f481974e3
commit f544699f49
2 changed files with 4 additions and 3 deletions

View File

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

View File

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