Commit 324c4cf6 authored by Ricki Hirner's avatar Ricki Hirner

Use constant

parent 1f48a662
Pipeline #43106089 passed with stages
in 2 minutes and 19 seconds
...@@ -12,7 +12,6 @@ import okio.Buffer ...@@ -12,7 +12,6 @@ import okio.Buffer
import okio.ByteString import okio.ByteString
import java.io.IOException import java.io.IOException
import java.nio.ByteBuffer import java.nio.ByteBuffer
import java.nio.charset.Charset
import java.util.* import java.util.*
import java.util.concurrent.atomic.AtomicInteger import java.util.concurrent.atomic.AtomicInteger
...@@ -120,7 +119,7 @@ class BasicDigestAuthHandler( ...@@ -120,7 +119,7 @@ class BasicDigestAuthHandler(
So, UTF-8 encoding for credentials is compatible with all RFC 7617 servers and many, So, UTF-8 encoding for credentials is compatible with all RFC 7617 servers and many,
but not all pre-RFC 7617 servers. */ but not all pre-RFC 7617 servers. */
return request.newBuilder() return request.newBuilder()
.header(HEADER_AUTHORIZATION, Credentials.basic(username, password, Charset.forName("UTF-8"))) .header(HEADER_AUTHORIZATION, Credentials.basic(username, password, Charsets.UTF_8))
.build() .build()
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment