You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2014/04/10 14:55:20 UTC
[jira] [Commented] (TS-2693) Modify string ownership for
TSRedirectUrlSet()
[ https://issues.apache.org/jira/browse/TS-2693?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13965301#comment-13965301 ]
ASF subversion and git services commented on TS-2693:
-----------------------------------------------------
Commit 6cec1a2092a40ed5794a7b8a65c1e1d63fc228c2 in trafficserver's branch refs/heads/master from [~zwoop]
[ https://git-wip-us.apache.org/repos/asf?p=trafficserver.git;h=6cec1a2 ]
TS-2693 Modify string ownership for TSRedirectUrlSet()
> 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)