Branch: Tag:

2012-03-12

2012-03-12 12:44:27 by Rineke Bos <rineke@roxen.com>

Added attributes "secure" and "httponly" to the <set-cookie/> tag.

Rev: server/etc/modules/Roxen.pmod:1.328
Rev: server/modules/tags/rxmltags.pike:1.671

1:   // This is a roxen pike module. Copyright © 1999 - 2009, Roxen IS.   // - // $Id: Roxen.pmod,v 1.327 2012/02/14 22:55:00 jonasw Exp $ + // $Id: Roxen.pmod,v 1.328 2012/03/12 12:44:27 rineke Exp $      #include <roxen.h>   #include <config.h>
4959:    string value,    int|void expire_time_delta,    string|void domain, -  int(1..1)|string|void path ) +  int(1..1)|string|void path, +  string|void secure, +  string|void httponly)   //! Set the cookie specified by @[name] to @[value]. Adds a Set-Cookie   //! header in the response that will be made from @[id].   //!
4987:       if( domain ) cookie += "; domain="+http_encode_cookie( domain );    if( path!=1 ) cookie += "; path="+http_encode_cookie( path||"" ); +  if( secure ) cookie += "; secure"; +  if( httponly ) cookie += "; HttpOnly";    id->add_response_header ("Set-Cookie", cookie);   }