Descriptionencoding/asn1: only omit optional elements matching default value.
ASN.1 elements can be optional, and can have a default value.
Traditionally, Go has omitted elements that are optional and that have
the zero value. I believe that's a bug (see [1]).
This change causes an optional element with a default value to only be
omitted when it has that default value. The previous behaviour of
omitting optional, zero elements with no default is retained because
it's used quite a lot and will break things if changed.
[1] https://groups.google.com/d/msg/Golang-nuts/9Ss6o9CW-Yo/KL_V7hFlyOAJ
Fixes issue 7780.
R=bradfitz
Patch Set 1 #Patch Set 2 : diff -r 7021258fb723 https://code.google.com/p/go #Patch Set 3 : diff -r 7021258fb723 https://code.google.com/p/go #
Total comments: 2
Patch Set 4 : diff -r cf71e2f3f8b5 https://code.google.com/p/go #Patch Set 5 : diff -r f0b241ebf35c https://code.google.com/p/go #Patch Set 6 : diff -r f0b241ebf35c https://code.google.com/p/go #
MessagesTotal messages: 9
|