Hi, So far I'm happy with everything except HTTP range requests. Whenever the plugin is null-transforming a HTTP range request the following is happening:
* the return code is set to 200 (instead of 206) * the content-range header is omitted * nevertheless the plugin only 'sees' the requested bytes I would need to make it work: * return code 206 & content-range response need to be there * the transformation must know the offset with the original response, it doesn't seem to be available Do transformation and range-requests already work or is it still a todo on ATS side? Grüße, Sebastian -----Ursprüngliche Nachricht----- Von: James Peach [mailto:jpe...@apache.org] Gesendet: Dienstag, 6. August 2013 16:15 An: dev@trafficserver.apache.org Cc: bri...@apache.org Betreff: Re: Plugin transforming between cache and end-user On Aug 6, 2013, at 4:01 PM, Sebastian Annies <sebastian.ann...@castlabs.com> wrote: > Hi, > > On IRC someone suggested (sorry I forgot your name!) to start looking > at the gzip plugin as it stores the full data and perform the > compression/transformation on the fly. I removed everything and > modified so that I now have a null-transform that also works on cached > content. I have a good starting point now. The key seems to be to add > the transformation on TS_EVENT_HTTP_CACHE_LOOKUP_COMPLETE, too. Nice! > > Best Regards, > Sebastian > -----Ursprüngliche Nachricht----- > Von: James Peach [mailto:jpe...@apache.org] > Gesendet: Dienstag, 6. August 2013 10:33 > An: dev@trafficserver.apache.org > Cc: bri...@apache.org > Betreff: Re: Plugin transforming between cache and end-user > > > On Aug 3, 2013, at 12:16 PM, Sebastian Annies > <sebastian.ann...@castlabs.com> wrote: > >> Hi, >> >> >> >> we have huge files that will be slightly different for most users - >> they are 1 to 8GB and only 1k differs - so we want to change them >> with a transformation. Unfortunately the null-transform plugin is of >> no help since it transforms the content coming from the origin server >> and NOT the content that is going to the browser of the final user. >> Is there anywhere any example on doing transforms at this place? >> >> >> >> Basically it’s like this: >> >> >> >> http://ats/huge_video_a?userspecific=abc >> >> http://ats/huge_video_a?userspecific=xyz >> >> >> >> and of course we only want to store the untransformed ‘huge_video_a’ >> once and perform the transformation (inserting the user specific >> info) on every delivery. Where to start? Any hints? > > I'm not very familiar with transform, but AFAICS you get to do > TS_HTTP_REQUEST_TRANSFORM_HOOK or TS_HTTP_RESPONSE_TRANSFORM_HOOK, and > the cache always stores the transformed response. Maybe Brian (CC'ed) > has some other ideas ... > > J