[
https://issues.apache.org/jira/browse/TS-4724?focusedWorklogId=26749&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-26749
]
ASF GitHub Bot logged work on TS-4724:
--------------------------------------
Author: ASF GitHub Bot
Created on: 22/Aug/16 06:54
Start Date: 22/Aug/16 06:54
Worklog Time Spent: 10m
Work Description: Github user shukitchan commented on a diff in the pull
request:
https://github.com/apache/trafficserver/pull/859#discussion_r75625639
--- Diff: proxy/InkAPI.cc ---
@@ -2208,6 +2208,20 @@ TSUrlPathSet(TSMBuffer bufp, TSMLoc obj, const char
*value, int length)
return URLPartSet(bufp, obj, value, length, &URL::path_set);
}
+void
+TSUrlRemoveHostName(TSMBuffer bufp, TSMLoc obj)
+{
+ sdk_assert(sdk_sanity_check_mbuffer(bufp) == TS_SUCCESS);
+ sdk_assert(sdk_sanity_check_url_handle(obj) == TS_SUCCESS);
+ URL u;
+ Debug("cache_url", "[TSUrlRemoveHostName] Removing host name from url");
--- End diff --
I think "http" should be fine.
Issue Time Tracking
-------------------
Worklog Id: (was: 26749)
Time Spent: 2h 20m (was: 2h 10m)
> Adding/creating new lua API "ts.server_request.remove_host_name_from_url()"
> to remove host name from the GET request send to next tier
> --------------------------------------------------------------------------------------------------------------------------------------
>
> Key: TS-4724
> URL: https://issues.apache.org/jira/browse/TS-4724
> Project: Traffic Server
> Issue Type: Improvement
> Components: Lua
> Reporter: Rajendra Kishore Bonumahanti
> Fix For: 7.0.0
>
> Time Spent: 2h 20m
> Remaining Estimate: 0h
>
> Create a new lua API "ts.server_request.remove_host_name_from_url()" to
> remove host name from the GET request to next tier. This helps to have a
> parent remap.config entry similar to child cache. This makes provisioning
> more meaningful and easy at both parent and child.
> With this fix, the GET request to parent will change..
> from:
> +++++++++ Proxy's Request +++++++++
> -- State Machine Id: 5593
> GET http://origin.com/dir1/a.txt HTTP/1.1^M
> User-Agent: curl/7.29.0^M
> Host: abc.com^M
> Accept: */*^M
> Client-ip: 135.xx.xx.xx^M
> X-Forwarded-For: 135.xx.xx.xx^M
> To:
> +++++++++ Proxy's Request +++++++++
> -- State Machine Id: 5593
> GET /dir1/a.txt HTTP/1.1^M
> User-Agent: curl/7.29.0^M
> Host: abc.com^M
> Accept: */*^M
> Client-ip: 135.xx.xx.xx^M
> X-Forwarded-For: 135.xx.xx.xx^M
> This will enable to have parent and child's remap.config entries as below:
> map http://abc.com http://origin.com @plugin=tslua.so
> @pparam=/opt/trafficserver/etc/trafficserver/lua/test.lua
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)