Branch: Tag:

2006-09-15

2006-09-15 12:06:16 by Marcus Wellhardh <wellhard@roxen.com>

Added option to disable cookie jar to init_cookies().

Rev: server/base_server/prototypes.pike:1.181

6:   #include <module.h>   #include <variables.h>   #include <module_constants.h> - constant cvs_version="$Id: prototypes.pike,v 1.180 2006/09/14 11:36:11 wellhard Exp $"; + constant cvs_version="$Id: prototypes.pike,v 1.181 2006/09/15 12:06:16 wellhard Exp $";      #ifdef DAV_DEBUG   #define DAV_WERROR(X...) werror(X)
992:       static void create(string|array(string)|void contents)    { +  VARY_WERROR("Initiating cookie jar.\n");    real_cookies = ([]);       if(!contents)
1120:    //!    //! Typically called from callbacks installed with    //! @[register_vary_callback()] if @[cookies] hasn't been initialized. -  void init_cookies() +  void init_cookies(int|void no_cookie_jar)    {    if (!cookies) {    cookies = CookieJar(request_headers["cookie"]); -  +  if (no_cookie_jar) { +  // Disable the cookie jar -- Called from log()? +  real_cookies = cookies = ~cookies;    }    } -  +  }       mapping (string:array(string)|string) request_headers;    //! Indices and values map to the names and values of all HTTP headers sent