Skip to content

Commit

Permalink
Fix client cookies remove
Browse files Browse the repository at this point in the history
  • Loading branch information
e5l committed Aug 17, 2020
1 parent e37efd5 commit 7a7de50
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ class HttpCookies(
with(context) {
if (cookies.isNotEmpty()) {
headers[HttpHeaders.Cookie] = renderClientCookies(cookies)
} else {
headers.remove(HttpHeaders.Cookie)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ package io.ktor.tests.auth

import io.ktor.application.*
import io.ktor.auth.*
import io.ktor.client.*
import io.ktor.client.call.*
import io.ktor.client.features.cookies.*
import io.ktor.client.request.*
Expand All @@ -15,7 +14,6 @@ import io.ktor.http.*
import io.ktor.response.*
import io.ktor.routing.*
import io.ktor.server.testing.*
import io.ktor.server.testing.client.*
import io.ktor.sessions.*
import kotlinx.coroutines.*
import kotlin.test.*
Expand All @@ -28,7 +26,7 @@ class SessionAuthTest {
cookie<MySession>("S")
}
application.install(Authentication) {
session<MySession>() {
session<MySession> {
validate { it }
challenge {
call.respond(UnauthorizedResponse())
Expand Down

0 comments on commit 7a7de50

Please sign in to comment.