fix(ci): stabilize oversized body check [CI]
This commit is contained in:
1 parent
9f02a17c85
commit
b9c620304c
3 files changed
+9
-3
No files matched your search
@@ -193,7 +193,7 @@ public class RestTests(ServerFixture s) : IClassFixture<ServerFixture>
|
||||
// 超过 1 MiB 负载上限但小于 Kestrel 的 2 MiB:服务自己拒绝
|
||||
await AssertErrorAsync(await s.AppendAsync(ch, ch.Owner, Frame(NewId(), 0, 1, 1_500_000)), 413, "too_large");
|
||||
// 超过 Kestrel 上限:框架拒绝,仍映射为同一错误码
|
||||
await AssertErrorAsync(await s.AppendAsync(ch, ch.Owner, Frame(NewId(), 0, 1, 3_000_000)), 413, "too_large");
|
||||
await AssertErrorAsync(await s.AppendAsync(ch, ch.Owner, Frame(NewId(), 0, 1, 3_000_000), expectContinue: true), 413, "too_large");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
||||
@@ -129,10 +129,16 @@ public sealed class ServerFixture : IAsyncLifetime, IAsyncDisposable
|
||||
public async Task<HttpResponseMessage> JoinAsync(Chan ch, Who who) =>
|
||||
await Http.SendAsync(Req(HttpMethod.Post, $"/api/v1/channels/{ch.Id}/seats", who));
|
||||
|
||||
public async Task<HttpResponseMessage> AppendAsync(Chan ch, Who who, byte[] frame, string? maxDownloads = null)
|
||||
public async Task<HttpResponseMessage> AppendAsync(
|
||||
Chan ch,
|
||||
Who who,
|
||||
byte[] frame,
|
||||
string? maxDownloads = null,
|
||||
bool expectContinue = false)
|
||||
{
|
||||
var req = Req(HttpMethod.Post, $"/api/v1/channels/{ch.Id}/frames", who, Bytes(frame));
|
||||
if (maxDownloads is not null) req.Headers.Add("X-WD-Max-Downloads", maxDownloads);
|
||||
req.Headers.ExpectContinue = expectContinue;
|
||||
return await Http.SendAsync(req);
|
||||
}
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ summary,
|
||||
|
||||
/* iOS Safari 对小于 16px 的输入框聚焦时会自动放大页面 */
|
||||
@media (pointer: coarse) {
|
||||
input:not([type="checkbox"]):not([type="radio"]),
|
||||
input:not([type="checkbox"], [type="radio"]),
|
||||
textarea,
|
||||
select {
|
||||
font-size: 16px;
|
||||
|
||||
Reference in new issue
Block a user