Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
dav4jvm
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Jobs
Commits
Open sidebar
bitfire web engineering
dav4jvm
Commits
2435e09a
Commit
2435e09a
authored
Jun 21, 2017
by
Ricki Hirner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix NPE
parent
f78c1b62
Pipeline
#9215127
passed with stage
in 4 minutes and 16 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
2 deletions
+18
-2
build.gradle
build.gradle
+1
-1
BasicDigestAuthHandler.kt
...ain/java/at/bitfire/dav4android/BasicDigestAuthHandler.kt
+1
-1
BasicDigestAuthHandlerTest.java
...va/at/bitfire/dav4android/BasicDigestAuthHandlerTest.java
+16
-0
No files found.
build.gradle
View file @
2435e09a
...
...
@@ -14,7 +14,6 @@ buildscript {
repositories
{
jcenter
()
mavenCentral
()
}
apply
plugin:
'com.android.library'
...
...
@@ -48,6 +47,7 @@ android {
dependencies
{
compile
"org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
compile
'com.android.support:support-annotations:26.+'
compile
'com.squareup.okhttp3:okhttp:3.8.1'
...
...
src/main/java/at/bitfire/dav4android/BasicDigestAuthHandler.kt
View file @
2435e09a
...
...
@@ -279,7 +279,7 @@ class BasicDigestAuthHandler(
}
override
fun
authenticate
(
route
:
Route
,
response
:
Response
)
=
override
fun
authenticate
(
route
:
Route
?
,
response
:
Response
)
=
authenticateRequest
(
response
.
request
(),
response
)
override
fun
intercept
(
chain
:
Interceptor
.
Chain
):
Response
{
...
...
src/test/java/at/bitfire/dav4android/BasicDigestAuthHandlerTest.java
View file @
2435e09a
...
...
@@ -258,4 +258,20 @@ public class BasicDigestAuthHandlerTest {
assertNotNull
(
authenticator
.
digestRequest
(
original
,
authScheme
));
}
@Test
public
void
testAuthenticateNull
()
{
BasicDigestAuthHandler
authenticator
=
new
BasicDigestAuthHandler
(
null
,
"demo"
,
"demo"
);
// must not crash (route may be null)
Request
request
=
new
Request
.
Builder
()
.
get
()
.
url
(
"http://example.com"
)
.
build
();
Response
response
=
new
Response
.
Builder
()
.
request
(
request
)
.
protocol
(
Protocol
.
HTTP_2
)
.
code
(
200
).
message
(
"OK"
)
.
build
();
authenticator
.
authenticate
(
null
,
response
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment