mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-11-24 03:05:28 +01:00
Merge remote branch 'choose_remote_name/master' into HEAD
This commit is contained in:
commit
9b604d4e75
@ -41,8 +41,8 @@ web:
|
||||
showplayerfacesonmap: true
|
||||
showplayerfacesinmenu: true
|
||||
focuschatballoons: false
|
||||
joinmessage: %playername% joined
|
||||
quitmessage: %playername% quit
|
||||
joinmessage: "%playername% joined"
|
||||
quitmessage: "%playername% quit"
|
||||
|
||||
# The clock that is shown alongside the map.
|
||||
clock: timeofday
|
||||
|
@ -7,7 +7,7 @@ import java.util.Map;
|
||||
|
||||
public class HttpResponse {
|
||||
private HttpServerConnection connection;
|
||||
public String version = "1.0";
|
||||
public String version = "1.1";
|
||||
public int statusCode = 200;
|
||||
public String statusMessage = "OK";
|
||||
public Map<String, String> fields = new HashMap<String, String>();
|
||||
|
@ -1,5 +1,6 @@
|
||||
package org.dynmap.web;
|
||||
|
||||
import java.io.BufferedOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
@ -116,9 +117,9 @@ public class HttpServerConnection extends Thread {
|
||||
try {
|
||||
socket.setSoTimeout(5000);
|
||||
InputStream in = socket.getInputStream();
|
||||
OutputStream out = socket.getOutputStream();
|
||||
BufferedOutputStream out = new BufferedOutputStream(socket.getOutputStream(), 40960);
|
||||
|
||||
printOut = new PrintStream(out);
|
||||
printOut = new PrintStream(out, false);
|
||||
while (true) {
|
||||
HttpRequest request = new HttpRequest();
|
||||
|
||||
|
@ -5,12 +5,14 @@ import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.dynmap.web.HttpHandler;
|
||||
import org.dynmap.web.HttpRequest;
|
||||
import org.dynmap.web.HttpResponse;
|
||||
|
||||
public abstract class FileHandler implements HttpHandler {
|
||||
protected static final Logger log = Logger.getLogger("Minecraft");
|
||||
private byte[] readBuffer = new byte[40960];
|
||||
|
||||
private static Map<String, String> mimes = new HashMap<String, String>();
|
||||
@ -73,7 +75,6 @@ public abstract class FileHandler implements HttpHandler {
|
||||
String mimeType = getMimeTypeFromExtension(extension);
|
||||
|
||||
response.fields.put("Content-Type", mimeType);
|
||||
response.fields.put("Connection", "close");
|
||||
OutputStream out = response.getBody();
|
||||
try {
|
||||
int readBytes;
|
||||
|
Loading…
Reference in New Issue
Block a user