views:

264

answers:

3

I have a squid 3.0 deployed which has a url_rewriter program which rewrites certain HTTP requests. I now need to modify this prpogram to rewrite along with the cookie setting code.

As much as I have seen the url_rewrite_program documentation, it appears that I may not be able to set a cookie along with the 302 response.

Is this correct? Can i set a cookie in the redirect response or would this require modifying the squid code.

Appreciate any help in this regard!

A: 

Mailing list confirmed that url_rewriter and squid protocol as of today does not support setting the cookie .

I have modified the squid code myself to do this Now you could set the cookie by returning the following line from your url_rewriter program

302:<URL>#<SET_COOKIE>

for example ,

302:http://my.example.net#cookie_name=cookie_value;path=1;expiration=+300

One caveat (more for my own documentation), you cannot place a space in the cookie string as the squid reading function rejects anything after a whitespace.

Anybody interested in the patch ,let me know

geekGod
A: 

Hi,

I will be interested in this patch.

remya
A: 

Hello GeekGod!

do u know how make a reverse of this patch? no set but read some cookie?

Luiz Biazus