You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@trafficserver.apache.org by Belkacem <re...@gmail.com> on 2011/06/07 17:29:42 UTC

hot plugin with some cookies :)

Hi everyone, I'm working on a plugin that adds a cookie to each response if it's not included in the request, i'm adding the header Set_Cookie: xxx=xxxxx; path=/  but the clients doesn't send the cookie after getting it. 
can any one help me with this ?
thanks in advance.
bmr


Re: hot plugin with some cookies :)

Posted by Leif Hedstrom <zw...@apache.org>.
On 06/07/2011 09:46 AM, Belkacem wrote:
> Set-cookie
> i found the problem it's the append method that i wasn't calling in 
> the plugin :)
> I have another question though, I want to write in the logs this 
> cookie when returned from the client, what's the best method to do it ?
> thanks in advance :)

You can create a custom log file format, I think there's a tag to also 
log a particular request header. I *think*, but please refer to the 
admin guide, that you'd want to use

     %<{Set-Cookie}psh>


in your custom log XML configuration (logs_xml.config). Your other 
option is to use the plugin APIs to make a specific log file for your 
plugin, and then you can obviously log it any way you like.

-- Leif


Re: hot plugin with some cookies :)

Posted by Belkacem <re...@gmail.com>.
Set-cookie
i found the problem it's the append method that i wasn't calling in the plugin :)
I have another question though, I want to write in the logs this cookie when returned from the client, what's the best method to do it ?
thanks in advance :)
bmr

i have another question tho,
Le 7 juin 2011 à 17:41, Eric Balsa a écrit :

> Are you using Set-Cookie or set_cookie?
> 
> Eric
> 
> On Jun 7, 2011 8:30 AM, "Belkacem" <re...@gmail.com> wrote:
> > Hi everyone, I'm working on a plugin that adds a cookie to each response if it's not included in the request, i'm adding the header Set_Cookie: xxx=xxxxx; path=/ but the clients doesn't send the cookie after getting it. 
> > can any one help me with this ?
> > thanks in advance.
> > bmr
> > 


Re: hot plugin with some cookies :)

Posted by Eric Balsa <er...@apache.org>.
Are you using Set-Cookie or set_cookie?

Eric
On Jun 7, 2011 8:30 AM, "Belkacem" <re...@gmail.com> wrote:
> Hi everyone, I'm working on a plugin that adds a cookie to each response
if it's not included in the request, i'm adding the header Set_Cookie:
xxx=xxxxx; path=/ but the clients doesn't send the cookie after getting it.
> can any one help me with this ?
> thanks in advance.
> bmr
>