don't strip numbers from the starting env (fixed #438)

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@915 152afb58-edef-0310-8abb-c4023f1b3aa9
This commit is contained in:
Jan Kneschke 2006-01-04 10:38:36 +00:00
parent bc95f8024a
commit abe6d62a02
1 changed files with 9 additions and 3 deletions

View File

@ -1726,9 +1726,15 @@ static int fcgi_env_add_request_headers(server *srv, connection *con, plugin_dat
buffer_prepare_append(srv->tmp_buf, ds->key->used + 2);
for (j = 0; j < ds->key->used - 1; j++) {
srv->tmp_buf->ptr[srv->tmp_buf->used++] =
isalpha((unsigned char)ds->key->ptr[j]) ?
toupper((unsigned char)ds->key->ptr[j]) : '_';
char c = '_';
if (light_isalpha(ds->key->ptr[j])) {
/* upper-case */
c = ds->key->ptr[j] & ~32;
} else if (light_isdigit(ds->key->ptr[j])) {
/* copy */
c = ds->key->ptr[j];
}
srv->tmp_buf->ptr[srv->tmp_buf->used++] = c;
}
srv->tmp_buf->ptr[srv->tmp_buf->used++] = '\0';