diff --git a/FAWESchematicHost/src/com/kiralycraft/faweschematichost/ConnectionHandler.java b/FAWESchematicHost/src/com/kiralycraft/faweschematichost/ConnectionHandler.java index 6104f6c..27aede5 100644 --- a/FAWESchematicHost/src/com/kiralycraft/faweschematichost/ConnectionHandler.java +++ b/FAWESchematicHost/src/com/kiralycraft/faweschematichost/ConnectionHandler.java @@ -358,7 +358,7 @@ private void writeUploadOK() throws IOException private void writeHeaders(File toSend) throws IOException { os.write(new String("HTTP/1.1 200 OK\r\n").getBytes()); - os.write(new String("Content-Type: image\r\n").getBytes()); + os.write(new String("Content-Type: application/gzip\r\n").getBytes()); os.write(new String("Connection: close\r\n").getBytes()); os.write(new String("Content-Disposition: inline; filename=\""+toSend.getName()+".schematic\"\r\n").getBytes()); os.write(new String("Content-Length: "+toSend.length()+"\r\n").getBytes()); diff --git a/FAWESchematicHost/src/com/kiralycraft/faweschematichost/Main.java b/FAWESchematicHost/src/com/kiralycraft/faweschematichost/Main.java index 31c0001..bf66b84 100644 --- a/FAWESchematicHost/src/com/kiralycraft/faweschematichost/Main.java +++ b/FAWESchematicHost/src/com/kiralycraft/faweschematichost/Main.java @@ -11,7 +11,14 @@ public static void main(String[] args) { theFolder = args[0]; } - HostingServer hs = new HostingServer(25532,new File(theFolder)); + + int port = 25532; + if (args.length >= 2) + { + port = Integer.parseInt(args[1]); + } + + HostingServer hs = new HostingServer(port,new File(theFolder)); hs.start(); }