CVS update: php31/sapi
| From: | shane | Date: | Thu, 27 Aug 1998 05:01:14 +0000 |
| Subject: | CVS update: php31/sapi | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-603@lists.php.net to get a copy of this message | ||
Date: Thursday August 27, 1998 @ 1:01
Author: shane
Update of /repository/php31/sapi
In directory asf:/u2/tmp/cvs-serv25351/sapi
Modified Files:
cgi_sapi.c wsapi_sapi.c
Log Message:
compile fixes
Index: php31/sapi/cgi_sapi.c
diff -c php31/sapi/cgi_sapi.c:2.17 php31/sapi/cgi_sapi.c:2.18
*** php31/sapi/cgi_sapi.c:2.17 Thu Aug 27 00:28:43 1998
--- php31/sapi/cgi_sapi.c Thu Aug 27 01:01:13 1998
***************
*** 159,165 ****
SAPI_FUNC_VARS;
char *pi;
#if FORCE_CGI_REDIRECT
! pi = GLOBAL(request_info).path_info;
tmp.value.str.val = emalloc(((pi)?strlen(pi):0) + 1);
tmp.value.str.len = _php3_sprintf(tmp.value.str.val, "%s", (pi ? pi : ""));
/* SAFE */
#else
--- 159,165 ----
SAPI_FUNC_VARS;
char *pi;
#if FORCE_CGI_REDIRECT
! pi = sapi_info->path_info;
tmp.value.str.val = emalloc(((pi)?strlen(pi):0) + 1);
tmp.value.str.len = _php3_sprintf(tmp.value.str.val, "%s", (pi ? pi : ""));
/* SAFE */
#else
Index: php31/sapi/wsapi_sapi.c
diff -c php31/sapi/wsapi_sapi.c:2.3 php31/sapi/wsapi_sapi.c:2.4
*** php31/sapi/wsapi_sapi.c:2.3 Tue Aug 25 20:00:40 1998
--- php31/sapi/wsapi_sapi.c Thu Aug 27 01:01:13 1998
***************
*** 174,181 ****
int sapi_send_header(SAPI_GLOBAL_INCLUDE_V)
{
SAPI_FUNC_VARS;
- int headlen = 0;
- char *tempstr = NULL;
if (php3_globals->php3_PrintHeader && !php3_globals->php3_HeaderPrinted) {
--- 174,179 ----
***************
*** 294,300 ****
SAPI_FUNC_VARS;
PUTS("<center><h2>WSAPI Version ");
! PUTS(tp->server_version);
PUTS(" Request Environment</h2></center>");
PUTS("<table border=5 width=\"600\">\n");
PUTS("<tr><th bgcolor=\"" HEADER_COLOR
"\">Variable</th><th bgcolor=\"" HEADER_COLOR
"\">Value</th></tr>\n");
--- 292,298 ----
SAPI_FUNC_VARS;
PUTS("<center><h2>WSAPI Version ");
! PUTS((char *)tp->server_version);
PUTS(" Request Environment</h2></center>");
PUTS("<table border=5 width=\"600\">\n");
PUTS("<tr><th bgcolor=\"" HEADER_COLOR
"\">Variable</th><th bgcolor=\"" HEADER_COLOR
"\">Value</th></tr>\n");
***************
*** 320,343 ****
char buf[MAX_STRING_LEN];
int type;
! strcpy(buf,tp->url);
type=url_to_file(buf, TRUE, tp);
! sapi_info->scid = tp;
! sapi_info->path_info = _sapi_getenv(tp, "PATH_INFO");
! sapi_info->path_translated = tp->url;
! if(type==STD_DOCUMENT){
sapi_info->rqst_filename = strdup(buf);
}
sapi_info->filename = NULL; /* we will estrdup rqst_filename later */
! sapi_info->query_string = _sapi_getenv(tp, "QUERY_STRING");
! sapi_info->current_user = NULL;
sapi_info->current_user_length = 0;
sapi_info->request_method = tp->method;
sapi_info->script_name = _sapi_getenv(tp, "SCRIPT_NAME");
sapi_info->content_length = tp->content_length;
sapi_info->content_type = tp->content_type;
sapi_info->cookies = _sapi_getenv(tp, "HTTP_COOKIE");
sapi_info->authorization = tp->auth_line;
sapi_info->getenv = sapi_getenv;
sapi_info->writeclient = sapi_writeclient;
--- 318,356 ----
char buf[MAX_STRING_LEN];
int type;
! strcpy(buf, tp->url);
type=url_to_file(buf, TRUE, tp);
! if(type == STD_DOCUMENT) {
sapi_info->rqst_filename = strdup(buf);
}
+ sapi_info->scid = tp;
+ //
+ // Shane -- We need to talk about this one. Microsoft has perverted the
+ // true meaning of path info and path translated to make up for their
+ // mistakes in designing ISAPI. Our customers expect the real path
+ // info and path translated here.
+ //
+ sapi_info->path_info = _sapi_getenv(tp, "PATH_INFO");
+ // sapi_info->path_info = tp->path_args;
+ // sapi_info->path_translated = tp->url;
+ // strcpy(buf, tp->path_args);
+ url_to_file(buf, FALSE, tp);
+ sapi_info->path_translated = strdup(buf); // *** WHEN FREE()??? ***
+ //
+ //
sapi_info->filename = NULL; /* we will estrdup rqst_filename later */
! // sapi_info->query_string = _sapi_getenv(tp, "QUERY_STRING");
! sapi_info->query_string = tp->args;
! sapi_info->current_user = NULL; /*owner of script*/
sapi_info->current_user_length = 0;
sapi_info->request_method = tp->method;
sapi_info->script_name = _sapi_getenv(tp, "SCRIPT_NAME");
+ // sapi_info->script_name = tp->script_name;
sapi_info->content_length = tp->content_length;
sapi_info->content_type = tp->content_type;
sapi_info->cookies = _sapi_getenv(tp, "HTTP_COOKIE");
sapi_info->authorization = tp->auth_line;
+
sapi_info->getenv = sapi_getenv;
sapi_info->writeclient = sapi_writeclient;
--
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