OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

odata message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: [OASIS Issue Tracker] Updated: (ODATA-466) Please clarify whether Edm.Binary is really intended to be base16-encoded in accordance with ABNF, or if it should be base64-encoded as with OData V3


     [ http://tools.oasis-open.org/issues/browse/ODATA-466?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ralf Handl updated ODATA-466:
-----------------------------

           Issue Type: Task  (was: Bug)
             Assignee: Ralf Handl
        Fix Version/s: V4.0_CSD02
                           (was: V4.0_WD01)
    Affects Version/s: V4.0_CSD02
                           (was: V4.0_WD01)
          Environment: [Proposed]
             Proposal: No action in 4.0: it is desirable to have only one encoding for binary data in OData.

This is an intentional change to use only one encoding for binary data in OData.

Binary data is used 
- in payloads
- in URLs
- in CSDL documents

In OData 3.0 binary data in payloads is encoded with Base64, and binary data in URLs and CSDL documents is Base16 (HEX) encoded. This makes it e.g. impossible to copy a binary representation from a body and paste it into a URL.

Using Base16 throughout is slightly less compact, but easier to get right, as the odata4j example demonstrates.

> Please clarify whether Edm.Binary is really intended to be base16-encoded in accordance with ABNF, or if it should be base64-encoded as with OData V3
> -----------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: ODATA-466
>                 URL: http://tools.oasis-open.org/issues/browse/ODATA-466
>             Project: OASIS Open Data Protocol (OData) TC
>          Issue Type: Task
>          Components: OData ABNF Construction Rules, OData ATOM Format , OData JSON Format
>    Affects Versions: V4.0_CSD02
>         Environment: [Proposed]
>            Reporter: Evan Ireland
>            Assignee: Ralf Handl
>             Fix For: V4.0_CSD02
>
>
> 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 palyload (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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://tools.oasis-open.org/issues/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]