[jira] [Comment Edited] (TS-4724) 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

2016-08-09 Thread Rajendra Kishore Bonumahanti (JIRA)

[ 
https://issues.apache.org/jira/browse/TS-4724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15414178#comment-15414178
 ] 

Rajendra Kishore Bonumahanti edited comment on TS-4724 at 8/9/16 8:26 PM:
--

The existing ts_lua API, ts.server_request.set_uri(), will help to modify the 
URI. It does not help to remove the hostname from URL. I tested it. 

ts.server_request.set_uri("/dir2/a.txt") will make the GET request 
(http://abc.com/dir1/a.txt) as below..


+ Proxy's Request +
-- State Machine Id: 5593
GET http://origin.com/dir2/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

I will work on the pull request..



was (Author: rkishore):
The existing ts_lua API, ts.server_request.set_uri(), will help to modify the 
URI. It does not help to remove the hostname from URL. I tested it. 

ts.server_request.set_uri("/dir2/a.txt") will make the GET request 
(http://abc.com/dir1/a.txt)as below..


+ Proxy's Request +
-- State Machine Id: 5593
GET http://origin.com/dir2/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




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


[jira] [Comment Edited] (TS-4724) 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

2016-08-08 Thread Rajendra Kishore Bonumahanti (JIRA)

[ 
https://issues.apache.org/jira/browse/TS-4724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15411891#comment-15411891
 ] 

Rajendra Kishore Bonumahanti edited comment on TS-4724 at 8/8/16 2:41 PM:
--

This TS_LUA plugin enhancement to provide a new API to remove host name from 
GET request. Request Kit to review my proposal and assign it to me. I can 
submit pull request.


was (Author: rkishore):
This TS_LUA plugin enhancement to provide a new API to remove host name from 
GET request. Request Kit review and assign it to me. I can submit pull request.

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