Lines Matching refs:ptr

308 	char **ptr;  member
728 unlink(proc->unixsocket->ptr); in FREE_FUNC()
738 unlink(proc->unixsocket->ptr); in FREE_FUNC()
770 if (0 == strncmp(dst, env->ptr[i], key_len + 1)) { in env_add()
773 env->ptr[i] = dst; in env_add()
780 env->ptr = malloc(env->size * sizeof(*env->ptr)); in env_add()
783 env->ptr = realloc(env->ptr, env->size * sizeof(*env->ptr)); in env_add()
786 env->ptr[env->used++] = dst; in env_add()
796 start = b->ptr; in parse_binpath()
798 switch(b->ptr[i]) { in parse_binpath()
805 env->ptr = malloc(env->size * sizeof(*env->ptr)); in parse_binpath()
808 env->ptr = realloc(env->ptr, env->size * sizeof(*env->ptr)); in parse_binpath()
811 b->ptr[i] = '\0'; in parse_binpath()
813 env->ptr[env->used++] = start; in parse_binpath()
815 start = b->ptr + i + 1; in parse_binpath()
824 env->ptr = malloc(env->size * sizeof(*env->ptr)); in parse_binpath()
827 env->ptr = realloc(env->ptr, env->size * sizeof(*env->ptr)); in parse_binpath()
831 env->ptr[env->used++] = start; in parse_binpath()
835 env->ptr = malloc(env->size * sizeof(*env->ptr)); in parse_binpath()
838 env->ptr = realloc(env->ptr, env->size * sizeof(*env->ptr)); in parse_binpath()
842 env->ptr[env->used++] = NULL; in parse_binpath()
876 strcpy(fcgi_addr_un.sun_path, proc->unixsocket->ptr); in fcgi_spawn_connection()
907 if (NULL == (he = gethostbyname(host->host->ptr))) { in fcgi_spawn_connection()
956 unlink(proc->unixsocket->ptr); in fcgi_spawn_connection()
999 env.ptr = NULL; in fcgi_spawn_connection()
1003 arg.ptr = NULL; in fcgi_spawn_connection()
1024 if (NULL != (ge = getenv(ds->value->ptr))) { in fcgi_spawn_connection()
1047 if (0 == strncmp(env.ptr[i], "PHP_FCGI_CHILDREN=", sizeof("PHP_FCGI_CHILDREN=") - 1)) break; in fcgi_spawn_connection()
1055 env.ptr[env.used] = NULL; in fcgi_spawn_connection()
1061 if (NULL != (c = strrchr(arg.ptr[0], '/'))) { in fcgi_spawn_connection()
1065 if (-1 == chdir(arg.ptr[0])) { in fcgi_spawn_connection()
1067 log_error_write(srv, __FILE__, __LINE__, "sss", "chdir failed:", strerror(errno), arg.ptr[0]); in fcgi_spawn_connection()
1075 execve(arg.ptr[0], arg.ptr, env.ptr); in fcgi_spawn_connection()
1432 if (strcmp(fcgi_mode->ptr, "responder") == 0) { in SETDEFAULTS_FUNC()
1434 } else if (strcmp(fcgi_mode->ptr, "authorizer") == 0) { in SETDEFAULTS_FUNC()
1599 env->ptr[env->used++] = ((key_len >> 24) & 0xff) | 0x80; in fcgi_env_add()
1600 env->ptr[env->used++] = (key_len >> 16) & 0xff; in fcgi_env_add()
1601 env->ptr[env->used++] = (key_len >> 8) & 0xff; in fcgi_env_add()
1602 env->ptr[env->used++] = (key_len >> 0) & 0xff; in fcgi_env_add()
1604 env->ptr[env->used++] = (key_len >> 0) & 0xff; in fcgi_env_add()
1608 env->ptr[env->used++] = ((val_len >> 24) & 0xff) | 0x80; in fcgi_env_add()
1609 env->ptr[env->used++] = (val_len >> 16) & 0xff; in fcgi_env_add()
1610 env->ptr[env->used++] = (val_len >> 8) & 0xff; in fcgi_env_add()
1611 env->ptr[env->used++] = (val_len >> 0) & 0xff; in fcgi_env_add()
1613 env->ptr[env->used++] = (val_len >> 0) & 0xff; in fcgi_env_add()
1616 memcpy(env->ptr + env->used, key, key_len); in fcgi_env_add()
1618 memcpy(env->ptr + env->used, val, val_len); in fcgi_env_add()
1664 strcpy(fcgi_addr_un.sun_path, proc->unixsocket->ptr); in fcgi_establish_connection()
1684 if (0 == inet_aton(host->host->ptr, &(fcgi_addr_in.sin_addr))) { in fcgi_establish_connection()
1762 if (0 != strcasecmp(ds->key->ptr, "CONTENT-TYPE")) { in fcgi_env_add_request_headers()
1770 if (light_isalpha(ds->key->ptr[j])) { in fcgi_env_add_request_headers()
1772 c = ds->key->ptr[j] & ~32; in fcgi_env_add_request_headers()
1773 } else if (light_isdigit(ds->key->ptr[j])) { in fcgi_env_add_request_headers()
1775 c = ds->key->ptr[j]; in fcgi_env_add_request_headers()
1777 srv->tmp_buf->ptr[srv->tmp_buf->used++] = c; in fcgi_env_add_request_headers()
1779 srv->tmp_buf->ptr[srv->tmp_buf->used++] = '\0'; in fcgi_env_add_request_headers()
1797 if (light_isalpha(ds->key->ptr[j])) { in fcgi_env_add_request_headers()
1799 c = ds->key->ptr[j] & ~32; in fcgi_env_add_request_headers()
1800 } else if (light_isdigit(ds->key->ptr[j])) { in fcgi_env_add_request_headers()
1802 c = ds->key->ptr[j]; in fcgi_env_add_request_headers()
1804 srv->tmp_buf->ptr[srv->tmp_buf->used++] = c; in fcgi_env_add_request_headers()
1806 srv->tmp_buf->ptr[srv->tmp_buf->used++] = '\0'; in fcgi_env_add_request_headers()
1861 if (con->server_name->ptr[0] == '[') { in fcgi_create_env()
1862 const char *colon = strstr(con->server_name->ptr, "]:"); in fcgi_create_env()
1863 if (colon) len = (colon + 1) - con->server_name->ptr; in fcgi_create_env()
1865 const char *colon = strchr(con->server_name->ptr, ':'); in fcgi_create_env()
1866 if (colon) len = colon - con->server_name->ptr; in fcgi_create_env()
1869 …FCGI_ENV_ADD_CHECK(fcgi_env_add(p->fcgi_env, CONST_STR_LEN("SERVER_NAME"), con->server_name->ptr, … in fcgi_create_env()
2001 if ('/' != host->strip_request_uri->ptr[host->strip_request_uri->used - 2]) { in fcgi_create_env()
2007 …0 == strncmp(con->request.orig_uri->ptr, host->strip_request_uri->ptr, host->strip_request_uri->us… in fcgi_create_env()
2011 con->request.orig_uri->ptr + (host->strip_request_uri->used - 2), in fcgi_create_env()
2042 buffer_append_memory(b, (const char *)p->fcgi_env->ptr, p->fcgi_env->used); in fcgi_create_env()
2140 buffer_append_memory(b, req_c->mem->ptr + req_c->offset, weHave); in fcgi_create_env()
2189 for (s = p->parse_response->ptr; NULL != (ns = strchr(s, '\n')); s = ns + 1) { in fcgi_response_parse()
2196 if (ns > p->parse_response->ptr && in fcgi_response_parse()
2413 buffer_copy_string_len(packet->b, c->mem->ptr + c->offset, weHave); in fastcgi_get_packet()
2415 buffer_append_string_len(packet->b, c->mem->ptr + c->offset, weHave); in fastcgi_get_packet()
2435 header = (FCGI_Header *)(packet->b->ptr); in fastcgi_get_packet()
2453 buffer_append_string_len(packet->b, c->mem->ptr + c->offset + offset, weHave); in fastcgi_get_packet()
2467 packet->b->ptr[packet->b->used - 1] = '\0'; in fastcgi_get_packet()
2521 if (-1 == (r = read(hctx->fd, b->ptr, toread))) { in fcgi_demux_response()
2541 b->ptr[b->used - 1] = '\0'; in fcgi_demux_response()
2589 blen = hctx->response_header->used - (c - hctx->response_header->ptr) - 4; in fcgi_demux_response()
2590 hctx->response_header->used = (c - hctx->response_header->ptr) + 3; in fcgi_demux_response()
2593 blen = hctx->response_header->used - (c - hctx->response_header->ptr) - 2; in fcgi_demux_response()
2594 hctx->response_header->used = c - hctx->response_header->ptr + 2; in fcgi_demux_response()
2669 http_chunk_append_mem(srv, con, packet.b->ptr, packet.b->used); in fcgi_demux_response()
3498 if (0 == strncmp(fn->ptr + s_len - ct_len, ds->key->ptr, ct_len)) { in fcgi_check_extension()
3529 if (ext->key->ptr[0] == '/') { in fcgi_check_extension()
3531 (strncmp(con->uri.path->ptr, ext->key->ptr, ct_len) == 0)) { in fcgi_check_extension()
3535 … } else if ((ct_len <= s_len) && (0 == strncmp(fn->ptr + s_len - ct_len, ext->key->ptr, ct_len))) { in fcgi_check_extension()
3643 … if (host->fix_root_path_name && extension->key->ptr[0] == '/' && extension->key->ptr[1] == '\0') { in fcgi_check_extension()
3644 buffer_copy_string(con->request.pathinfo, con->uri.path->ptr); in fcgi_check_extension()
3646 con->uri.path->ptr[con->uri.path->used - 1] = '\0'; in fcgi_check_extension()
3647 } else if (extension->key->ptr[0] == '/' && in fcgi_check_extension()
3649 NULL != (pathinfo = strchr(con->uri.path->ptr + extension->key->used - 1, '/'))) { in fcgi_check_extension()
3655 con->uri.path->ptr[con->uri.path->used - 1] = '\0'; in fcgi_check_extension()