CVS update: php31/sapi
| From: | shane | Date: | Fri, 21 Aug 1998 21:54:14 +0000 |
| Subject: | CVS update: php31/sapi | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-451@lists.php.net to get a copy of this message | ||
Date: Friday August 21, 1998 @ 17:54
Author: shane
Update of /repository/php31/sapi
In directory asf:/tmp/cvs-serv3829/sapi
Modified Files:
isapi_sapi.c
Log Message:
iis work
Index: php31/sapi/isapi_sapi.c
diff -c php31/sapi/isapi_sapi.c:2.14 php31/sapi/isapi_sapi.c:2.15
*** php31/sapi/isapi_sapi.c:2.14 Fri Aug 21 17:00:47 1998
--- php31/sapi/isapi_sapi.c Fri Aug 21 17:54:13 1998
***************
*** 145,163 ****
*r = '\0';
if (!strcasecmp(header, "Location")) {
*r = ':';
! if (strspn((r+1),"://")) {/*redirect to remote system */
sapi_info->http_redirect = 1;
} else { /*local redirect */
sapi_info->http_redirect = 2;
}
! sapi_info->http_status = estrdup(r + 1);
return SUCCESS;
}
*r = ':';
}
! /* iis will not do any other headers if we're redirecting,
! so ignore them */
! if (!sapi_info->http_redirect) {
if (sapi_info->headers) {
tempstr = emalloc(strlen(header) + strlen(sapi_info->headers) + 3);
sprintf(tempstr, "%s\015\012%s", sapi_info->headers, header);
--- 145,161 ----
*r = '\0';
if (!strcasecmp(header, "Location")) {
*r = ':';
! if (strspn((r+2),"://")) {/*redirect to remote system */
sapi_info->http_redirect = 1;
} else { /*local redirect */
sapi_info->http_redirect = 2;
}
! sapi_info->http_status = estrdup(r + 2);
return SUCCESS;
}
*r = ':';
}
! if(!sapi_info->http_redirect){
if (sapi_info->headers) {
tempstr = emalloc(strlen(header) + strlen(sapi_info->headers) + 3);
sprintf(tempstr, "%s\015\012%s", sapi_info->headers, header);
***************
*** 167,177 ****
sapi_info->headers = estrdup(header);
}
}
- /* we could do this, but no real sence to it.
- else{
- php3_error(E_NOTICE,"Cannot send additional headers on a redirect!");
- return FAILURE;
- } */
}
return SUCCESS;
}
--- 165,170 ----
***************
*** 190,206 ****
case 1:
req = HSE_REQ_SEND_URL_REDIRECT_RESP;
headlen = strlen(sapi_info->http_status);
break;
case 2:
req = HSE_REQ_SEND_URL;
headlen = strlen(sapi_info->http_status);
break;
default:
req = HSE_REQ_SEND_RESPONSE_HEADER;
- /* iis will not do any other headers if we're redirecting,
- so ignore them */
if (sapi_info->headers) {
! headlen = strlen(sapi_info->headers) + 5;
tempstr = emalloc(headlen);
sprintf(tempstr, "%s\015\012\015\012", sapi_info->headers);
}
--- 183,201 ----
case 1:
req = HSE_REQ_SEND_URL_REDIRECT_RESP;
headlen = strlen(sapi_info->http_status);
+ /*for some reason, if we actualy print something on a redirection,
+ iis does very funky stuff*/
+ php3_globals->client_alive=0;
break;
case 2:
req = HSE_REQ_SEND_URL;
headlen = strlen(sapi_info->http_status);
+ php3_globals->client_alive=0;
break;
default:
req = HSE_REQ_SEND_RESPONSE_HEADER;
if (sapi_info->headers) {
! headlen = (strlen(sapi_info->headers) + 5);
tempstr = emalloc(headlen);
sprintf(tempstr, "%s\015\012\015\012", sapi_info->headers);
}
***************
*** 222,228 ****
#if defined(CRASH_DETECTION)
debug_log("sapi_send_header failure %s,%d\n", cfilename, clineno);
#endif
- sapi_info->abort = 1;
return FAILURE;
}
if (tempstr)
--- 217,222 ----
--
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