CVS update: php3/functions

From: Date: Tue, 18 Aug 1998 12:49:29 +0000
Subject: CVS update: php3/functions
Groups: php.dev 
Request: Send a blank email to php-dev+get-293@lists.php.net to get a copy of this message
Date: Tuesday August 18, 1998 @ 8:49 Author: rasmus Update of /repository/php3/functions In directory asf:/export/home/rasmus/php3/functions Modified Files: head.c Log Message: Apply patch from bug #660 Index: php3/functions/head.c diff -c php3/functions/head.c:1.106 php3/functions/head.c:1.107 *** php3/functions/head.c:1.106 Fri Aug 7 17:37:32 1998 --- php3/functions/head.c Tue Aug 18 08:49:29 1998 *************** *** 26,32 **** | Authors: Rasmus Lerdorf <rasmus@lerdorf.on.ca> | +----------------------------------------------------------------------+ */ ! /* $Id: head.c,v 1.106 1998/08/07 21:37:32 rasmus Exp $ */ #ifdef THREAD_SAFE #include "tls.h" #endif --- 26,32 ---- | Authors: Rasmus Lerdorf <rasmus@lerdorf.on.ca> | +----------------------------------------------------------------------+ */ ! /* $Id: head.c,v 1.107 1998/08/18 12:49:29 rasmus Exp $ */ #ifdef THREAD_SAFE #include "tls.h" #endif *************** *** 233,239 **** CookieList *cookie; int len = 0; time_t t; ! char *r, *dt; #endif #if APACHE || defined(USE_SAPI) || FHTTPD char *tempstr; --- 233,239 ---- CookieList *cookie; int len = 0; time_t t; ! char *dt, *cookievalue = NULL; #endif #if APACHE || defined(USE_SAPI) || FHTTPD char *tempstr; *************** *** 259,266 **** while (cookie) { if (cookie->name) len += strlen(cookie->name); ! if (cookie->value) ! len += strlen(cookie->value); if (cookie->path) len += strlen(cookie->path); if (cookie->domain) --- 259,268 ---- while (cookie) { if (cookie->name) len += strlen(cookie->name); ! if (cookie->value) { ! cookievalue = _php3_urlencode(cookie->value, strlen (cookie->value)); ! len += strlen(cookievalue); ! } if (cookie->path) len += strlen(cookie->path); if (cookie->domain) *************** *** 280,292 **** efree(dt); } else { /* FIXME: XXX: this is not binary data safe */ ! r = _php3_urlencode(cookie->value, strlen (cookie->value)); ! sprintf(tempstr, "%s=%s", cookie->name, cookie->value ? r : ""); ! if (r) efree(r); if (cookie->name) efree(cookie->name); if (cookie->value) efree(cookie->value); cookie->name=NULL; cookie->value=NULL; if (cookie->expires > 0) { strcat(tempstr, "; expires="); dt = php3_std_date(cookie->expires); --- 282,294 ---- efree(dt); } else { /* FIXME: XXX: this is not binary data safe */ ! sprintf(tempstr, "%s=%s", cookie->name, cookie->value ? cookievalue : ""); if (cookie->name) efree(cookie->name); if (cookie->value) efree(cookie->value); + if (cookievalue) efree(cookievalue); cookie->name=NULL; cookie->value=NULL; + cookievalue=NULL; if (cookie->expires > 0) { strcat(tempstr, "; expires="); dt = php3_std_date(cookie->expires); *************** *** 314,319 **** --- 316,322 ---- if (cookie->path) efree(cookie->path); if (cookie->name) efree(cookie->name); if (cookie->value) efree(cookie->value); + if (cookievalue) efree(cookievalue); efree(cookie); cookie = php3_PopCookieList(); efree(tempstr); -- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net For help: php-dev-help@lists.php.net

« previous php.dev (#293) next »