Открыть боковую панель
Aurora OS
Kotlin Multiplatform
Libraries
ktor
Коммиты
72d71ccb
Не подтверждена
Коммит
72d71ccb
создал
Окт 18, 2023
по автору
Rustam
Зафиксировано автором
GitHub
Окт 18, 2023
Просмотр файлов
KTOR-6281 Darwin: EOFException when sending multipart data using Ktor (#3782)
владелец
127a0ca2
Изменения
3
Скрыть пробелы
Построчно
Рядом
ktor-client/ktor-client-tests/common/test/io/ktor/client/tests/ContentTest.kt
Просмотр файла @
72d71ccb
...
...
@@ -247,6 +247,26 @@ class ContentTest : ClientLoader(5 * 60) {
}
}
@Test
fun
testLargeFormWithBinaryData
()
=
clientTests
{
val
formData
=
{
formData
{
append
(
key
=
"image"
,
value
=
ByteArray
(
100
*
1024
)
{
0
},
headers
=
Headers
.
build
{
append
(
HttpHeaders
.
ContentType
,
"image/jpeg"
)
append
(
HttpHeaders
.
ContentDisposition
,
"filename=image.jpeg"
)
},
)
}
}
test
{
client
->
client
.
submitFormWithBinaryData
(
"$TEST_SERVER/content/upload"
,
formData
()).
body
<
ByteArray
>()
}
}
@Test
fun
testMultipartWithByteReadChannel
()
=
clientTests
{
test
{
client
->
...
...
ktor-io/posix/src/io/ktor/utils/io/ByteChannelNative.kt
Просмотр файла @
72d71ccb
...
...
@@ -129,7 +129,7 @@ internal class ByteChannelNative(
awaitSuspend
(
1
)
}
if
(
!
readable
.
can
Read
()
)
{
if
(
readable
.
remaining
<
availableFor
Read
)
{
prepareFlushedBytes
()
}
...
...
ktor-server/ktor-server-plugins/ktor-server-compression/jvm/src/io/ktor/server/plugins/compression/Compression.kt
Просмотр файла @
72d71ccb
...
...
@@ -178,7 +178,6 @@ internal val DecompressionListAttribute: AttributeKey<List<String>> = AttributeK
public
val
ApplicationRequest
.
appliedDecoders
:
List
<
String
>
get
()
=
call
.
attributes
.
getOrNull
(
DecompressionListAttribute
)
?:
emptyList
()
private
fun
PipelineResponse
.
isSSEResponse
():
Boolean
{
return
headers
[
HttpHeaders
.
ContentType
]
==
ContentType
.
Text
.
EventStream
.
toString
()
}
Редактирование
Предварительный просмотр
Поддерживает Markdown
0%
Попробовать снова
или
прикрепить новый файл
.
Отмена
You are about to add
0
people
to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Отмена
Пожалуйста,
зарегистрируйтесь
или
войдите
чтобы прокомментировать