Browse Source

figuring out, what is wrong with maven-built jar

lookup-tables
Stephan Richter 5 years ago
parent
commit
f544699f49
  1. 2
      pom.xml
  2. 5
      src/main/java/de/srsoftware/web4rail/Application.java

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.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>

5
src/main/java/de/srsoftware/web4rail/Application.java

@ -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);

Loading…
Cancel
Save