Well.....What I want to do is to make a transform plugin only for a specific domain(or specified url) and I think I can't make that through TrafficServer SDK.
TrafficServer seems to have two types of plugins, the one is remap type and the other one is transform type. remap type plugin can do something for a specific domain(or specified url) while transform plugin can't be configured to be called only for a domain. For example, I'd like to make a throttling plugin to be called only for the request "http://exampleA.com/mp4/big.mp4" but I don't want it to be called for the request "http://exampleA.com/normal/small.htm" I made a throttling plugin and it works well. but the problem is it is called every http transaction. So I thought simply like this : why not put "TSHttpHookAdd(TS_HTTP_READ_RESPONSE_HDR_HOOK(or TS_EVENT_HTTP_TXN_START), TSContCreate(transform_plugin, NULL));" into TSRemapNewInstance() instead of TSPluginInit()? At first it looked effective but I detected the http session never gets stop. I think TrafficServer loses the control of flow if somebody calls TSContCreate() in TSRemapNewInstance(). That's why the http session never stops... Leif Hedstrom advised me to try header-filter plugin but it looks same to remap plugin intrinsically... Am I wrong? Thank you. -----Original Message----- From: Nick Kew [mailto:n...@apache.org] Sent: Sunday, June 10, 2012 7:02 PM To: dev@trafficserver.apache.org Subject: Re: a plugin to specific domain. need helps. On 10 Jun 2012, at 04:43, 오재경 wrote: > before I try it let ask you a question. > > Isn't it allowed to use TS_HTTP_TXN_START_HOOK in header_filter > plugin? why does it HookAdd from TS_HTTP_READ_REQUEST_HDR_HOOK? Depends what you want to do. If you want to work with the data (as in either a remap or a filter), you don't yet have them in a TXN_START function. -- Nick Kew