mirror of
https://github.com/square/okhttp.git
synced 2025-11-29 06:23:09 +03:00
Smattering of Kotlin part 2 (#5087)
* Migrate eventListenerFactory to extension function * Inline platformTrustManager * Migrate delimiterOffset to extension functions Also overhaul these and other string-manipulating functions to have default arguments for start/end indices. * Migrate hostHeader and toHeaders to extension functions
This commit is contained in:
committed by
Jesse Wilson
parent
42a41f3857
commit
f2187bb6e3
@@ -79,8 +79,8 @@ class JavaNetCookieJar(private val cookieHandler: CookieHandler) : CookieJar {
|
||||
val limit = header.length
|
||||
var pairEnd: Int
|
||||
while (pos < limit) {
|
||||
pairEnd = delimiterOffset(header, pos, limit, ";,")
|
||||
val equalsSign = delimiterOffset(header, pos, pairEnd, '=')
|
||||
pairEnd = header.delimiterOffset(";,", pos, limit)
|
||||
val equalsSign = header.delimiterOffset('=', pos, pairEnd)
|
||||
val name = header.trimSubstring(pos, equalsSign)
|
||||
if (name.startsWith("$")) {
|
||||
pos = pairEnd + 1
|
||||
|
||||
Reference in New Issue
Block a user