Skip to content

Commit f4a811c

Browse files
authored
Fix NumberFormatException in UNIX socket path to hex string (#131)
Fix NumberFormatException in socket path to hex
1 parent 21dbd0e commit f4a811c

File tree

1 file changed

+1
-1
lines changed
  • src/commonMain/kotlin/me/devnatan/yoki/io

1 file changed

+1
-1
lines changed

src/commonMain/kotlin/me/devnatan/yoki/io/Http.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ private fun createUrlBuilder(socketPath: String): URLBuilder = if (isUnixSocket(
7777
URLBuilder(
7878
protocol = URLProtocol.HTTP,
7979
port = DOCKER_SOCKET_PORT,
80-
host = socketPath.substringAfter(UNIX_SOCKET_PREFIX).toInt().toHexString() + ENCODED_HOSTNAME_SUFFIX,
80+
host = socketPath.substringAfter(UNIX_SOCKET_PREFIX).encodeToByteArray().toHexString() + ENCODED_HOSTNAME_SUFFIX,
8181
)
8282
} else {
8383
val url = Url(socketPath)

0 commit comments

Comments
 (0)