Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

to_xml generated <foo type="binary"> tags not accepted by from_xml

#2966

Converting binary data to XML creates ... tags. Sending the same tag back to rails fails to decode the base64 because the from_xml doesn't acknowledge the type="binary" attribute. It expects a type="binaryBase64" attribute, instead.

The attached patch adds support for a type="binary" with an optional encoding="base64". If the encoding attribute is absent, the data is considered unencoded.

Reported by John Franklin · July 28th, 2009 @ 08:06 PM

State: resolved
Milestone: 3.0.2
Assigned to: José Valim José Valim
Importance: Low

Activity

  1. John Franklin
    John Franklin

    Stupid lighthouse. Let's try this again:

    The tags noted in the bug should be:

    ...

    July 28th, 2009 @ 08:09 PM

  2. John Franklin
    John Franklin

    Grr... (If only there were a preview button next to the "update ticket" button)

    <mydata type="binary" encoding="base64">...</mydata>

    July 28th, 2009 @ 08:11 PM

  3. John Franklin
    John Franklin
    • Tag changed from binary, from_xml, xml to binary, from_xml, patch, xml

    July 28th, 2009 @ 08:24 PM

  4. CancelProfileIsBroken
    CancelProfileIsBroken
    • Tag changed from binary, from_xml, patch, xml to binary, bugmash, from_xml, patch, xml

    August 7th, 2009 @ 02:37 PM

  5. Josh Nichols
    Josh Nichols
    • Tag changed from binary, bugmash, from_xml, patch, xml to binary, bugmash, from_xml, patch, verified, xml

    +1, because without this patch, the attribute gets serialized as 'true'.

    Verified the patch applies and works as intended.

    August 9th, 2009 @ 06:59 PM

  6. Jörg B.
    Jörg B.

    +1 ... tested it aswell

    August 18th, 2009 @ 11:20 AM

  7. Rizwan Reza
    Rizwan Reza
    • State changed from new to verified
    • Tag changed from binary, bugmash, from_xml, patch, verified, xml to binary, from_xml, patch, verified, xml
    • Milestone cleared.

    January 20th, 2010 @ 11:38 AM

  8. Rizwan Reza
    Rizwan Reza

    This applies cleanly to master.

    January 20th, 2010 @ 11:39 AM

  9. Rizwan Reza
    Rizwan Reza
    • Assigned user set to José Valim

    March 26th, 2010 @ 08:48 AM

  10. Repository
    Repository
    • State changed from verified to resolved

    (from [c7cc9583689d63d342983d739ccf5c4e94233a48]) Add support for a type=binary with an optional encoding=base64. If the encoding attribute is absent, the data is considered unencoded. [#2966 to_xml generated <foo type="binary"> tags not accepted by from_xml state:resolved] http://github.com/rails/rails/commit/c7cc9583689d63d342983d739ccf5c...

    March 26th, 2010 @ 02:52 PM

  11. Jeremy Kemper
    Jeremy Kemper
    • Milestone set to 3.0.2
    • Importance changed from to Low

    October 15th, 2010 @ 11:01 PM