You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 29, 2022. It is now read-only.
if (int.TryParse(contentLength, out var length) && Body.Length != length)
{
do
{
length = stream.Read(bytes, 0, MAX_SIZE - 1);
Body += Encoding.UTF8.GetString(bytes, 0, length);
} while (Body.Length != length);
}
我修改了,分享下:
//Request Body
Body = GetRequestBody(rows);
var contentLength = GetHeader(RequestHeaders.ContentLength);
int length = 0;
int totallen = 0;
if (int.TryParse(contentLength, out totallen) && (Body.Length != totallen))
{
do
{
length = stream.Read(bytes, 0, MAX_SIZE - 1);
Body += Encoding.UTF8.GetString(bytes, 0, length);
} while (Body.Length != totallen);
}
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
这段代中的while循环跳出不来,如果MAX_SIZE很大,则 length始终为0;如果MAX_SIZE很大,则 Body.Length 始终大于 length。
当我用multipart/form-data POST 上传图片时发生
The text was updated successfully, but these errors were encountered: