You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@kyuubi.apache.org by "cxzl25 (via GitHub)" <gi...@apache.org> on 2023/06/23 07:41:23 UTC

[GitHub] [kyuubi] cxzl25 commented on a diff in pull request #4983: [Improvement] [UI] Add query string to forward requests to Engine UI

cxzl25 commented on code in PR #4983:
URL: https://github.com/apache/kyuubi/pull/4983#discussion_r1239481609


##########
kyuubi-server/src/main/scala/org/apache/kyuubi/server/api/EngineUIProxyServlet.scala:
##########
@@ -62,4 +64,16 @@ private[api] class EngineUIProxyServlet extends ProxyServlet with Logging {
       case r(host, port) => Some(host -> port.toInt)
       case _ => None
     }
+
+  def getQueryString(request: HttpServletRequest): String = {
+    val result = new StringBuilder()
+    val queryString = request.getQueryString()
+    if (queryString != null && queryString.length() > 0) {
+      info(queryString)
+      result.append("?")
+      result.append(queryString)
+    }
+    result.toString()
+  }
+
 }

Review Comment:
   ```suggestion
     def getQueryString(request: HttpServletRequest): String = {
       val queryString = request.getQueryString
       if (StringUtils.isNotEmpty(queryString)) {
         s"?$queryString"
       } else {
         ""
       }
     }
   }
   ```



-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org