Leif Hedstrom created TS-2693:
---------------------------------
Summary: 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
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)