Add support for 'http-reponse-headers' attribute to add custom response headers

This commit is contained in:
Mike Primm 2011-08-30 10:33:41 +08:00 committed by mikeprimm
parent d1ff472bda
commit f371cff011
4 changed files with 33 additions and 0 deletions

View file

@ -111,6 +111,12 @@ public class HttpServerConnection extends Thread {
out.append(field.getValue());
out.append("\r\n");
}
for(Entry<String, String> custom : HttpServer.getCustomHeaders().entrySet()) {
out.append(custom.getKey());
out.append(": ");
out.append(custom.getValue());
out.append("\r\n");
}
out.append("\r\n");
out.flush();
}