You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "Masakazu Kitajo (JIRA)" <ji...@apache.org> on 2016/04/14 06:23:25 UTC
[jira] [Commented] (TS-4350) Member functions in HTTPHdr should
have const modifiers appropriately
[ https://issues.apache.org/jira/browse/TS-4350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15240563#comment-15240563 ]
Masakazu Kitajo commented on TS-4350:
-------------------------------------
The functions I found:
- HTTPHdr::status_get()
https://github.com/apache/trafficserver/blob/8b59eab4f9febee789000f587e6eb2c97f0b051b/proxy/hdrs/HTTP.h#L1199
- MIMEHdr ::iter_get_first()
https://github.com/apache/trafficserver/blob/8b59eab4f9febee789000f587e6eb2c97f0b051b/proxy/hdrs/MIME.h#L947
This one can't have {{const}} simply because it changes internal state, but it would be great if we could have {{const}} version.
> Member functions in HTTPHdr should have const modifiers appropriately
> ---------------------------------------------------------------------
>
> Key: TS-4350
> URL: https://issues.apache.org/jira/browse/TS-4350
> Project: Traffic Server
> Issue Type: Improvement
> Components: Cleanup
> Reporter: Masakazu Kitajo
>
> Practically, we can't use HTTPHdr and MIMEHdr with {{const}}, because some member function doesn't have {{const}} unreasonably. It leads misunderstanding of API and inappropriate modification.
> We should add {{const}} to the functions.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)