Открыть боковую панель
Aurora OS
Kotlin Multiplatform
Libraries
ktor
Коммиты
d300441c
Не подтверждена
Коммит
d300441c
создал
Сен 08, 2022
по автору
Leonid Stashevsky
Зафиксировано автором
GitHub
Сен 08, 2022
Просмотр файлов
KTOR-4834 Fix startup message on Windows (#3157)
* KTOR-4834 Fix startup message on Windows
владелец
3b31017b
Изменения
6
Скрыть пробелы
Построчно
Рядом
ktor-client/ktor-client-core/common/test/CookiesTest.kt
Просмотр файла @
d300441c
...
...
@@ -43,7 +43,7 @@ class CookiesTest {
}
@Test
fun
testCookiesAreRenderedWithSpaceInBetween
()
=
testSuspend
{
fun
testCookiesAreRenderedWithSpaceInBetween
()
=
testSuspend
{
var
storage
=
AcceptAllCookiesStorage
()
storage
.
addCookie
(
"http://localhost/"
,
Cookie
(
"name1"
,
"value1"
))
storage
.
addCookie
(
"http://localhost/"
,
Cookie
(
"name2"
,
"value2"
))
...
...
ktor-client/ktor-client-plugins/ktor-client-content-negotiation/common/test/io/ktor/client/plugins/ContentNegotiationTests.kt
Просмотр файла @
d300441c
...
...
@@ -402,8 +402,6 @@ class ContentNegotiationTests {
}
}
object
Thing
data class
StringWrapper
(
val
value
:
String
)
...
...
ktor-server/ktor-server-host-common/jvm/src/io/ktor/server/engine/internal/EngineUtilsJvm.kt
0 → 100644
Просмотр файла @
d300441c
/*
* Copyright 2014-2022 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
*/
package
io.ktor.server.engine.internal
private
val
OS_NAME
=
System
.
getProperty
(
"os.name"
,
""
)
.
lowercase
()
internal
actual
fun
escapeHostname
(
value
:
String
):
String
{
if
(!
OS_NAME
.
contains
(
"windows"
))
return
value
if
(
value
!=
"0.0.0.0"
)
return
value
return
"127.0.0.1"
}
ktor-server/ktor-server-host-common/jvmAndNix/src/io/ktor/server/engine/BaseApplicationEngine.kt
Просмотр файла @
d300441c
...
...
@@ -72,8 +72,9 @@ public abstract class BaseApplicationEngine(
val
log
=
environment
.
log
CoroutineScope
(
environment
.
application
.
coroutineContext
).
launch
{
connectors
.
await
().
forEach
{
val
host
=
escapeHostname
(
it
.
host
)
log
.
info
(
"Responding at ${it.type.name.lowercase()}://$
{it.
host
}
:${it.port}"
"Responding at ${it.type.name.lowercase()}://$host:${it.port}"
)
}
}
...
...
ktor-server/ktor-server-host-common/jvmAndNix/src/io/ktor/server/engine/internal/EngineUtils.kt
0 → 100644
Просмотр файла @
d300441c
/*
* Copyright 2014-2022 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
*/
package
io.ktor.server.engine.internal
internal
expect
fun
escapeHostname
(
value
:
String
):
String
ktor-server/ktor-server-host-common/nix/src/io/ktor/server/engine/internal/EngineUtilsNix.kt
0 → 100644
Просмотр файла @
d300441c
/*
* Copyright 2014-2022 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
*/
package
io.ktor.server.engine.internal
internal
actual
fun
escapeHostname
(
value
:
String
):
String
=
value
Редактирование
Предварительный просмотр
Поддерживает Markdown
0%
Попробовать снова
или
прикрепить новый файл
.
Отмена
You are about to add
0
people
to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Отмена
Пожалуйста,
зарегистрируйтесь
или
войдите
чтобы прокомментировать