CVS update: php4

From: Date: Fri, 11 Jun 1999 09:23:00 +0000
Subject: CVS update: php4
Groups: php.version4 
Request: Send a blank email to php-version4+get-1468@lists.php.net to get a copy of this message
Date: Friday June 11, 1999 @ 5:23 Author: zeev Update of /repository/php4 In directory php:/tmp/cvs-serv11236 Modified Files: main.c Log Message: * Fix a buglet in the session module * Make some renames in the session module - avoid having a function called 'delete' so that we don't piss any C++ compilers. Also rename the {startup,shutdown}_globals to {startup,shutdown}_session_globals, so that they're a bit less general names, and made them static. * Remove uselss variables Index: php4/main.c diff -u php4/main.c:1.71 php4/main.c:1.72 --- php4/main.c:1.71 Sat Jun 5 15:00:56 1999 +++ php4/main.c Fri Jun 11 05:22:59 1999 @@ -29,7 +29,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: main.c,v 1.71 1999/06/05 19:00:56 zeev Exp $ */ +/* $Id: main.c,v 1.72 1999/06/11 09:22:59 zeev Exp $ */ #include <stdio.h> @@ -688,10 +688,6 @@ void php_request_shutdown(void *dummy) { -#if FHTTPD - char tmpline[128]; - int i, serverdefined; -#endif CLS_FETCH(); ELS_FETCH(); PLS_FETCH(); @@ -712,7 +708,6 @@ php3_unset_timeout(); - #if CGI_BINARY fflush(stdout); if(request_info.php_argv0) { @@ -720,47 +715,6 @@ request_info.php_argv0 = NULL; } #endif -#if FHTTPD - if (response) { - if (!headermade) { - makestandardheader(response, 200, "text/html", "fhttpd", req && req->keepalive); - } else { - if (headerfirstline) - putlinetoheader(response, headerfirstline); - else - putlinetoheader(response, "HTTP/1.0 200 OK\r\n"); - serverdefined = 0; - for (i = 0; i < headerlines; i++) { - if (!strncmp(currentheader[i], "Server:", 7)) - serverdefined = 1; - putlinetoheader(response, currentheader[i]); - } - if (!serverdefined) - putlinetoheader(response, "Server: fhttpd\r\n"); - if (response->datasize) { - sprintf(tmpline, "Content-Length: %ld\r\n", response->datasize); - putlinetoheader(response, tmpline); - if (req && req->keepalive) - putlinetoheader(response, - "Connection: Keep-Alive\r\nKeep-Alive: max=0, timeout=30\r\n"); - } - php3_fhttpd_free_header(); - } - sendresponse(server, response); - if (response->datasize) - finishresponse(server, response); - else - finishdropresponse(server, response); - deleteresponse(response); - } - response = NULL; - if (req) - deleterequest(req); - req = NULL; -#endif -#if USE_SAPI - sapi_rqst->flush(sapi_rqst->scid); -#endif } @@ -1018,54 +972,6 @@ _php3_hash_update(&EG(symbol_table), "PHP_SELF", sizeof("PHP_SELF"), (void *) &tmp, sizeof(pval *), NULL); } #else -#if FHTTPD - { - int i, j; - if (req) { - for (i = 0; i < req->nlines; i++) { - if (req->lines[i].paramc > 1 && req->lines[i].params[0] && req->lines[i].params[1]) { - tmp = (pval *) emalloc(sizeof(pval)); - tmp->value.str.len = strlen(req->lines[i].params[1]); - tmp->value.str.val = estrndup(req->lines[i].params[1], tmp->value.str.len); - tmp->type = IS_STRING; - tmp->refcount=1; - tmp->is_ref=0; - _php3_hash_update(&EG(symbol_table), req->lines[i].params[0], - strlen(req->lines[i].params[0]) + 1, &tmp, - sizeof(pval *), NULL); - } - } - if (req->script_name_resolved) { - i = strlen(req->script_name_resolved); - tmp = (pval *) emalloc(sizeof(pval)); - tmp->value.str.len = i; - tmp->value.str.val = estrndup(req->script_name_resolved, i); - tmp->type = IS_STRING; - tmp->refcount=1; - tmp->is_ref=0; - _php3_hash_update(&EG(symbol_table), "PATH_TRANSLATED", - sizeof("PATH_TRANSLATED"), - &tmp, sizeof(pval *), NULL); - if (req->script_name) { - j = i - strlen(req->script_name); - if (j > 0 - && !strcmp(req->script_name_resolved + j, - req->script_name)) { - tmp = (pval *) emalloc(sizeof(pval)); - tmp->value.str.len = j; - tmp->value.str.val = estrndup(req->script_name_resolved, j); - tmp->type = IS_STRING; - tmp->refcount=1; - tmp->is_ref=0; - _php3_hash_update(&EG(symbol_table), "DOCUMENT_ROOT", - sizeof("DOCUMENT_ROOT"), - &tmp, sizeof(pval *), NULL); - } - } - } - } - } -#endif { /* Build the special-case PHP_SELF variable for the CGI version */ char *pi;

« previous php.version4 (#1468) next »