2017-04-18 07:52:04 +08:00
|
|
|
## HttpRequest.ContentEncoding property prohibits UTF7
|
2017-04-06 04:52:19 +08:00
|
|
|
|
|
|
|
### Scope
|
|
|
|
Edge
|
|
|
|
|
|
|
|
### Version Introduced
|
|
|
|
4.5
|
|
|
|
|
|
|
|
### Source Analyzer Status
|
|
|
|
Available
|
|
|
|
|
|
|
|
### Change Description
|
2017-04-21 02:19:05 +08:00
|
|
|
|
|
|
|
Beginning in .NET Framework 4.5, UTF-7 encoding is prohibited in
|
|
|
|
<xref:System.Web.HttpRequest?displayProperty=name>s'
|
|
|
|
bodies. Data for applications that depend on incoming UTF-7 data will not decode
|
|
|
|
properly in some cases.
|
2017-04-06 04:52:19 +08:00
|
|
|
|
|
|
|
- [ ] Quirked
|
|
|
|
- [ ] Build-time break
|
|
|
|
|
|
|
|
### Recommended Action
|
2017-04-21 02:19:05 +08:00
|
|
|
|
|
|
|
Ideally, applications should be updated to not use UTF-7 encoding in
|
|
|
|
<xref:System.Web.HttpRequest?displayProperty=name>s. Alternatively, legacy
|
|
|
|
behavior can be restored by using the `aspnet:AllowUtf7RequestContentEncoding`
|
|
|
|
attribute of the
|
2018-02-21 02:29:52 +08:00
|
|
|
[appSettings](https://msdn.microsoft.com/library/hh975440(v=vs.110).aspx)
|
2017-04-21 02:19:05 +08:00
|
|
|
element.
|
2017-04-06 04:52:19 +08:00
|
|
|
|
|
|
|
### Affected APIs
|
|
|
|
* `P:System.Web.HttpRequest.ContentEncoding`
|
|
|
|
|
|
|
|
### Category
|
|
|
|
ASP.NET
|
|
|
|
|
2017-04-18 07:52:04 +08:00
|
|
|
<!-- breaking change id: 43 -->
|