You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "Leif Hedstrom (Commented) (JIRA)" <ji...@apache.org> on 2011/12/30 23:58:31 UTC
[jira] [Commented] (TS-1057) Expose internal Base64 Encoding /
Decoding
[ https://issues.apache.org/jira/browse/TS-1057?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13177808#comment-13177808 ]
Leif Hedstrom commented on TS-1057:
-----------------------------------
I'm looking at this, and I'm wondering if we should only use (and support) Base64 encode/decoding into a provided buffer? That avoids the ats_malloc() that gets called. Also, the ink_base64_decode() used for the decode is not reentrant (this is real bad!).
So my suggestions is that we'll have to clean up all the ink_base64() code, and add appropriate API for the encoding part. We'll only support encoding / decoding into provided buffers, and all will be reentrant. I've started this, but realized there was a significant amount of legacy code, and changes to make, so wanted to ask if this seems like a reasonable way to go?
The change would then be for the APIs to be e.g.
tsapi size_t TSBase64Decode(const char *src, size length, unsigned char *dst, size_t dst_size);
Thoughts?
> Expose internal Base64 Encoding / Decoding
> ------------------------------------------
>
> Key: TS-1057
> URL: https://issues.apache.org/jira/browse/TS-1057
> Project: Traffic Server
> Issue Type: Bug
> Components: TS API
> Affects Versions: 3.1.1
> Reporter: Yakov Kopel
> Assignee: Leif Hedstrom
> Priority: Minor
> Labels: patch
> Fix For: 3.1.2
>
> Attachments: patch.diff
>
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> Expose internal Base64 Encoding / Decoding for using in the plugins.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira