ajbozarth commented on a change in pull request #188: LIVY-615: Set context 
path using property SERVER_BASE_PATH.
URL: https://github.com/apache/incubator-livy/pull/188#discussion_r309892553
 
 

 ##########
 File path: server/src/main/scala/org/apache/livy/server/WebServer.scala
 ##########
 @@ -81,7 +81,10 @@ class WebServer(livyConf: LivyConf, var host: String, var 
port: Int) extends Log
 
   val context = new ServletContextHandler()
 
-  context.setContextPath("/")
+  private val contextPath = "/" + 
livyConf.get(LivyConf.SERVER_BASE_PATH).stripPrefix("/")
+  require(contextPath.startsWith("/"),
 
 Review comment:
   this `require` will always pass since `/` is always added to `contextPath` 
above, you should remove it.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to