[
https://issues.apache.org/jira/browse/TS-236?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Manjesh Nilange updated TS-236:
-------------------------------
Affects Version/s: 2.0.0a
Fix Version/s: (was: 2.0.0a)
2.0.0
> url copy function should duplicate host fields
> ----------------------------------------------
>
> Key: TS-236
> URL: https://issues.apache.org/jira/browse/TS-236
> Project: Traffic Server
> Issue Type: Bug
> Components: Core
> Affects Versions: 2.0.0a
> Reporter: Manjesh Nilange
> Assignee: Leif Hedstrom
> Priority: Minor
> Fix For: 2.0.0
>
> Attachments: host_copy.patch
>
>
> The change for https://issues.apache.org/jira/browse/TS-185 makes sure that
> url_host_set() doesn't free/reallocate new memory on every call, but
> optimally grows the buffer. The old approach used to work as a copy-on-write
> mechanism when a URL object was cloned. A url_host_set() on either object
> decoupled the the host pointers from both objects pointing to the same
> location. The new approach however does not free/reallocate on every
> url_host_set() and there is a chance that upon cloning (which url_copy_onto()
> does) that both objects' host pointers will continue to point to the same
> location. To fix this, url_copy_onto() should duplicate the host string.
> Also from TS-185, the addition of m_capacity_host has to be changed. The new
> member should be added towards the end of the class as this affects
> unmarshalling new classes from old cache files.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.