@@ -157,8 +157,8 @@ public fun renderSetCookieHeader(
157
157
158
158
cookiePartFlag(" Secure" , secure),
159
159
cookiePartFlag(" HttpOnly" , httpOnly)
160
- ) + extensions.map { cookiePartExt(it.key.assertCookieName(), it.value, encoding ) } +
161
- if (includeEncoding) cookiePartExt(" \$ x-enc" , encoding.name, CookieEncoding . RAW ) else " "
160
+ ) + extensions.map { cookiePartExt(it.key.assertCookieName(), it.value) } +
161
+ if (includeEncoding) cookiePartExt(" \$ x-enc" , encoding.name) else " "
162
162
).filter { it.isNotEmpty() }
163
163
.joinToString(" ; " )
164
164
@@ -221,7 +221,7 @@ private inline fun cookiePartFlag(name: String, value: Boolean) =
221
221
if (value) name else " "
222
222
223
223
@Suppress(" NOTHING_TO_INLINE" )
224
- private inline fun cookiePartExt (name : String , value : String? , encoding : CookieEncoding ) =
225
- if (value == null ) cookiePartFlag(name, true ) else cookiePart(name, value, encoding )
224
+ private inline fun cookiePartExt (name : String , value : String? ) =
225
+ if (value == null ) cookiePartFlag(name, true ) else cookiePart(name, value, CookieEncoding . RAW )
226
226
227
227
private fun String.toIntClamping (): Int = toLong().coerceIn(0L , Int .MAX_VALUE .toLong()).toInt()
0 commit comments