حدث
١٧ رمضان، ٩ م - ٢١ رمضان، ١٠ ص
انضم إلى سلسلة الاجتماعات لإنشاء حلول الذكاء الاصطناعي قابلة للتطوير استنادا إلى حالات الاستخدام في العالم الحقيقي مع المطورين والخبراء الآخرين.
تسجيل الآنلم يعد هذا المتصفح مدعومًا.
بادر بالترقية إلى Microsoft Edge للاستفادة من أحدث الميزات والتحديثات الأمنية والدعم الفني.
Property | Value |
---|---|
Rule ID | CA2262 |
Title | Set MaxResponseHeadersLength properly |
Category | Usage |
Fix is breaking or non-breaking | Non-breaking |
Enabled by default in .NET 9 | As suggestion |
The HttpClientHandler.MaxResponseHeadersLength property is set to a value greater than 128.
The HttpClientHandler.MaxResponseHeadersLength property is measured in kilobytes, not bytes. The default maximum length is 64 KB, which should be large enough for a majority of use cases. If you set the property to a value greater than 128 kilobytes, it might be due to a misunderstanding of the units of this property.
If you intended to set a smaller value, update it to the desired value measured in kilobytes.
HttpClientHandler handler = new()
{
// Violation
MaxResponseHeadersLength = 512
// Fix (it is not possible to specify a limit lower than 1 KB)
MaxResponseHeadersLength = 1
};
Dim handler As New HttpClientHandler With {
' Violation
.MaxResponseHeadersLength = 512
' Fix (it is not possible to specify a limit lower than 1 KB)
.MaxResponseHeadersLength = 1
}
It's safe to suppress this warning if the large value is intended.
ملاحظات .NET
.NET هو مشروع مصدر مفتوح. حدد رابطًا لتقديم الملاحظات:
حدث
١٧ رمضان، ٩ م - ٢١ رمضان، ١٠ ص
انضم إلى سلسلة الاجتماعات لإنشاء حلول الذكاء الاصطناعي قابلة للتطوير استنادا إلى حالات الاستخدام في العالم الحقيقي مع المطورين والخبراء الآخرين.
تسجيل الآن