-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: V4.0_CSD02
-
Fix Version/s: V4.0_CSD03
-
Component/s: ABNF, ATOM Format, CSDL XML, JSON Format, URL Conventions
-
Labels:None
-
Environment:
[Applying]
-
Proposal:
-
Resolution:
OData V3 encodes Edm.Binary using base64 encoding, as defined by RFC4648.
OData V4 JSON and ATOM specs for encoding of primitive values refer to "binaryValue" in the ABNF.
It this an intentional change for the encoding of binary values in payload (switching from base16 to base64)?
Or have we accidentally (by having URL conventions and ATOM/JSON documents referring to the same binaryValue ABNF rule) changed to base16?
Also, I note that odata4j does base64 encoding including CR/LF, whereas RFC 4648 (referred to by OData V3 spec) states:
Implementations MUST NOT add line feeds to base-encoded data unless
the specification referring to this document explicitly directs base
encoders to add line feeds after a specific number of characters.
My reason for pointing this out is that if we decide to revert OData V4 to using base64-encoding for binary values in payload, then we might consider explicitly mentioning that CR/LF is disallowed in the encoding. Even although that should be apparent if we have a suitable ABNF rule for base64 that doesn't permit CR/LF, we should be clear so that implementors are reminded not to make the same mistake that was made in odata4j.