[
https://issues.apache.org/jira/browse/TS-5025?focusedWorklogId=31388&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-31388
]
ASF GitHub Bot logged work on TS-5025:
--------------------------------------
Author: ASF GitHub Bot
Created on: 01/Nov/16 16:42
Start Date: 01/Nov/16 16:42
Worklog Time Spent: 10m
Work Description: Github user zwoop commented on a diff in the pull
request:
https://github.com/apache/trafficserver/pull/1167#discussion_r85967946
--- Diff: lib/cppapi/Request.cc ---
@@ -177,6 +177,23 @@ Request::getHeaders() const
return state_->headers_;
}
+void
+Request::setHost(std::string const &host)
+{
+ static std::string HOST_FIELD_NAME(TS_MIME_FIELD_HOST, TS_MIME_LEN_HOST);
--- End diff --
< bike_shed >Shouldn't this be const too?< /bike_shed >
Issue Time Tracking
-------------------
Worklog Id: (was: 31388)
Time Spent: 40m (was: 0.5h)
> CPP API Request object should directly support setting the host.
> ----------------------------------------------------------------
>
> Key: TS-5025
> URL: https://issues.apache.org/jira/browse/TS-5025
> Project: Traffic Server
> Issue Type: Improvement
> Components: CPP API
> Reporter: Alan M. Carroll
> Assignee: Brian Geffon
> Time Spent: 40m
> Remaining Estimate: 0h
>
> Just setting the host in the URL or in the headers can create a malformed
> request. The {{Request}} object itself should support at {{setHost}} method
> that takes care of the details of updating both without adding the host to
> the URL if it's not already present.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)