You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@trafficserver.apache.org by "Leif Hedstrom (JIRA)" <ji...@apache.org> on 2010/03/11 02:53:27 UTC

[jira] Resolved: (TS-236) url copy function should duplicate host fields

     [ https://issues.apache.org/jira/browse/TS-236?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Leif Hedstrom resolved TS-236.
------------------------------

    Resolution: Fixed

> 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.