I am working on 2.1.7, Actually my request is: the plug in did some work like remap, when user reqeuest www.google.com, use this plugin change request to www.yahoo.com. This is just example. Because for my project reqeust, every request URL will be modifyed before go to ATS like (http://www.google.com/ --> http://www.google.com/&&RID=3 ). i want to develop a plugin to strip out the parameter. i have tried TSUrlCreate() TSUrlParse() set url for header. but ATS still bring the reqeust to orgianl url. Any suggestion for my question?Thanks
> Date: Wed, 13 Apr 2011 12:33:47 -0600 > From: zw...@apache.org > To: dev@trafficserver.apache.org > CC: ccai...@msn.com > Subject: Re: Probelm with use TSHttpHdrUrlSet > > On 04/13/2011 11:19 AM, ChangCheng wrote: > > Hi users;i want to set url(www.example.com) for http header, how do i use > > TSHttpHdrUrlSet. the prototype is :TSReturnCode TSHttpHdrUrlSet (INKMBuffer > > bufp, INKMLoc hdr_loc, INKMLoc url)the problem is INKMloc url is object, > > how do i sign my url value(char *) to this object?Thanks > > > > You'll have to use the appropriate URL functions, e.g. > > TSUrlCreate() > TSUrlParse() > > > etc. Or, perhaps more likely you want to modify an existing URL MLoc I > think (e.g. TSHttpHdrUrlGet() ) ? But yeah, TSUrlParse() will parse a > URL as a string, and create the proper MLoc. > > Btw, seeing the INKMLoc etc. in your example above, are you still using > v2.0? We strongly urge all plugin developers to develop for v2.1.7 or > later, since we've changed the APIs significantly. > > -- Leif >