Skip to content

Commit 04e4da7

Browse files
committed
handle case the set of sensitive query param is empty
1 parent 2b3a4ff commit 04e4da7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

okhttp-logging-interceptor/src/main/kotlin/okhttp3/logging/HttpLoggingInterceptor.kt

+3
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,9 @@ class HttpLoggingInterceptor
323323
}
324324

325325
private fun sanitizeUrl(url: HttpUrl): String {
326+
if (queryParamsNameToRedact.isEmpty()) {
327+
return url.toString()
328+
}
326329
val params = ArrayList<Pair<String, String>>()
327330
for (parameterName in url.queryParameterNames) {
328331
params.add(

0 commit comments

Comments
 (0)