From 13483e044879ea185fe8bab5544ba5c0721b5b48 Mon Sep 17 00:00:00 2001 From: Shalom Ben Zvi Kazaz Date: Fri, 10 Jan 2025 01:46:22 +0200 Subject: [PATCH] decode query and path --- .../digma/intellij/plugin/ui/jcef/ApiProxyResourceHandler.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/org/digma/intellij/plugin/ui/jcef/ApiProxyResourceHandler.kt b/src/main/kotlin/org/digma/intellij/plugin/ui/jcef/ApiProxyResourceHandler.kt index 5de9c6d9d..350a5e362 100644 --- a/src/main/kotlin/org/digma/intellij/plugin/ui/jcef/ApiProxyResourceHandler.kt +++ b/src/main/kotlin/org/digma/intellij/plugin/ui/jcef/ApiProxyResourceHandler.kt @@ -43,7 +43,9 @@ class ApiProxyResourceHandler(val project: Project) : CefResourceHandler { //This method should be tested. //should always be used to build the proxy url when needed, //it should make sure to preserve encoding of path and query. - // see unit test : org.digma.intellij.plugin.ui.jcef.proxy.ApiProxyTests.testUrls + //see unit test : org.digma.intellij.plugin.ui.jcef.proxy.ApiProxyTests.testUrls + //some constructors of URI and URL will encode the path and query, some don't. + //here we make sure to preserve the path and query as they were received from jcef val requestUrl = URI(cefRawRequestUrl).toURL() var apiUrl = apiBaseUrl.toString()