Branch: Tag:

2005-12-07

2005-12-07 14:51:59 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Now uses the CookieJar.
Obsoleted parse_cookies().

Rev: server/protocols/http.pike:1.489

2:   // Modified by Francesco Chemolli to add throttling capabilities.   // Copyright © 1996 - 2004, Roxen IS.    - constant cvs_version = "$Id: http.pike,v 1.488 2005/12/07 13:24:50 grubba Exp $"; + constant cvs_version = "$Id: http.pike,v 1.489 2005/12/07 14:51:59 grubba Exp $";   // #define REQUEST_DEBUG   #define MAGIC_ERROR   
112:   #endif // REQUEST_DEBUG   ]);   mapping (string:mixed) connection_misc = ([ ]); - mapping (string:string) cookies = ([ ]); +    mapping (string:string) request_headers = ([ ]);   mapping (string:string) client_var = ([ ]);   
447:   private static mixed f, line;   private static int hstart;    + #if 0   //! Parse cookie strings.   //!   //! @param contents
454:   //!   //! @returns   //! Returns the resulting current cookie mapping. + //! + //! @obsolete + //! Use @[CookieJar] instead.   mapping(string:string) parse_cookies( array|string contents )   {    if(!contents)
483:    }    return cookies;   } + #endif      int things_to_do_when_not_sending_from_cache( )   {
506:    misc["accept-language"] = contents;    }    -  if( contents = request_headers[ "cookie" ] ) -  { -  // FIXME: -  // "misc->cookies"? Shouldn't it be just "cookies"? -  // /grubba 2002-03-22 -  misc->cookies = ({}); -  foreach( arrayp( contents )? contents : ({ contents }), contents ) -  { -  parse_cookies(contents); -  } -  } +  init_cookies();       string f = raw_url;