|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 2004, Version 4.3.8
- Updated PCRE to provide better error handling in certain cases. (Andrei)
+- NSAPI: added "bucket" parameter to list of non-php.ini-keys of php4_execute
+ for doing performance stats without warnings in server-log. (Uwe Schindler)
- Fixed bug #28868 (Internal wrapper registry not thread safe). (Sara)
- Fixed bug #28818 (Apache 2 sapis do not export st_dev).
(xuefer at 21cn dot com, Ilia).
const char *nsapi_eq;
} nsapi_equiv;
-static nsapi_equiv nsapi_headers[] = {
- { "CONTENT_LENGTH", "content-length" },
- { "CONTENT_TYPE", "content-type" }
-};
-static size_t nsapi_headers_size = sizeof(nsapi_headers)/sizeof(nsapi_headers[0]);
-
static nsapi_equiv nsapi_reqpb[] = {
{ "QUERY_STRING", "query" },
{ "REQUEST_LINE", "clf-request" },
static size_t nsapi_client_size = sizeof(nsapi_client)/sizeof(nsapi_client[0]);
/* this parameters to "Service"/"Error" are NSAPI ones which should not be php.ini keys and are excluded */
-static char *nsapi_exclude_from_ini_entries[] = { "fn", "type", "method", "directive", "code", "reason", "script", NULL };
+static char *nsapi_exclude_from_ini_entries[] = { "fn", "type", "method", "directive", "code", "reason", "script", "bucket", NULL };
static char *nsapi_strdup(char *str)
{
}
}
- for (i = 0; i < nsapi_headers_size; i++) {
- value = pblock_findval(nsapi_headers[i].nsapi_eq, rc->rq->headers);
- if (value) {
- php_register_variable((char *)nsapi_headers[i].env_var, value, track_vars_array TSRMLS_CC);
- }
- }
-
for (i=0; i < rc->rq->headers->hsize; i++) {
entry=rc->rq->headers->ht[i];
while (entry) {
if (!PG(safe_mode) || strncasecmp(entry->param->name, "authorization", 13)) {
- snprintf(buf, NS_BUF_SIZE, "HTTP_%s", entry->param->name);
+ if (strcasecmp(entry->param->name, "content-length")==0 || strcasecmp(entry->param->name, "content-type")==0) {
+ strncpy(buf, entry->param->name, NS_BUF_SIZE);
+ pos = 0;
+ } else {
+ snprintf(buf, NS_BUF_SIZE, "HTTP_%s", entry->param->name);
+ pos = 5;
+ }
buf[NS_BUF_SIZE]='\0';
- for(p = buf + 5; *p; p++) {
+ for(p = buf + pos; *p; p++) {
*p = toupper(*p);
if (*p < 'A' || *p > 'Z') {
*p = '_';
/* change the ini entry */
if (zend_alter_ini_entry(entry->param->name, strlen(entry->param->name)+1,
entry->param->value, strlen(entry->param->value),
- PHP_INI_USER, PHP_INI_STAGE_RUNTIME)==FAILURE) {
+ PHP_INI_SYSTEM, PHP_INI_STAGE_RUNTIME)==FAILURE) {
log_error(LOG_WARN, pblock_findval("fn", NSG(pb)), NSG(sn), NSG(rq), "Cannot change php.ini key \"%s\" to \"%s\"", entry->param->name, entry->param->value);
}
}