Skip to content

Commit de42013

Browse files
committed
charset and contentType parametrized.
1 parent d8082dc commit de42013

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/main/java/org/wiztools/anyurlhttpserver/AnyUrlHttpServerMain.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,20 @@ public static void main(String[] args) throws Exception {
5656
file = null;
5757
}
5858

59+
String contentType = null;
60+
if(options.has("c")) {
61+
contentType = options.valueOf("c").toString();
62+
}
63+
64+
String charset = null;
65+
if(options.has("r")) {
66+
charset = options.valueOf("r").toString();
67+
}
68+
5969
AnyUrlServlet servlet = new AnyUrlServlet();
6070
servlet.setFile(file);
71+
servlet.setContentType(contentType);
72+
servlet.setCharset(charset);
6173

6274
Server server = new Server(port);
6375
server.setStopAtShutdown(true);

0 commit comments

Comments
 (0)