diff options
author | tim-zh <tim.zhlobich@gmail.com> | 2016-11-13 22:20:06 +0300 |
---|---|---|
committer | tim-zh <tim.zhlobich@gmail.com> | 2016-11-13 22:20:06 +0300 |
commit | 2ef3cc9b722da0d0b61966871ba0a0b24e0d7739 (patch) | |
tree | 2be94eca584894c9ee4066923d86cb971541d079 /tools/gui/src/JettyServer.scala | |
parent | fd849d293448d55c6bcb6f8440f44838b51fc860 (diff) | |
download | cbt-2ef3cc9b722da0d0b61966871ba0a0b24e0d7739.tar.gz cbt-2ef3cc9b722da0d0b61966871ba0a0b24e0d7739.tar.bz2 cbt-2ef3cc9b722da0d0b61966871ba0a0b24e0d7739.zip |
example browser
Diffstat (limited to 'tools/gui/src/JettyServer.scala')
-rw-r--r-- | tools/gui/src/JettyServer.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/gui/src/JettyServer.scala b/tools/gui/src/JettyServer.scala index d6024c2..a64c6bc 100644 --- a/tools/gui/src/JettyServer.scala +++ b/tools/gui/src/JettyServer.scala @@ -27,7 +27,7 @@ abstract class JettyServer(port: Int, staticFilesUrl: String) { response.setContentType("application/json") response.setCharacterEncoding("UTF-8") - route(request.getMethod, target, request.getParameter) match { + route(request.getMethod, target, request.getParameter, response.setContentType) match { case Success(result) => response.getWriter.write(result) case Failure(e: MalformedURLException) => @@ -63,5 +63,5 @@ abstract class JettyServer(port: Int, staticFilesUrl: String) { println("UI server stopped.") } - def route(method: String, path: String, param: String => String): Try[String] + def route(method: String, path: String, param: String => String, setContentType: String => Unit): Try[String] } |