thanks for your response.
I did as you advices and i am having problem destring one of the server
headers.
I still see with wireshark that it is not destroyed.

here is the relevant piece of code:

  switch (event) {

  case TS_EVENT_HTTP_SEND_RESPONSE_HDR:
{
      TSMBuffer bufp;
      TSMLoc hdr_loc;
      TSMLoc field_loc;

      TSHttpTxnServerRespGet(txnp, &bufp, &hdr_loc);
      field_loc = TSMimeHdrFieldFind(bufp, hdr_loc, "Content-Disposition",
-1);
      if (field_loc == TS_NULL_MLOC) {
        fprintf(stderr,"[add_header] Error while getting field !!!\n");
        return 0;
      }else{
        fprintf(stderr,"[add_header] removing Content-Disposition !!!\n");
      }
      TSMimeHdrFieldDestroy(bufp, hdr_loc, field_loc);
      TSHandleMLocRelease(bufp, TS_NULL_MLOC, hdr_loc);
   }


On Fri, Sep 13, 2013 at 12:40 AM, Uri Shachar <ushac...@hotmail.com> wrote:

> On Wed, 11 Sep 2013 21:49:56 Dani wrote:
> > Subject: can traffic server transform delay the headers response ?
> ...
> > i would like to edit the http headers returned to the browser based on
> the
> > analysis i do in the transform, but i found that the headers are already
> > returned to the browser BEFORE i get a chance to analyse the files
> content
> > with the transform mechanism.
>
> All you need to do is add a hookpoint on TS_HTTP_SEND_RESPONSE_HDR_HOOK,
> and only reenable when you have finished your analysis + modified the
> headers.
>
>            --Uri




-- 
Dani Tweig

Reply via email to