2017-04-18 07:52:04 +08:00
|
|
|
## ContentDisposition DateTimes returns slightly different string
|
2017-04-06 04:52:19 +08:00
|
|
|
|
|
|
|
### Scope
|
|
|
|
Minor
|
|
|
|
|
|
|
|
### Version Introduced
|
|
|
|
4.6
|
|
|
|
|
|
|
|
### Source Analyzer Status
|
|
|
|
Available
|
|
|
|
|
|
|
|
### Change Description
|
2017-04-21 02:19:05 +08:00
|
|
|
|
|
|
|
String representations of
|
|
|
|
<xref:System.Net.Mime.ContentDisposition?displayProperty=name>'s have been
|
|
|
|
updated, beginning in 4.6, to always represent the hour component of a
|
|
|
|
<xref:System.DateTime?displayProperty=name> with two digits. This is to comply
|
|
|
|
with [RFC822](http://www.ietf.org/rfc/rfc0822.txt) and
|
|
|
|
[RFC2822](http://www.ietf.org/rfc/rfc2822.txt). This causes
|
|
|
|
<xref:System.Net.Mime.ContentDisposition.ToString>
|
|
|
|
to return a slightly different string in 4.6 in scenarios where one of the
|
|
|
|
disposition's time elements was before 10:00 AM. Note that
|
|
|
|
ContentDispositions are sometimes serialized via converting them to strings,
|
|
|
|
so any <xref:System.Net.Mime.ContentDisposition.ToString>
|
|
|
|
operations, serialization, or GetHashCode calls should be reviewed.
|
2017-04-06 04:52:19 +08:00
|
|
|
|
|
|
|
- [ ] Quirked
|
|
|
|
- [ ] Build-time break
|
|
|
|
|
|
|
|
### Recommended Action
|
2017-04-21 02:19:05 +08:00
|
|
|
|
|
|
|
Do not expect that string representations of ContentDispositions from different
|
|
|
|
.NET Framework versions will correctly compare to one another. Convert the
|
|
|
|
strings back to ContentDispositions, if possible, before conducting a
|
|
|
|
comparison.
|
2017-04-06 04:52:19 +08:00
|
|
|
|
|
|
|
### Affected APIs
|
|
|
|
* `M:System.Net.Mime.ContentDisposition.ToString`
|
|
|
|
* `M:System.Net.Mime.ContentDisposition.GetHashCode`
|
|
|
|
|
|
|
|
### Category
|
|
|
|
Networking
|
|
|
|
|
2017-04-18 07:52:04 +08:00
|
|
|
<!-- breaking change id: 78 -->
|