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 (JIRA)" <ji...@apache.org> on 2014/04/02 17:42:16 UTC
[jira] [Updated] (TS-2693) Modify string ownership for
TSRedirectUrlSet()
[ https://issues.apache.org/jira/browse/TS-2693?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Leif Hedstrom updated TS-2693:
------------------------------
Fix Version/s: 5.0.0
Assignee: Leif Hedstrom
> Modify string ownership for TSRedirectUrlSet()
> ----------------------------------------------
>
> Key: TS-2693
> URL: https://issues.apache.org/jira/browse/TS-2693
> Project: Traffic Server
> Issue Type: Improvement
> Components: TS API
> Reporter: Leif Hedstrom
> Assignee: Leif Hedstrom
> Fix For: 5.0.0
>
>
> Right now, the API TSRedirectUrlSet() makes a strdup() of the incoming string. In many cases, this is very undesirable, and does not fit well in how other similar APIs works. Instead, I think TSRedirectUrlSet() should take ownership of the (heap) allocated incoming string.
> This does not change the API itself, but eliminates the malloc / strcpy in the API. A caller of this API is expected to provide a string that is allocated. For example, a string returned from TSUrlStringGet() is the perfect use case where the new API contract works much better.
--
This message was sent by Atlassian JIRA
(v6.2#6252)