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