Skip to content

Commit b78660a

Browse files
committed
bug: always set body to "" when null in MockResponse as clients may fail if content-length etc not set
1 parent 1aca90e commit b78660a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/kotlin/no/nav/security/mock/oauth2/http/OAuth2HttpServer.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ class MockWebServerWrapper : OAuth2HttpServer {
8989
.setHeaders(this.headers)
9090
.setResponseCode(this.status)
9191
.let {
92-
if (this.body != null) it.setBody(this.body) else it
92+
if (this.body != null) it.setBody(this.body) else it.setBody("")
9393
}
9494
}
9595
}

0 commit comments

Comments
 (0)