[
https://issues.apache.org/jira/browse/TS-5025?focusedWorklogId=31403&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-31403
]
ASF GitHub Bot logged work on TS-5025:
--------------------------------------
Author: ASF GitHub Bot
Created on: 01/Nov/16 20:19
Start Date: 01/Nov/16 20:19
Worklog Time Spent: 10m
Work Description: Github user SolidWallOfCode commented on a diff in the
pull request:
https://github.com/apache/trafficserver/pull/1167#discussion_r86015275
--- 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 --
Yes it should.
Issue Time Tracking
-------------------
Worklog Id: (was: 31403)
Time Spent: 50m (was: 40m)
> 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: 50m
> 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)