Return-Path: X-Original-To: apmail-trafficserver-users-archive@www.apache.org Delivered-To: apmail-trafficserver-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0ED5B186B1 for ; Fri, 9 Oct 2015 20:00:10 +0000 (UTC) Received: (qmail 19092 invoked by uid 500); 9 Oct 2015 20:00:09 -0000 Delivered-To: apmail-trafficserver-users-archive@trafficserver.apache.org Received: (qmail 19032 invoked by uid 500); 9 Oct 2015 20:00:09 -0000 Mailing-List: contact users-help@trafficserver.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@trafficserver.apache.org Delivered-To: mailing list users@trafficserver.apache.org Received: (qmail 19022 invoked by uid 99); 9 Oct 2015 20:00:09 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Oct 2015 20:00:09 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 509ED1809D2 for ; Fri, 9 Oct 2015 20:00:09 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -11.447 X-Spam-Level: X-Spam-Status: No, score=-11.447 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=3, SPF_NEUTRAL=0.652, URIBL_BLOCKED=0.001, USER_IN_DEF_WHITELIST=-15] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (1024-bit key) header.d=yahoo-inc.com header.b=SofGmTy3; dkim=pass (1024-bit key) header.d=yahoo-inc.com header.b=ULivAMHS Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id qlks-9F1eH12 for ; Fri, 9 Oct 2015 19:59:56 +0000 (UTC) Received: from mrout2-b.corp.bf1.yahoo.com (mrout2-b.corp.bf1.yahoo.com [98.139.253.105]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with ESMTPS id D7920439DD for ; Fri, 9 Oct 2015 19:59:55 +0000 (UTC) Received: from omp1025.mail.ne1.yahoo.com (omp1025.mail.ne1.yahoo.com [98.138.89.169]) by mrout2-b.corp.bf1.yahoo.com (8.14.4/8.14.4/y.out) with ESMTP id t99Jx2up018322 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO) for ; Fri, 9 Oct 2015 12:59:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yahoo-inc.com; s=cobra; t=1444420743; bh=PsDHDwfO+VYMgogC23WV93/55cCw9h0e5/BhvGQPWuA=; h=Date:From:Reply-To:To:Cc:In-Reply-To:References:Subject; b=SofGmTy3BVz3p3HIwZ9/Zz8JF4o51ST6oJPnAGJZmVa5eu869ECZabXNzq+WhYRV4 ar3R69w8QNH3p7FEFSnviIZz3H5oGrCOYkmh7eOCJpCbAFDK3QhUHALEWu4rnA26WB f/ebvY6kuAgPDUyYlTWrv6js8O22Nc4PoH/eUTJQ= Received: (qmail 54308 invoked by uid 1000); 9 Oct 2015 19:59:02 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo-inc.com; s=ginc1024; t=1444420742; bh=JJGz17bA9mh/SUvAhd+gByEwlqMiSGCq1ggdJ1KFYiM=; h=Date:From:Reply-To:To:Cc:Message-ID:In-Reply-To:References:Subject:MIME-Version:Content-Type; b=ULivAMHS71q+mWVMaEuGUovfro1GsuBrnamIR1TBpsvzVO5661pSIB+6KAmLl7zW/aRRGcaHmTkvh47FwxG6+58RKWNqWMtuKCXqF/0eLaaO1c8X+58gJP3MIXnH3JLpd/kMtxGhasu35MN6TrWLg3a9s18/yDzJoLyXVERQ7rs= X-YMail-OSG: IX2KajwVM1k6xDdHVVSjpcQWX5LhWKio4X8hwfbRCFtsqF.0jcHty6kpSCxhFX5 e3u86_.smPTRi5haw70coAjKe3.1Eyo7fRumXsvSpRYnVyAyljjQWIprnwHx5ic.TGJcfnZZok7i uJl20gyfUrfg6GsvsrpbEITBU5GcSB1CeuGxYGRnaf3g7OSdB0rXR5V2ZhtcJ5r_3qfWAFTPVpBn OxqnykZL2caN1raNwH6fYpZYftj0QZ46v_whkpQ-- Received: by 98.138.101.167; Fri, 09 Oct 2015 19:59:01 +0000 Date: Fri, 9 Oct 2015 19:59:01 +0000 (UTC) From: Alan Carroll Reply-To: Alan Carroll To: "users@trafficserver.apache.org" , Sudheer Vinukonda Cc: Jeremy Payne , Scott Beardsley Message-ID: <1936746588.1615583.1444420741448.JavaMail.yahoo@mail.yahoo.com> In-Reply-To: <1889581984.1532341.1444411058768.JavaMail.yahoo@mail.yahoo.com> References: <492764110.339257.1444239695173.JavaMail.yahoo@mail.yahoo.com> <953224170.527101.1444260461947.JavaMail.yahoo@mail.yahoo.com> <30778D2546DCBC44875BF75DC7C72778155B1FF2@MISOUT7MSGUSRCF.ITServices.sbc.com> <1889581984.1532341.1444411058768.JavaMail.yahoo@mail.yahoo.com> Subject: Re: header_rewrite to modify destination port based on request header MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_1615582_648684623.1444420741434" ------=_Part_1615582_648684623.1444420741434 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Yes, I don't see why this would be a problem. =20 On Friday, October 9, 2015 12:19 PM, Sudheer Vinukonda wrote: =20 Hi Daniel, +1 on the proposal.. AFAIK, header_rewrite is by no means deprecated or plan to be deprecated (n= ot in the near future, anyway) and it has a very wide set of production use= rs (including us).=20 Please go ahead and submit a PR on github - unless there are strong concern= s, I can review/merge it. Thanks, Sudheer On Friday, October 9, 2015 9:55 AM, Daniel Morilha wro= te: Hi, after talking a quick look into header_rewrite source code, it looks li= ke it is just a matter of calling "expand" into the function which validate= s and sets the port. If so, would the community be ok with such addition? I= really really would like to avoid the lua plugin only for this. Thanks.=20 On Oct 8, 2015 6:53 AM, "Brian Geffon" wrote: This will likely be discussed next month at the ATS summit in Sunnyvale, CA= (please sign up and join if you can make it, details on the wiki). However= , final discussions regarding things like this always take place on the mai= ling list. > > >Brian > >On Thursday, October 8, 2015, LIN, SHU-CHIH wrote: > >Hi: >>=20 >>Any insight when Lua will be moved from "experimental" to =E2=80=9Cstable= =E2=80=9D? Lua looks to offer great flexibility (in consolidating existing = plugins and to add new custom changes) so wonder what may stop one from usi= ng it to handle Production traffic? Understood one would need to assess the= performance overheads it may incur. >>=20 >>Thanks, >>=20 >>Shu-Chih >>=20 >>From:Scott Beardsley [mailto:sbeards@yahoo-inc.com]=20 >>Sent: Wednesday, October 07, 2015 7:28 PM >>To: Jeremy Payne ; users@trafficserver.apache.org >>Subject: Re: header_rewrite to modify destination port based on request h= eader >>=20 >>Thanks Jeremy, we we hoping to use an existing/stable plugin to do this (= lua appears to be "experimental" and we don't use it anywhere at the moment= ). It seems like header_rewrite is 99% of the way there so if it means addi= ng this one feature we'd prefer that since it wouldn't involve new config s= yntax and/or plugins.=20 >>=20 >>Scott >>=20 >>=20 >>On Wednesday, October 7, 2015 1:41 PM, Jeremy Payne = wrote: >>=20 >>Not sure if you are just researching or what.. But this same functionalit= y is also supported in the lua plugin. >> >>http://trafficserver.readthedocs.org/en/6.0.x/reference/plugins/ts_lua.en= .html >>ts.client_request.set_url_port >>=20 >>=20 >>On Wed, Oct 7, 2015 at 12:41 PM, Scott Beardsley = wrote: >>I'd like to modify the destination port based on an incoming request head= er. It seems like everything I need is available in the header_rewrite plug= in except the value expansion in the "set-destination port" directive. In t= he docs it says that this expansion only works for add-header[1].=20 >>>=20 >>>Is there a way to do something like the following via the existing plugi= n, maybe my syntax is wrong?=20 >>>=20 >>>cond %{READ_REQUEST_HDR_HOOK} [AND] >>>cond %{CLIENT-HEADER:NEW-PORT} /^[1-9][0-9]*$/ >>>set-destination PORT %{CLIENT-HEADER:NEW-PORT} [L] >>>=20 >>>When I test it I get this debug message: "Would set destination PORT to = an invalid range, skipping" >>>=20 >>>Which points me at this code[2]. It looks like the _value variable is se= t to the string "%{CLIENT-HEADER:NEW-PORT}" so I guess there is no expansio= n... >>>=20 >>>Assuming header_rewrite doesn't support this yet, are there any objectio= ns to adding this feature? >>>=20 >>>Thanks, >>>Scott >>>-- >>>[1] http://trafficserver.readthedocs.org/en/latest/reference/plugins/hea= der_rewrite.en.html?highlight=3Dheader_rewrite#variable-expansion >>>[2] https://git-wip-us.apache.org/repos/asf?p=3Dtrafficserver.git;a=3Dbl= ob;f=3Dplugins/header_rewrite/operators.cc;h=3D5ce75f5985e3e42374814e5a46c3= 61e450bdd779;hb=3DHEAD#l228 >>=20 >> ------=_Part_1615582_648684623.1444420741434 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Yes, I don't see why this would be= a problem.
<= /div>


On Friday, October = 9, 2015 12:19 PM, Sudheer Vinukonda <sudheerv@yahoo-inc.com> wrote:


Hi Daniel,

+1 on the proposal..

AFAIK, header_rewrite is by no means deprecated or plan to b= e deprecated (not in the near future, anyway) and it has a very wide set of= production users (including us).

Ple= ase go ahead and submit a PR on github - unless there are strong concerns, = I can review/merge it.

Thanks,

Sudheer

=

On Friday, October 9, 2015 9:55 AM, Daniel Morilha <dmorilha@gmail.com> wrote:



Hi, after talking a quick look in= to header_rewrite source code, it looks like it is just a matter of calling= "expand" into the function which validates and sets the port. If so, would= the community be ok with such addition? I really really would like to avoi= d the lua plugin only for this. Thanks.
On Oct 8, 2015 6= :53 AM, "Brian Geffon" <briang@apache.org> wrote:
This will likely be discussed next mont= h at the ATS summit in Sunnyvale, CA (please sign up and join if you can ma= ke it, details on the wiki). However, final discussions regarding things li= ke this always take place on the mailing list.
>
>
>Brian
>
>On Thursday, October 8, 2015, LIN, SHU-CHIH <sl3= 241@att.com> wrote:
>
>Hi:=
>>
>>Any insight when Lua= will be moved from "experimental" to =E2=80=9Cstable=E2=80=9D? Lua looks t= o offer great flexibility (in consolidating existing plugins and to add new= custom changes) so wonder what may stop one from using it to handle Produc= tion traffic? Understood one would need to assess the performance overheads= it may incur.
>>
>>Thanks= ,
>>
>>Shu-Chih
>>
>>From:Scott Beardsley [mailto:= sbeards@yahoo-inc.com]
>>= ;Sent: Wednesday, October 07, 2015 7:28 PM
>>To: Je= remy Payne <jp557198@gmail.com>; users@trafficserver.apache.org
>>Subject: Re: header_rewrite to modify destination port based on r= equest header
>>
>>Thanks = Jeremy, we we hoping to use an existing/stable plugin to do this (lua appea= rs to be "experimental" and we don't use it anywhere at the moment). It see= ms like header_rewrite is 99% of the way there so if it means adding this o= ne feature we'd prefer that since it wouldn't involve new config syntax and= /or plugins.
>>
>>Scott>>
>>
&g= t;>On Wednesday, October 7, 2015 1:41 PM, Jeremy Payne <jp557198@gmail.com> wrote:
>>
>>Not sure if you are just researching or what.. But this s= ame functionality is also supported in the lua plugin.
&g= t;>
>>http://trafficserver.readthedocs.org/en/6.0.x/reference/plugins/ts_l= ua.en.html
>>ts.client_request.set_url_port
>>
>>
>= >On Wed, Oct 7, 2015 at 12:41 PM, Scott Beardsley <sbeards@yahoo-inc.com> wrote:
>>I'd like= to modify the destination port based on an incoming request header. It see= ms like everything I need is available in the header_rewrite plugin except = the value expansion in the "set-destination port" directive. In the docs it= says that this expansion only works for add-header[1].
= >>>
>>>Is there a way to do something = like the following via the existing plugin, maybe my syntax is wrong?
>>>
>>>cond %{READ_REQUE= ST_HDR_HOOK} [AND]
>>>cond %{CLIENT-HEADER:NEW-P= ORT} /^[1-9][0-9]*$/
>>>set-destination PORT %{C= LIENT-HEADER:NEW-PORT} [L]
>>>
>>>When I test it I get this debug message: "Would set destinati= on PORT to an invalid range, skipping"
>>>
>>>Which points me at this code[2]. It looks like th= e _value variable is set to the string "%{CLIENT-HEADER:NEW-PORT}" so I gue= ss there is no expansion...
>>>
>>>Assuming header_rewrite doesn't support this yet, are there = any objections to adding this feature?
>>>
>>>Thanks,
>>>Scott
>>>--
>>>[1] http://trafficserver.readthedocs.org/en/latest/reference/pl= ugins/header_rewrite.en.html?highlight=3Dheader_rewrite#variable-expansion<= /a>
>>>[2]
https://git-wip-us.apache.org/repos/asf?p=3Dtr= afficserver.git;a=3Dblob;f=3Dplugins/header_rewrite/operators.cc;h=3D5ce75f= 5985e3e42374814e5a46c361e450bdd779;hb=3DHEAD#l228
>= ;>
>>


------=_Part_1615582_648684623.1444420741434--