[
https://issues.apache.org/jira/browse/TS-1565?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Thach Tran updated TS-1565:
---------------------------
Attachment: 0001-Calling-ink_strlcpy-with-the-correct-arguments-size-.patch
Patch to fix the issue
> TSStringPercentEncode returns one character short in no-op case (no encoding
> needed)
> ------------------------------------------------------------------------------------
>
> Key: TS-1565
> URL: https://issues.apache.org/jira/browse/TS-1565
> Project: Traffic Server
> Issue Type: Bug
> Components: TS API
> Affects Versions: 3.3.3
> Environment: Ubuntu 12.04
> GCC 4.6.3
> Default configuration for Traffic Server
> Reporter: Thach Tran
> Assignee: Leif Hedstrom
> Fix For: 3.3.1
>
> Attachments:
> 0001-Calling-ink_strlcpy-with-the-correct-arguments-size-.patch
>
>
> I noticed this issue while trying to use TSStringPercentEncode function to
> encode some data as part of a url. It returns the correct value when there's
> some characters in the original string to be encoded but if there's no need
> for any escaping (e.g., just an alpha-numeric string), the return value is
> short by one character.
> I have reproduce this (in trunk) by modifying InkAPITest.cc lines 7500-7502
> to contains the test url as follows
> const char *url = "http://www.example.com/foo";
> const char *url_encoded = "http://www.example.com/foo";
> The regression test will then failed with the following
> \[SDK_API_ENCODING\] TSStringPercentEncode : \[TestCase1\] <<FAIL>> { Failed
> on http://www.example.com/fo != http://www.example.com/foo }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira