figuring out, what is wrong with maven-built jar
This commit is contained in:
2
pom.xml
2
pom.xml
@@ -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.17</version>
|
<version>0.11.18</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>
|
||||||
|
|||||||
@@ -207,8 +207,11 @@ public class Application extends BaseClass{
|
|||||||
LOG.debug("requesting file: {}",file);
|
LOG.debug("requesting file: {}",file);
|
||||||
if (file.exists()) {
|
if (file.exists()) {
|
||||||
LOG.debug("found...");
|
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());
|
client.sendResponseHeaders(200, file.length());
|
||||||
|
LOG.debug("Length: {}",file.length());
|
||||||
OutputStream out = client.getResponseBody();
|
OutputStream out = client.getResponseBody();
|
||||||
FileInputStream in = new FileInputStream(file);
|
FileInputStream in = new FileInputStream(file);
|
||||||
in.transferTo(out);
|
in.transferTo(out);
|
||||||
|
|||||||
Reference in New Issue
Block a user