From: SourceForge.net <no...@so...> - 2005-02-24 16:05:56
|
Feature Requests item #1145957, was opened at 2005-02-22 03:13 Message generated for change (Comment added) made by seryakov You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=719009&aid=1145957&group_id=130646 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Stephen Deasey (sdeasey) Assigned to: Stephen Deasey (sdeasey) Summary: Cookie support for C and Tcl Initial Comment: Atached is a patch which implements a simple cookie API for both C and Tcl. Here's what it looks like (the formating will probably get mangled, sorry): void Ns_ConnSetCookie(Ns_Conn *conn, char *name, char *value, int maxage); void Ns_ConnSetSecureCookie(Ns_Conn *conn, char *name, char *value, int maxage); void Ns_ConnSetCookieEx(Ns_Conn *conn, char *name, char *value, int maxage, char *domain, char *path, int secure); void Ns_ConnDeleteCookie(Ns_Conn *conn, char *name, char *domain, char *path); void Ns_ConnDeleteSecureCookie(Ns_Conn *conn, char *name, char *domain, char *path); char *Ns_ConnGetCookie(Ns_DString *dest, Ns_Conn *conn, char *name); ns_setcookie ?-secure bool? ?-domain d? ?-path p? ?-maxage secs? name data ns_getcookie name ?default? ns_deletecookie ?-secure bool? ?-domain d? ?-path p? name As you can see it only tackles the basics, no comment or version field. Although I've never personaly had to use those features. Cookies are a pre-requisite for the authentication module which exercises the new autht/authz API I haven't written yet... Obviously, the string parsing in the GetCookie code will have to be very carefully looked at before this sees the Internet. But in general, does this look like it's on the right track? ---------------------------------------------------------------------- >Comment By: Vlad Seryakov (seryakov) Date: 2005-02-24 16:05 Message: Logged In: YES user_id=184124 Looks good, the only issue i have, some browser can send more than one Cookie header and you are looking only in the first header. Also, this is new API, no problem adding it. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=719009&aid=1145957&group_id=130646 |