alloc.c: if (arr->nelts == arr->nalloc) { alloc.c: int new_size = (arr->nalloc <= 0) ? 1 : arr->nalloc * 2; alloc.c: new_data = ap_pcalloc(arr->pool, arr->elt_size * new_size); alloc.c: memcpy(new_data, arr->elts, arr->nalloc * arr->elt_size); alloc.c: arr->elts = new_data; alloc.c: arr->nalloc = new_size; alloc.c: ++arr->nelts; alloc.c: return arr->elts + (arr->elt_size * (arr->nelts - 1)); alloc.c: array_header *res = ap_make_array(p, arr->nalloc, arr->elt_size); alloc.c: memcpy(res->elts, arr->elts, arr->elt_size * arr->nelts); alloc.c: res->nelts = arr->nelts; alloc.c: res->elts = arr->elts; alloc.c: res->elt_size = arr->elt_size; alloc.c: res->nelts = arr->nelts; alloc.c: res->nalloc = arr->nelts; /* Force overflow on push */ alloc.c: if (arr->nelts <= 0 || arr->elts == NULL) /* Empty table? */ alloc.c: for (i = 0, strpp = (char **) arr->elts; ; ++strpp) { alloc.c: if (++i >= arr->nelts) alloc.c: for (i = 0, strpp = (char **) arr->elts; ; ++strpp) { alloc.c: if (++i >= arr->nelts) http_config.c:/* Dealing with config vectors. These are associated with per-directory, http_config.c: * per-server, and per-request configuration, and have a void* pointer for http_config.c: * per-directory and per-server structures, and to merge the per-directory http_config.c: if (r->handler) { http_config.c: handler = r->handler; http_config.c: handler = r->content_type ? r->content_type : ap_default_type(r); http_config.c: if (result == HTTP_INTERNAL_SERVER_ERROR && r->handler) { http_config.c: "handler \"%s\" not found for: %s", r->handler, r->filename); http_config.c: * per-dir and per-server configurations are invalid. So we should http_config.c: void *sconfig = ap_get_module_config(parms->server->module_config, mod); http_config.c: ap_set_module_config(parms->server->module_config, mod, sconfig); http_config.c: for (cache = r->htaccess; cache != NULL; cache = cache->next) http_config.c: parms.pool = r->pool; http_config.c: parms.temp_pool = r->pool; http_config.c: parms.server = r->server; http_config.c: parms.path = ap_pstrdup(r->pool, d); http_config.c: filename = ap_make_full_path(r->pool, d, http_config.c: ap_getword_conf(r->pool, &access_name)); http_config.c: if ((f = ap_pcfg_openfile(r->pool, filename)) != NULL) { http_config.c: dc = ap_create_per_dir_config(r->pool); http_config.c: ap_table_setn(r->notes, "error-notes", http_config.c: new = ap_palloc(r->pool, sizeof(struct htaccess_result)); http_config.c: new->next = r->htaccess; http_config.c: r->htaccess = new; http_config.c: s->error_log = main_server->error_log; http_config.c: s->loglevel = main_server->loglevel; http_config.c: s->port = main_server->port; http_config.c: s->limit_req_line = main_server->limit_req_line; http_config.c: s->limit_req_fieldsize = main_server->limit_req_fieldsize; http_config.c: s->limit_req_fields = main_server->limit_req_fields; http_config.c: for (virt = main_server->next; virt; virt = virt->next) { http_config.c: merge_server_configs(p, main_server->module_config, http_config.c: ap_merge_per_dir_configs(p, main_server->lookup_defaults, http_config.c: virt->server_admin = main_server->server_admin; http_config.c: virt->srm_confname = main_server->srm_confname; http_config.c: virt->access_confname = main_server->access_confname; http_config.c: virt->timeout = main_server->timeout; http_config.c: virt->keep_alive_timeout = main_server->keep_alive_timeout; http_config.c: virt->keep_alive = main_server->keep_alive; http_config.c: virt->keep_alive_max = main_server->keep_alive_max; http_config.c: virt->send_buffer_size = main_server->send_buffer_size; http_config.c: /* All server-wide config files now have the SAME syntax... */ http_config.c: * but module doesn't support per-dir configuration */ http_config.c: printf(" [no per-dir config]"); Binary file http_config.o matches http_core.c:/* Add per-directory configuration entry (for section); http_core.c: (core_dir_config *)ap_get_module_config(r->per_dir_config, &core_module); http_core.c: conf = (core_dir_config *)ap_get_module_config(r->per_dir_config, http_core.c: conf = (core_dir_config *)ap_get_module_config(r->per_dir_config, http_core.c: conf = (core_dir_config *)ap_get_module_config(r->per_dir_config, http_core.c: conf = (core_dir_config *)ap_get_module_config(r->per_dir_config, http_core.c: conf = (core_server_config *)ap_get_module_config(r->server->module_config, http_core.c: conf = (core_dir_config *)ap_get_module_config(r->per_dir_config, http_core.c: conf = (core_dir_config *)ap_get_module_config(r->per_dir_config, http_core.c: conf = (core_dir_config *)ap_get_module_config(r->per_dir_config, http_core.c: for (haddr = hptr->h_addr_list; *haddr; haddr++) { http_core.c: conn->remote_host = ap_pstrdup(conn->pool, (void *)hptr->h_name); http_core.c: if (r->connection->remote_logname != NULL) { http_core.c: return r->connection->remote_logname; http_core.c: dir_conf = (core_dir_config *)ap_get_module_config(r->per_dir_config, http_core.c: return ap_rfc1413(r->connection, r->server); http_core.c: conn_rec *conn = r->connection; http_core.c: d = (core_dir_config *)ap_get_module_config(r->per_dir_config, http_core.c: return r->hostname ? r->hostname : r->server->server_hostname; http_core.c: (void *)hptr->h_name); http_core.c: r->server->server_hostname); http_core.c: return r->server->server_hostname; http_core.c: (core_dir_config *)ap_get_module_config(r->per_dir_config, &core_module); http_core.c: port = r->server->port ? r->server->port : ap_default_port(r); http_core.c: return r->hostname ? ntohs(r->connection->local_addr.sin_port) http_core.c: (core_dir_config *)ap_get_module_config(r->per_dir_config, &core_module); http_core.c: d = (core_dir_config *)ap_get_module_config(r->per_dir_config, http_core.c: exename = strrchr(r->filename, '/'); http_core.c: exename = strrchr(r->filename, '\\'); http_core.c: exename = r->filename; http_core.c: *interpreter = get_interpreter_from_win32_registry(r->pool, ext); http_core.c: ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, r->server, http_core.c: hFile = CreateFile(r->filename, GENERIC_READ, FILE_SHARE_READ, NULL, http_core.c: "ReadFile(%s) failed", r->filename); http_core.c: *interpreter = ap_pstrdup(r->pool, buffer + i ); http_core.c: if ((nBytesRead >= sizeof(IMAGE_DOS_HEADER)) && (hdr->e_magic == IMAGE_DOS_SIGNATURE)) { http_core.c: if (hdr->e_lfarlc < 0x40) http_core.c: if ((forbidden & NOT_IN_VIRTUALHOST) && cmd->server->is_virtual) { http_core.c: void *sconf = cmd->server->module_config; http_core.c: void *sconf = cmd->server->module_config; http_core.c: void *sconf = cmd->server->module_config; http_core.c: if (cmd->server->is_virtual) { http_core.c: ap_get_module_config(r->per_dir_config, &core_module); http_core.c: ap_pcalloc(r->pool, http_core.c: ap_pstrdup(r->pool, string) : ap_pstrcat(r->pool, "\"", string, NULL); http_core.c: r->requirement = ap_pstrdup(cmd->pool, arg); http_core.c: r->method_mask = cmd->limited; http_core.c: if (main_server->is_virtual) { http_core.c: s->next = main_server->next; http_core.c: main_server->next = s; http_core.c: if (!cmd->server->names) { http_core.c: item = (char **)ap_push_array(cmd->server->wild_names); http_core.c: item = (char **)ap_push_array(cmd->server->names); http_core.c: cmd->server->port = port; http_core.c: cmd->server->send_buffer_size = s; http_core.c: cmd->server->server_uid = ap_user_id = 1; http_core.c: if (!cmd->server->is_virtual) { http_core.c: cmd->server->server_uid = ap_user_id = ap_uname2id(arg); http_core.c: cmd->server->server_uid = ap_uname2id(arg); http_core.c: cmd->server->server_uid = ap_user_id; http_core.c: if (cmd->server->server_uid == 0) { http_core.c: if (!cmd->server->is_virtual) { http_core.c: cmd->server->server_gid = ap_group_id = ap_gname2id(arg); http_core.c: cmd->server->server_gid = ap_gname2id(arg); http_core.c: cmd->server->server_gid = ap_group_id; http_core.c: cmd->server->timeout = atoi(arg); http_core.c: cmd->server->keep_alive_timeout = atoi(arg); http_core.c: cmd->server->keep_alive = 0; http_core.c: cmd->server->keep_alive = 1; http_core.c: cmd->server->keep_alive_max = atoi(arg); http_core.c: if (cmd->server->is_virtual) { http_core.c: cmd->server->path = arg; http_core.c: cmd->server->pathlen = strlen(arg); http_core.c: cmd->server->loglevel = APLOG_EMERG; http_core.c: cmd->server->loglevel = APLOG_ALERT; http_core.c: cmd->server->loglevel = APLOG_CRIT; http_core.c: cmd->server->loglevel = APLOG_ERR; http_core.c: cmd->server->loglevel = APLOG_WARNING; http_core.c: cmd->server->loglevel = APLOG_NOTICE; http_core.c: cmd->server->loglevel = APLOG_INFO; http_core.c: cmd->server->loglevel = APLOG_DEBUG; http_core.c: conf = (core_dir_config *)ap_get_module_config(r->per_dir_config, http_core.c: return ap_pstrcat(r->pool, prefix, "
" SERVER_BASEVERSION http_core.c: r->server->server_admin, "\">", http_core.c: return ap_pstrcat(r->pool, prefix, "
" SERVER_BASEVERSION http_core.c: cmd->server->limit_req_line = lim; http_core.c: cmd->server->limit_req_fieldsize = lim; http_core.c: cmd->server->limit_req_fields = lim; http_core.c: "Name(s) of per-directory config files (default: .htaccess)" }, http_core.c: "Controls what groups of directives can be configured by per-directory " http_core.c: "Common directory of server-related files (logs, confs, etc.)" }, http_core.c: void *sconf = r->server->module_config; http_core.c: if (r->proxyreq) { http_core.c: if ((r->uri[0] != '/') && strcmp(r->uri, "*")) { http_core.c: "Invalid URI in request %s", r->the_request); http_core.c: if (r->server->path http_core.c: && !strncmp(r->uri, r->server->path, r->server->pathlen) http_core.c: && (r->server->path[r->server->pathlen - 1] == '/' http_core.c: || r->uri[r->server->pathlen] == '/' http_core.c: || r->uri[r->server->pathlen] == '\0')) { http_core.c: r->filename = ap_pstrcat(r->pool, conf->ap_document_root, http_core.c: (r->uri + r->server->pathlen), NULL); http_core.c: && (*(r->uri) == '/')) { http_core.c: r->filename = ap_pstrcat(r->pool, conf->ap_document_root, r->uri+1, http_core.c: r->filename = ap_pstrcat(r->pool, conf->ap_document_root, r->uri, http_core.c: (core_dir_config *)ap_get_module_config(r->per_dir_config, &core_module); http_core.c: r->allowed |= (1 << M_GET) | (1 << M_OPTIONS); http_core.c: if (r->method_number == M_INVALID) { http_core.c: "Invalid method in request %s", r->the_request); http_core.c: if (r->method_number == M_OPTIONS) { http_core.c: if (r->method_number == M_PUT) { http_core.c: if (r->finfo.st_mode == 0 || (r->path_info && *r->path_info)) { http_core.c: if (r->path_info == NULL) { http_core.c: emsg = ap_pstrcat(r->pool, emsg, r->filename, NULL); http_core.c: emsg = ap_pstrcat(r->pool, emsg, r->filename, r->path_info, NULL); http_core.c: if (r->method_number != M_GET) { http_core.c: f = ap_pfopen(r->pool, r->filename, "rb"); http_core.c: f = ap_pfopen(r->pool, r->filename, "r"); http_core.c: "file permissions deny server access: %s", r->filename); http_core.c: printf("File: %s is %8ld bytes\n", r->filename, r->finfo.st_size); http_core.c: ap_update_mtime(r, r->finfo.st_mtime); http_core.c: ap_table_setn(r->headers_out, "Accept-Ranges", "bytes"); http_core.c: || (errstatus = ap_set_content_length(r, r->finfo.st_size))) { http_core.c: if ((r->finfo.st_size >= MMAP_THRESHOLD) http_core.c: && (r->finfo.st_size < MMAP_LIMIT) http_core.c: && (!r->header_only || (d->content_md5 & 1))) { http_core.c: mm = mmap(NULL, r->finfo.st_size, PROT_READ, MAP_PRIVATE, http_core.c: "default_handler: mmap failed: %s", r->filename); http_core.c: ap_table_setn(r->headers_out, "Content-MD5", http_core.c: ap_md5digest(r->pool, f, convert_flag)); http_core.c: ap_table_setn(r->headers_out, "Content-MD5", http_core.c: ap_md5digest(r->pool, f)); http_core.c: if (!r->header_only) { http_core.c: ap_log_error(APLOG_MARK, APLOG_ERR, r->server, http_core.c: mmd = ap_palloc(r->pool, sizeof(*mmd)); http_core.c: mmd->length = r->finfo.st_size; http_core.c: ap_register_cleanup(r->pool, (void *)mmd, mmap_cleanup, mmap_cleanup); http_core.c: ap_MD5Update(&context, (void *)mm, (unsigned int)r->finfo.st_size); http_core.c: ap_table_setn(r->headers_out, "Content-MD5", http_core.c: ap_md5contextTo64(r->pool, &context)); http_core.c: if (!r->header_only) { http_core.c: ap_send_mmap(mm, r, 0, r->finfo.st_size); http_core.c: ap_pfclose(r->pool, f); http_core.c: create_core_dir_config, /* create per-directory config structure */ http_core.c: merge_core_dir_configs, /* merge per-directory config structures */ http_core.c: create_core_server_config, /* create per-server config structure */ http_core.c: merge_core_server_configs, /* merge per-server config structures */ Binary file http_core.o matches http_log.c: "[client %s] ", r->connection->remote_ip); http_log.c: log_error_core(file, line, level, r->server, r, fmt, args); http_log.c: * something, even an empty string, into the "error-notes" cell http_log.c: && (ap_table_get(r->notes, "error-notes") == NULL)) { http_log.c: ap_table_setn(r->notes, "error-notes", http_log.c: ap_pvsprintf(r->pool, fmt, args)); http_log.c: ap_log_error(APLOG_MARK, APLOG_ERR, r->server, http_log.c: ap_get_remote_host(r->connection, r->per_dir_config, REMOTE_NAME), Binary file http_log.o matches http_main.c:static pool *plog; /* Pool for error-logging files */ http_main.c:static pool *ptrans; /* Pool for per-transaction stuff */ http_main.c: dirconf = current_conn->server->lookup_defaults; http_main.c: i = ap_set_callback_and_alarm(alarm_fn, r->server->timeout); http_main.c: if (r->connection->keptalive) http_main.c: to = r->server->keep_alive_timeout; http_main.c: to = r->server->timeout; http_main.c: ap_set_callback_and_alarm(timeout, r->server->timeout); http_main.c: ap_set_callback_and_alarm(timeout, r->server->timeout); http_main.c: if (ap_bflush(r->connection->client) == -1) { http_main.c: ap_bclose(r->connection->client); http_main.c: ap_bsetflag(r->connection->client, B_EOUT, 1); http_main.c: lsd = r->connection->client->fd; http_main.c: if ((shutdown(lsd, 1) != 0) || r->connection->aborted) { http_main.c: ap_bclose(r->connection->client); http_main.c: ap_bclose(r->connection->client); http_main.c: ocr->pid = pid; http_main.c: ocr->maintenance = maintenance; http_main.c: ocr->data = data; http_main.c: ocr->write_fd = write_fd; http_main.c: ocr->next = other_children; http_main.c: * by loading ocr->next before calling any maintenance function. http_main.c: for (ocr = other_children; ocr; ocr = ocr->next) { http_main.c: if (ocr->write_fd == -1) http_main.c: FD_SET(ocr->write_fd, &writable_fds); http_main.c: if (ocr->write_fd > fd_max) { http_main.c: fd_max = ocr->write_fd; http_main.c: nocr = ocr->next; http_main.c: if (ocr->write_fd == -1) http_main.c: if (FD_ISSET(ocr->write_fd, &writable_fds)) http_main.c: (*ocr->maintenance) (OC_REASON_UNWRITABLE, ocr->data, -1); http_main.c: nocr = ocr->next; http_main.c: if (ocr->pid != pid) http_main.c: ocr->pid = -1; http_main.c: (*ocr->maintenance) (OC_REASON_DEATH, ocr->data, status); http_main.c: conn_rec *c = r->connection; http_main.c: ap_cpystrn(ss->client, ap_get_remote_host(c, r->per_dir_config, http_main.c: if (r->the_request == NULL) { http_main.c: } else if (r->parsed_uri.password == NULL) { http_main.c: ap_cpystrn(ss->request, r->the_request, sizeof(ss->request)); http_main.c: /* Don't reveal the password in the server-status view */ http_main.c: ap_cpystrn(ss->request, ap_pstrcat(r->pool, r->method, " ", http_main.c: ap_unparse_uri_components(r->pool, &r->parsed_uri, UNP_OMITPASSWORD), http_main.c: r->assbackwards ? NULL : " ", r->protocol, NULL), http_main.c: ss->vhostrec = r->server; http_main.c: if (r->sent_bodyct) http_main.c: ap_bgetopt(r->connection->client, BO_BYTECT, &bs); http_main.c: nocr = ocr->next; http_main.c: if (ocr->pid == -1) http_main.c: waitret = waitpid(ocr->pid, &status, WNOHANG); http_main.c: if (waitret == ocr->pid) { http_main.c: ocr->pid = -1; http_main.c: (*ocr->maintenance) (OC_REASON_DEATH, ocr->data, status); http_main.c: (*ocr->maintenance) (OC_REASON_RESTART, ocr->data, -1); http_main.c: ocr->pid = -1; http_main.c: (*ocr->maintenance) (OC_REASON_LOST, ocr->data, -1); http_main.c: ap_sys_siglist[SIGPWR] = "Power-fail restart"; http_main.c: if (server->sin_addr.s_addr != htonl(INADDR_ANY)) http_main.c: inet_ntoa(server->sin_addr), ntohs(server->sin_port)); http_main.c: ap_snprintf(addr, sizeof(addr), "port %d", ntohs(server->sin_port)); http_main.c: if (ntohs(server->sin_port) < 1024) http_main.c: if (ntohs(server->sin_port) < 1024) http_main.c: if (ntohs(server->sin_port) < 1024) http_main.c: ap_kill_cleanups_for_socket(p, nr->fd); http_main.c: nr->next = old_listeners; http_main.c: ap_assert(!nr->used); http_main.c: lr = lr->next; http_main.c: for (or = old_listeners; or; or = or->next) { http_main.c: if (!memcmp(&or->local_addr, &lr->local_addr, sizeof(or->local_addr))) { http_main.c: or->used = 1; http_main.c: return or->fd; http_main.c: next = or->next; http_main.c: if (!or->used) http_main.c: closesocket(or->fd); http_main.c: fd = make_sock(p, &lr->local_addr); http_main.c: lr->fd = fd; http_main.c: if (lr->next == NULL) http_main.c: lr = lr->next; http_main.c: lr->next = ap_listeners; http_main.c: if (FD_ISSET(lr->fd, main_fds)) { http_main.c: head_listener = lr->next; http_main.c: lr = lr->next; http_main.c: r->connection->keepalive = 0; http_main.c: sd = lr->fd; http_main.c: * lead to never-ending loops here. So it seems best http_main.c: if (r->status == HTTP_OK) http_main.c: ap_destroy_pool(r->pool); http_main.c: if (r && r->connection http_main.c: && !r->connection->aborted http_main.c: && r->connection->client http_main.c: && (r->connection->client->fd >= 0)) { http_main.c: lr->fd = input_parms->listeners[count]; http_main.c: if(lr->fd >= 0) { http_main.c: FD_SET(lr->fd, &listenfds); http_main.c: if(lr->fd > listenmaxfd) http_main.c: listenmaxfd = lr->fd; http_main.c: if(lr->next == NULL) http_main.c: lr = lr->next; http_main.c: lr->next = ap_listeners; http_main.c: head_listener = head_listener->next; http_main.c: /* we're still doing a 1-for-1 replacement of dead http_main.c: if (r->status == HTTP_OK) http_main.c: ap_destroy_pool(r->pool); http_main.c: if (r->status == HTTP_OK) http_main.c: ap_destroy_pool(r->pool); http_main.c: if (r && r->connection http_main.c: && !r->connection->aborted http_main.c: && r->connection->client http_main.c: && (r->connection->client->fd >= 0)) { http_main.c: lr->fd = fd; http_main.c: if (lr->next == NULL) http_main.c: lr = lr->next; http_main.c: lr->next = ap_listeners; http_main.c: sd = lr->fd; http_main.c: "Parent: Duplicating socket %d and sending it to child process %d", lr->fd, pi.dwProcessId); http_main.c: if (WSADuplicateSocket(lr->fd, http_main.c: "Parent: WSADuplicateSocket failed for socket %d.", lr->fd ); http_main.c: "Parent: Unable to write duplicated socket %d to the child.", lr->fd ); http_main.c: lr = lr->next; Binary file http_main.o matches http_protocol.c: do { if (r->sent_bodyct) \ http_protocol.c: ap_bgetopt (r->connection->client, BO_BYTECT, &r->bytes_sent); \ http_protocol.c: if (!r->clength || r->assbackwards) http_protocol.c: if (!(range = ap_table_get(r->headers_in, "Range"))) http_protocol.c: range = ap_table_get(r->headers_in, "Request-Range"); http_protocol.c: if ((if_range = ap_table_get(r->headers_in, "If-Range"))) { http_protocol.c: if (!(match = ap_table_get(r->headers_out, "Etag")) || http_protocol.c: else if (!(match = ap_table_get(r->headers_out, "Last-Modified")) || http_protocol.c: if (!parse_byterange(ap_pstrdup(r->pool, range + 6), r->clength, http_protocol.c: r->byterange = 1; http_protocol.c: ap_table_setn(r->headers_out, "Content-Range", http_protocol.c: ap_psprintf(r->pool, "bytes %ld-%ld/%ld", http_protocol.c: range_start, range_end, r->clength)); http_protocol.c: ap_table_setn(r->headers_out, "Content-Length", http_protocol.c: ap_psprintf(r->pool, "%ld", range_end - range_start + 1)); http_protocol.c: const char *r_range = ap_pstrdup(r->pool, range + 6); http_protocol.c: r->byterange = 2; http_protocol.c: r->boundary = ap_psprintf(r->pool, "%lx%lx", http_protocol.c: r->request_time, (long) getpid()); http_protocol.c: ap_table_setn(r->headers_out, "Content-Length", http_protocol.c: ap_psprintf(r->pool, "%ld", tlength)); http_protocol.c: r->status = PARTIAL_CONTENT; http_protocol.c: r->range = range + 6; http_protocol.c: return internal_byterange(1, NULL, r, &r->range, offset, length); http_protocol.c: if (r->byterange > 1) { http_protocol.c: ap_rvputs(r, "\015\012--", r->boundary, "--\015\012", NULL); http_protocol.c: *tlength += 4 + strlen(r->boundary) + 4; http_protocol.c: range = ap_getword(r->pool, r_range, ','); http_protocol.c: if (!parse_byterange(range, r->clength, &range_start, &range_end)) http_protocol.c: if (r->byterange > 1) { http_protocol.c: const char *ct = r->content_type ? r->content_type : ap_default_type(r); http_protocol.c: r->clength); http_protocol.c: ap_rvputs(r, "\015\012--", r->boundary, "\015\012Content-type: ", http_protocol.c: *tlength += 4 + strlen(r->boundary) + 16 + strlen(ct) + 23 + http_protocol.c: r->clength = clength; http_protocol.c: ap_table_setn(r->headers_out, "Content-Length", ap_psprintf(r->pool, "%ld", clength)); http_protocol.c: int wimpy = ap_find_token(r->pool, http_protocol.c: ap_table_get(r->headers_out, "Connection"), "close"); http_protocol.c: const char *conn = ap_table_get(r->headers_in, "Connection"); http_protocol.c: * body should use the HTTP/1.1 chunked transfer-coding. In English, http_protocol.c: * having defined Content-Length or Transfer-Encoding: chunked, or http_protocol.c: * as chunked [we know the (r->chunked = 1) side-effect is ugly]; http_protocol.c: * and the server configuration has a reasonable inter-request timeout; http_protocol.c: if ((r->connection->keepalive != -1) && http_protocol.c: ((r->status == HTTP_NOT_MODIFIED) || http_protocol.c: (r->status == HTTP_NO_CONTENT) || http_protocol.c: r->header_only || http_protocol.c: ap_table_get(r->headers_out, "Content-Length") || http_protocol.c: ap_find_last_token(r->pool, http_protocol.c: ap_table_get(r->headers_out, "Transfer-Encoding"), http_protocol.c: ((r->proto_num >= HTTP_VERSION(1,1)) && http_protocol.c: (r->chunked = 1))) && /* THIS CODE IS CORRECT, see comment above. */ http_protocol.c: r->server->keep_alive && http_protocol.c: (r->server->keep_alive_timeout > 0) && http_protocol.c: ((r->server->keep_alive_max == 0) || http_protocol.c: (r->server->keep_alive_max > r->connection->keepalives)) && http_protocol.c: !ap_status_drops_connection(r->status) && http_protocol.c: !ap_find_token(r->pool, conn, "close") && http_protocol.c: (!ap_table_get(r->subprocess_env, "nokeepalive") || http_protocol.c: ap_table_get(r->headers_in, "Via")) && http_protocol.c: ((ka_sent = ap_find_token(r->pool, conn, "keep-alive")) || http_protocol.c: (r->proto_num >= HTTP_VERSION(1,1))) http_protocol.c: int left = r->server->keep_alive_max - r->connection->keepalives; http_protocol.c: r->connection->keepalive = 1; http_protocol.c: r->connection->keepalives++; http_protocol.c: if (r->server->keep_alive_max) http_protocol.c: ap_table_setn(r->headers_out, "Keep-Alive", http_protocol.c: ap_psprintf(r->pool, "timeout=%d, max=%d", http_protocol.c: r->server->keep_alive_timeout, left)); http_protocol.c: ap_table_setn(r->headers_out, "Keep-Alive", http_protocol.c: ap_psprintf(r->pool, "timeout=%d", http_protocol.c: r->server->keep_alive_timeout)); http_protocol.c: ap_table_mergen(r->headers_out, "Connection", "Keep-Alive"); http_protocol.c: ap_table_mergen(r->headers_out, "Connection", "close"); http_protocol.c: r->connection->keepalive = 0; http_protocol.c: now = (mtime < r->request_time) ? r->request_time : time(NULL); http_protocol.c: const char *etag = ap_table_get(r->headers_out, "ETag"); http_protocol.c: if (!ap_is_HTTP_SUCCESS(r->status) || r->no_local_copy) { http_protocol.c: mtime = (r->mtime != 0) ? r->mtime : time(NULL); http_protocol.c: if ((if_match = ap_table_get(r->headers_in, "If-Match")) != NULL) { http_protocol.c: !ap_find_list_item(r->pool, if_match, etag))) { http_protocol.c: if_unmodified = ap_table_get(r->headers_in, "If-Unmodified-Since"); http_protocol.c: if_nonematch = ap_table_get(r->headers_in, "If-None-Match"); http_protocol.c: if (r->method_number == M_GET) { http_protocol.c: if (ap_table_get(r->headers_in, "Range")) { http_protocol.c: ap_find_list_item(r->pool, if_nonematch, etag)) { http_protocol.c: ap_find_list_item(r->pool, if_nonematch, etag))) { http_protocol.c: else if ((r->method_number == M_GET) http_protocol.c: ap_table_get(r->headers_in, "If-Modified-Since")) != NULL)) { http_protocol.c: if ((ims >= mtime) && (ims <= r->request_time)) { http_protocol.c: weak = ((r->request_time - r->mtime > 1) && !force_weak) ? "" : "W/"; http_protocol.c: if (r->finfo.st_mode != 0) { http_protocol.c: etag = ap_psprintf(r->pool, http_protocol.c: (unsigned long) r->finfo.st_ino, http_protocol.c: (unsigned long) r->finfo.st_size, http_protocol.c: (unsigned long) r->mtime); http_protocol.c: etag = ap_psprintf(r->pool, "%s\"%lx\"", weak, http_protocol.c: (unsigned long) r->mtime); http_protocol.c: if (!r->vlist_validator) { http_protocol.c: vlv = r->vlist_validator; http_protocol.c: etag = ap_pstrcat(r->pool, variant_etag, ";", vlv, NULL); http_protocol.c: ap_table_setn(r->headers_out, "ETag", etag); http_protocol.c: time_t mod_time = ap_rationalize_mtime(r, r->mtime); http_protocol.c: ap_table_setn(r->headers_out, "Last-Modified", http_protocol.c: ap_gm_timestr_822(r->pool, mod_time)); http_protocol.c: * - sets r->args to rest after '?' (or NULL if no '?') http_protocol.c: * - sets r->uri to request uri (without r->args part) http_protocol.c: * - sets r->hostname (if not set already) from request (scheme://host:port) http_protocol.c: r->unparsed_uri = ap_pstrdup(r->pool, uri); http_protocol.c: if (r->method_number == M_CONNECT) { http_protocol.c: status = ap_parse_hostinfo_components(r->pool, uri, &r->parsed_uri); http_protocol.c: status = ap_parse_uri_components(r->pool, uri, &r->parsed_uri); http_protocol.c: if (r->parsed_uri.scheme http_protocol.c: && !strcasecmp(r->parsed_uri.scheme, ap_http_method(r))) { http_protocol.c: r->hostname = r->parsed_uri.hostname; http_protocol.c: } else if (r->method_number == M_CONNECT) { http_protocol.c: r->hostname = r->parsed_uri.hostname; http_protocol.c: r->args = r->parsed_uri.query; http_protocol.c: r->uri = r->parsed_uri.path ? r->parsed_uri.path http_protocol.c: : ap_pstrdup(r->pool, "/"); http_protocol.c: for (x = r->uri; (x = strchr(x, '\\')) != NULL; ) http_protocol.c: r->args = NULL; http_protocol.c: r->hostname = NULL; http_protocol.c: r->status = status; /* set error status */ http_protocol.c: r->uri = ap_pstrdup(r->pool, uri); http_protocol.c: conn_rec *conn = r->connection; http_protocol.c: r->request_time = time(0); http_protocol.c: r->request_time = time(NULL); http_protocol.c: r->the_request = ap_pstrdup(r->pool, l); http_protocol.c: r->method = ap_getword_white(r->pool, &ll); http_protocol.c: uri = ap_getword_white(r->pool, &ll); http_protocol.c: r->method_number = ap_method_number_of(r->method); http_protocol.c: if (r->method_number == M_GET && r->method[0] == 'H') { http_protocol.c: r->header_only = 1; http_protocol.c: if (len > r->server->limit_req_line) { http_protocol.c: r->status = HTTP_REQUEST_URI_TOO_LARGE; http_protocol.c: r->proto_num = HTTP_VERSION(1,0); http_protocol.c: r->protocol = ap_pstrdup(r->pool, "HTTP/1.0"); http_protocol.c: r->assbackwards = (ll[0] == '\0'); http_protocol.c: r->protocol = ap_pstrdup(r->pool, ll[0] ? ll : "HTTP/0.9"); http_protocol.c: if (2 == sscanf(r->protocol, "HTTP/%u.%u", &major, &minor) http_protocol.c: r->proto_num = HTTP_VERSION(major, minor); http_protocol.c: r->proto_num = HTTP_VERSION(1,0); http_protocol.c: conn_rec *c = r->connection; http_protocol.c: /* We'll use ap_overlap_tables later to merge these into r->headers_in. */ http_protocol.c: tmp_headers = ap_make_table(r->pool, 50); http_protocol.c: if (r->server->limit_req_fields && http_protocol.c: (++fields_read > r->server->limit_req_fields)) { http_protocol.c: r->status = HTTP_BAD_REQUEST; http_protocol.c: ap_table_setn(r->notes, "error-notes", http_protocol.c: if (len > r->server->limit_req_fieldsize) { http_protocol.c: r->status = HTTP_BAD_REQUEST; http_protocol.c: ap_table_setn(r->notes, "error-notes", ap_pstrcat(r->pool, http_protocol.c: copy = ap_palloc(r->pool, len + 1); http_protocol.c: r->status = HTTP_BAD_REQUEST; /* or abort the bad request */ http_protocol.c: ap_table_setn(r->notes, "error-notes", ap_pstrcat(r->pool, http_protocol.c: ap_overlap_tables(r->headers_in, tmp_headers, AP_OVERLAP_TABLES_MERGE); http_protocol.c: r->pool = p; http_protocol.c: r->connection = conn; http_protocol.c: r->server = conn->server; http_protocol.c: r->headers_in = ap_make_table(r->pool, 50); http_protocol.c: r->subprocess_env = ap_make_table(r->pool, 50); http_protocol.c: r->headers_out = ap_make_table(r->pool, 12); http_protocol.c: r->err_headers_out = ap_make_table(r->pool, 5); http_protocol.c: r->notes = ap_make_table(r->pool, 5); http_protocol.c: r->request_config = ap_create_request_config(r->pool); http_protocol.c: r->per_dir_config = r->server->lookup_defaults; http_protocol.c: r->sent_bodyct = 0; /* bytect isn't for body */ http_protocol.c: r->read_length = 0; http_protocol.c: r->read_body = REQUEST_NO_BODY; http_protocol.c: r->status = HTTP_REQUEST_TIME_OUT; /* Until we get a request */ http_protocol.c: r->the_request = NULL; http_protocol.c: ap_bsetflag(r->connection->client, B_ASCII2EBCDIC|B_EBCDIC2ASCII, 1); http_protocol.c: if (r->status == HTTP_REQUEST_URI_TOO_LARGE) { http_protocol.c: if (!r->assbackwards) { http_protocol.c: if (r->status != HTTP_REQUEST_TIME_OUT) { http_protocol.c: if (r->header_only) { http_protocol.c: r->uri); http_protocol.c: r->header_only = 0; http_protocol.c: r->status = HTTP_BAD_REQUEST; http_protocol.c: r->status = HTTP_OK; /* Until further notice. */ http_protocol.c: r->per_dir_config = r->server->lookup_defaults; http_protocol.c: if ((!r->hostname && (r->proto_num >= HTTP_VERSION(1,1))) || http_protocol.c: ((r->proto_num == HTTP_VERSION(1,1)) && http_protocol.c: !ap_table_get(r->headers_in, "Host"))) { http_protocol.c: r->status = HTTP_BAD_REQUEST; http_protocol.c: "(see RFC2068 section 9, and 14.23): %s", r->uri); http_protocol.c: if (((expect = ap_table_get(r->headers_in, "Expect")) != NULL) && http_protocol.c: r->expecting_100 = 1; http_protocol.c: r->status = HTTP_EXPECTATION_FAILED; http_protocol.c: rnew->the_request = r->the_request; /* Keep original request-line */ http_protocol.c: rnew->headers_in = r->headers_in; http_protocol.c: rnew->subprocess_env = ap_copy_table(rnew->pool, r->subprocess_env); http_protocol.c: rnew->expecting_100 = r->expecting_100; http_protocol.c: rnew->read_length = r->read_length; http_protocol.c: ap_table_setn(r->err_headers_out, http_protocol.c: r->proxyreq ? "Proxy-Authenticate" : "WWW-Authenticate", http_protocol.c: ap_pstrcat(r->pool, "Basic realm=\"", ap_auth_name(r), "\"", http_protocol.c: ap_table_setn(r->err_headers_out, http_protocol.c: r->proxyreq ? "Proxy-Authenticate" : "WWW-Authenticate", http_protocol.c: ap_psprintf(r->pool, "Digest realm=\"%s\", nonce=\"%lu\"", http_protocol.c: ap_auth_name(r), r->request_time)); http_protocol.c: const char *auth_line = ap_table_get(r->headers_in, http_protocol.c: r->proxyreq ? "Proxy-Authorization" http_protocol.c: r, "need AuthName: %s", r->uri); http_protocol.c: if (strcasecmp(ap_getword(r->pool, &auth_line, ' '), "Basic")) { http_protocol.c: "client used wrong authentication scheme: %s", r->uri); http_protocol.c: t = ap_pbase64decode(r->pool, auth_line); http_protocol.c: /* Note that this allocation has to be made from r->connection->pool http_protocol.c: r->connection->user = ap_getword_nulls (r->connection->pool, &t, ':'); http_protocol.c: r->connection->ap_auth_type = "Basic"; http_protocol.c: int convert = ap_bgetflag(r->connection->client, B_EBCDIC2ASCII); http_protocol.c: if (r->assbackwards) http_protocol.c: if (!r->status_line) http_protocol.c: r->status_line = status_lines[ap_index_of_response(r->status)]; http_protocol.c: if (r->proxyreq http_protocol.c: || (r->proto_num == HTTP_VERSION(1,0) http_protocol.c: && ap_table_get(r->subprocess_env, "force-response-1.0"))) { http_protocol.c: r->connection->keepalive = -1; http_protocol.c: ap_bsetflag(r->connection->client, B_EBCDIC2ASCII, 1); http_protocol.c: ap_rvputs(r, protocol, " ", r->status_line, "\015\012", NULL); http_protocol.c: ap_send_header_field(r, "Date", ap_gm_timestr_822(r->pool, r->request_time)); http_protocol.c: ap_table_unset(r->headers_out, "Date"); /* Avoid bogosity */ http_protocol.c: ap_table_unset(r->headers_out, "Server"); http_protocol.c: ap_bsetflag(r->connection->client, B_EBCDIC2ASCII, convert); http_protocol.c: * It is more expensive to check the User-Agent than it is to just add the http_protocol.c: return 2 + ap_pstrcat(r->pool, http_protocol.c: (r->allowed & (1 << M_GET)) ? ", GET, HEAD" : "", http_protocol.c: (r->allowed & (1 << M_POST)) ? ", POST" : "", http_protocol.c: (r->allowed & (1 << M_PUT)) ? ", PUT" : "", http_protocol.c: (r->allowed & (1 << M_DELETE)) ? ", DELETE" : "", http_protocol.c: (r->allowed & (1 << M_CONNECT)) ? ", CONNECT" : "", http_protocol.c: (r->allowed & (1 << M_OPTIONS)) ? ", OPTIONS" : "", http_protocol.c: (r->allowed & (1 << M_PATCH)) ? ", PATCH" : "", http_protocol.c: (r->allowed & (1 << M_PROPFIND)) ? ", PROPFIND" : "", http_protocol.c: (r->allowed & (1 << M_PROPPATCH)) ? ", PROPPATCH" : "", http_protocol.c: (r->allowed & (1 << M_MKCOL)) ? ", MKCOL" : "", http_protocol.c: (r->allowed & (1 << M_COPY)) ? ", COPY" : "", http_protocol.c: (r->allowed & (1 << M_MOVE)) ? ", MOVE" : "", http_protocol.c: (r->allowed & (1 << M_LOCK)) ? ", LOCK" : "", http_protocol.c: (r->allowed & (1 << M_UNLOCK)) ? ", UNLOCK" : "", http_protocol.c: while (r->prev) http_protocol.c: r = r->prev; http_protocol.c: r->content_type = "message/http"; http_protocol.c: ap_rvputs(r, r->the_request, "\015\012", NULL); http_protocol.c: ap_send_header_field, (void *) r, r->headers_in, NULL); http_protocol.c: if (r->assbackwards) http_protocol.c: ap_table_setn(r->headers_out, "Content-Length", "0"); http_protocol.c: ap_table_setn(r->headers_out, "Allow", make_allow(r)); http_protocol.c: (void *) r, r->headers_out, NULL); http_protocol.c: terminate_header(r->connection->client); http_protocol.c: ap_bsetopt(r->connection->client, BO_BYTECT, &zero); http_protocol.c: * that the browser supports an older protocol. We also check User-Agent http_protocol.c: return (ap_table_get(r->headers_in, "Request-Range") || http_protocol.c: ((ua = ap_table_get(r->headers_in, "User-Agent")) http_protocol.c: varies = ap_make_array(r->pool, 5, sizeof(char *)); http_protocol.c: (void *) varies, r->headers_out, "Vary", NULL); http_protocol.c: ap_table_setn(r->headers_out, "Vary", http_protocol.c: ap_array_pstrcat(r->pool, varies, ',')); http_protocol.c: int convert = ap_bgetflag(r->connection->client, B_EBCDIC2ASCII); http_protocol.c: if (r->assbackwards) { http_protocol.c: if (!r->main) http_protocol.c: ap_bsetopt(r->connection->client, BO_BYTECT, &zero); http_protocol.c: r->sent_bodyct = 1; http_protocol.c: if (!ap_is_empty_table(r->err_headers_out)) http_protocol.c: r->headers_out = ap_overlay_tables(r->pool, r->err_headers_out, http_protocol.c: r->headers_out); http_protocol.c: if (ap_table_get(r->subprocess_env, "force-no-vary") != NULL) { http_protocol.c: ap_table_unset(r->headers_out, "Vary"); http_protocol.c: r->proto_num = HTTP_VERSION(1,0); http_protocol.c: ap_table_set(r->subprocess_env, "force-response-1.0", "1"); http_protocol.c: ap_bsetflag(r->connection->client, B_EBCDIC2ASCII, 1); http_protocol.c: if (r->chunked) { http_protocol.c: ap_table_mergen(r->headers_out, "Transfer-Encoding", "chunked"); http_protocol.c: ap_table_unset(r->headers_out, "Content-Length"); http_protocol.c: if (r->byterange > 1) http_protocol.c: ap_table_setn(r->headers_out, "Content-Type", http_protocol.c: ap_pstrcat(r->pool, "multipart", use_range_x(r) ? "/x-" : "/", http_protocol.c: "byteranges; boundary=", r->boundary, NULL)); http_protocol.c: else if (r->content_type) http_protocol.c: ap_table_setn(r->headers_out, "Content-Type", r->content_type); http_protocol.c: ap_table_setn(r->headers_out, "Content-Type", ap_default_type(r)); http_protocol.c: if (r->content_encoding) http_protocol.c: ap_table_setn(r->headers_out, "Content-Encoding", r->content_encoding); http_protocol.c: if (r->content_languages && r->content_languages->nelts) { http_protocol.c: for (i = 0; i < r->content_languages->nelts; ++i) { http_protocol.c: ap_table_mergen(r->headers_out, "Content-Language", http_protocol.c: ((char **) (r->content_languages->elts))[i]); http_protocol.c: else if (r->content_language) http_protocol.c: ap_table_setn(r->headers_out, "Content-Language", r->content_language); http_protocol.c: if (r->no_cache && !ap_table_get(r->headers_out, "Expires")) http_protocol.c: ap_table_addn(r->headers_out, "Expires", http_protocol.c: ap_gm_timestr_822(r->pool, r->request_time)); http_protocol.c: (void *) r, r->headers_out, NULL); http_protocol.c: terminate_header(r->connection->client); http_protocol.c: ap_bsetopt(r->connection->client, BO_BYTECT, &zero); http_protocol.c: r->sent_bodyct = 1; /* Whatever follows is real body stuff... */ http_protocol.c: if (r->chunked) http_protocol.c: ap_bsetflag(r->connection->client, B_CHUNK, 1); http_protocol.c: ap_bsetflag(r->connection->client, B_EBCDIC2ASCII, convert); http_protocol.c: if (r->chunked && !r->connection->aborted) { http_protocol.c: r->chunked = 0; http_protocol.c: ap_bsetflag(r->connection->client, B_CHUNK, 0); http_protocol.c: * of a non-zero Content-Length or by a Transfer-Encoding: chunked. http_protocol.c: * transfer-coding should be interpreted. Choose one of http_protocol.c: const char *tenc = ap_table_get(r->headers_in, "Transfer-Encoding"); http_protocol.c: const char *lenp = ap_table_get(r->headers_in, "Content-Length"); http_protocol.c: r->read_body = read_policy; http_protocol.c: r->read_chunked = 0; http_protocol.c: r->remaining = 0; http_protocol.c: "Unknown Transfer-Encoding %s", tenc); http_protocol.c: if (r->read_body == REQUEST_CHUNKED_ERROR) { http_protocol.c: "chunked Transfer-Encoding forbidden: %s", r->uri); http_protocol.c: r->read_chunked = 1; http_protocol.c: r->remaining = atol(lenp); http_protocol.c: if ((r->read_body == REQUEST_NO_BODY) && http_protocol.c: (r->read_chunked || (r->remaining > 0))) { http_protocol.c: "%s with body is not allowed for %s", r->method, r->uri); http_protocol.c: if (max_body && (r->remaining > max_body)) { http_protocol.c: if (r->read_length || (!r->read_chunked && (r->remaining <= 0))) http_protocol.c: if (r->expecting_100 && r->proto_num >= HTTP_VERSION(1,1)) { http_protocol.c: * r->remaining is used to maintain state across calls and that http_protocol.c: * r->read_length is the total number of bytes given to the caller http_protocol.c: if (!r->read_chunked) { /* Content-length read */ http_protocol.c: len_to_read = (r->remaining > bufsiz) ? bufsiz : r->remaining; http_protocol.c: len_read = ap_bread(r->connection->client, buffer, len_to_read); http_protocol.c: r->connection->keepalive = -1; http_protocol.c: r->read_length += len_read; http_protocol.c: r->remaining -= len_read; http_protocol.c: if (r->read_body == REQUEST_CHUNKED_PASS) http_protocol.c: if (max_body && (r->read_length > max_body)) { http_protocol.c: r->connection->keepalive = -1; http_protocol.c: if (r->remaining == 0) { /* Start of new chunk */ http_protocol.c: chunk_start = getline(buffer, bufsiz, r->connection->client, 0); http_protocol.c: r->connection->keepalive = -1; http_protocol.c: if (r->read_body == REQUEST_CHUNKED_DECHUNK) { http_protocol.c: ap_snprintf(buffer, bufsiz, "%ld", r->read_length); http_protocol.c: ap_table_unset(r->headers_in, "Transfer-Encoding"); http_protocol.c: ap_table_setn(r->headers_in, "Content-Length", http_protocol.c: ap_pstrdup(r->pool, buffer)); http_protocol.c: r->remaining = -1; /* Indicate footers in-progress */ http_protocol.c: r->remaining = len_to_read; http_protocol.c: if (r->read_body == REQUEST_CHUNKED_PASS) { http_protocol.c: if (r->remaining == -1) { /* reading footers until empty line */ http_protocol.c: getline(buffer, bufsiz, r->connection->client, 1)) > 0)) { http_protocol.c: r->connection->keepalive = -1; http_protocol.c: r->remaining = -2; http_protocol.c: r->read_length += chunk_start; http_protocol.c: if (r->remaining == -2) { /* finished footers when last called */ http_protocol.c: r->remaining = 0; /* so now we must signal EOF */ http_protocol.c: len_to_read = (r->remaining > bufsiz) ? bufsiz : r->remaining; http_protocol.c: len_read = ap_bread(r->connection->client, buffer, len_to_read); http_protocol.c: r->connection->keepalive = -1; http_protocol.c: r->remaining -= len_read; http_protocol.c: if (r->remaining == 0) { /* End of chunk, get trailing CRLF */ http_protocol.c: if ((c = ap_bgetc(r->connection->client)) == CR) { http_protocol.c: c = ap_bgetc(r->connection->client); http_protocol.c: r->connection->keepalive = -1; http_protocol.c: if (r->read_body == REQUEST_CHUNKED_PASS) { http_protocol.c: r->read_length += (chunk_start + len_read); http_protocol.c: if ((r->read_length == 0) && (r->read_chunked || (r->remaining > 0))) { http_protocol.c: if (r->expecting_100) { http_protocol.c: r->connection->keepalive = -1; http_protocol.c: while (!r->connection->aborted) { http_protocol.c: && ferror(f) && errno == EINTR && !r->connection->aborted) http_protocol.c: while (n && !r->connection->aborted) { http_protocol.c: w = ap_bwrite(r->connection->client, &buf[o], n); http_protocol.c: if (!r->connection->aborted) { http_protocol.c: ap_bsetflag(r->connection->client, B_EOUT, 1); http_protocol.c: r->connection->aborted = 1; http_protocol.c: while (!r->connection->aborted) { http_protocol.c: if (r->connection->aborted) http_protocol.c: if (ap_bflush(r->connection->client) < 0) { http_protocol.c: ap_bsetflag(r->connection->client, B_EOUT, 1); http_protocol.c: r->connection->aborted = 1; http_protocol.c: } while (!r->connection->aborted); http_protocol.c: if (n < 1 || r->connection->aborted) { http_protocol.c: while (n && !r->connection->aborted) { http_protocol.c: w = ap_bwrite(r->connection->client, &buf[o], n); http_protocol.c: if (!r->connection->aborted) { http_protocol.c: ap_bsetflag(r->connection->client, B_EOUT, 1); http_protocol.c: r->connection->aborted = 1; http_protocol.c: * timeout model, which is a timeout per-write rather than a time for the http_protocol.c: while (!r->connection->aborted && offset < length) { http_protocol.c: while (n && !r->connection->aborted) { http_protocol.c: w = ap_bwrite(r->connection->client, (char *) mm + offset, n); http_protocol.c: if (!r->connection->aborted) { http_protocol.c: ap_bsetflag(r->connection->client, B_EOUT, 1); http_protocol.c: r->connection->aborted = 1; http_protocol.c: if (r->connection->aborted) http_protocol.c: if (ap_bputc(c, r->connection->client) < 0) { http_protocol.c: if (!r->connection->aborted) { http_protocol.c: ap_bsetflag(r->connection->client, B_EOUT, 1); http_protocol.c: r->connection->aborted = 1; http_protocol.c: if (r->connection->aborted) http_protocol.c: rcode = ap_bputs(str, r->connection->client); http_protocol.c: if (!r->connection->aborted) { http_protocol.c: ap_bsetflag(r->connection->client, B_EOUT, 1); http_protocol.c: r->connection->aborted = 1; http_protocol.c: if (r->connection->aborted) http_protocol.c: n = ap_bwrite(r->connection->client, buf, nbyte); http_protocol.c: if (!r->connection->aborted) { http_protocol.c: ap_bsetflag(r->connection->client, B_EOUT, 1); http_protocol.c: r->connection->aborted = 1; http_protocol.c: if (r->connection->aborted) http_protocol.c: n = ap_vbprintf(r->connection->client, fmt, ap); http_protocol.c: if (!r->connection->aborted) { http_protocol.c: ap_bsetflag(r->connection->client, B_EOUT, 1); http_protocol.c: r->connection->aborted = 1; http_protocol.c: if (r->connection->aborted) http_protocol.c: n = ap_vbprintf(r->connection->client, fmt, vlist); http_protocol.c: if (!r->connection->aborted) { http_protocol.c: ap_bsetflag(r->connection->client, B_EOUT, 1); http_protocol.c: r->connection->aborted = 1; http_protocol.c: BUFF *fb = r->connection->client; http_protocol.c: if (r->connection->aborted) http_protocol.c: if (!r->connection->aborted) { http_protocol.c: ap_bsetflag(r->connection->client, B_EOUT, 1); http_protocol.c: r->connection->aborted = 1; http_protocol.c: if (ap_bflush(r->connection->client) < 0) { http_protocol.c: if (!r->connection->aborted) { http_protocol.c: ap_bsetflag(r->connection->client, B_EOUT, 1); http_protocol.c: r->connection->aborted = 1; http_protocol.c: int status = r->status; http_protocol.c: const char *location = ap_table_get(r->headers_out, "Location"); http_protocol.c: * It's possible that the Location field might be in r->err_headers_out http_protocol.c: * instead of r->headers_out; use the latter if possible, else the http_protocol.c: location = ap_table_get(r->err_headers_out, "Location"); http_protocol.c: if (!ap_is_empty_table(r->err_headers_out)) http_protocol.c: r->headers_out = ap_overlay_tables(r->pool, r->err_headers_out, http_protocol.c: r->headers_out); http_protocol.c: (void *) r, r->headers_out, http_protocol.c: terminate_header(r->connection->client); http_protocol.c: if (!r->assbackwards) { http_protocol.c: table *tmp = r->headers_out; http_protocol.c: r->headers_out = r->err_headers_out; http_protocol.c: r->err_headers_out = tmp; http_protocol.c: ap_clear_table(r->err_headers_out); http_protocol.c: ap_table_setn(r->headers_out, "Location", location); http_protocol.c: r->content_language = NULL; http_protocol.c: r->content_languages = NULL; http_protocol.c: r->content_encoding = NULL; http_protocol.c: r->clength = 0; http_protocol.c: r->content_type = "text/html"; http_protocol.c: ap_table_setn(r->headers_out, "Allow", make_allow(r)); http_protocol.c: if (r->header_only) { http_protocol.c: while (r->prev && (r->prev->status != HTTP_OK)) http_protocol.c: r = r->prev; http_protocol.c: if (r->status_line != NULL http_protocol.c: && strlen(r->status_line) > 4 /* long enough */ http_protocol.c: && ap_isdigit(r->status_line[0]) http_protocol.c: && ap_isdigit(r->status_line[1]) http_protocol.c: && ap_isdigit(r->status_line[2]) http_protocol.c: && ap_isspace(r->status_line[3]) http_protocol.c: && ap_isalnum(r->status_line[4])) { http_protocol.c: title = r->status_line; http_protocol.c: ap_escape_html(r->pool, location), "\">here.

\n", http_protocol.c: ap_escape_html(r->pool, location), "\">here.

\n", http_protocol.c: ap_escape_html(r->pool, location), http_protocol.c: if ((error_notes = ap_table_get(r->notes, "error-notes")) != NULL) { http_protocol.c: ap_escape_html(r->pool, r->uri), http_protocol.c: ap_escape_html(r->pool, r->uri), http_protocol.c: ap_rvputs(r, "The requested method ", r->method, http_protocol.c: "for the URL ", ap_escape_html(r->pool, r->uri), http_protocol.c: ap_escape_html(r->pool, r->uri), http_protocol.c: if ((list = ap_table_get(r->notes, "variant-list"))) http_protocol.c: ap_rvputs(r, "A request of the requested method ", r->method, http_protocol.c: if ((error_notes = ap_table_get(r->notes, "error-notes")) != NULL) { http_protocol.c: ap_escape_html(r->pool, r->uri), http_protocol.c: ap_rvputs(r, ap_escape_html(r->pool, r->method), " to ", http_protocol.c: ap_escape_html(r->pool, r->uri), http_protocol.c: if ((error_notes = ap_table_get(r->notes, "error-notes")) != NULL) { http_protocol.c: if ((error_notes = ap_table_get(r->notes, "error-notes")) != NULL) { http_protocol.c: ap_escape_html(r->pool, r->uri), http_protocol.c: ap_escape_html(r->pool, r->uri), http_protocol.c: ap_escape_html(r->pool, r->uri), "
\n", http_protocol.c: "does not allow request data with ", r->method, http_protocol.c: if ((error_notes = ap_table_get(r->notes, "error-notes")) != NULL) { http_protocol.c: ap_table_get(r->headers_in, "Expect"), "\n\n" http_protocol.c: * This comparison to expose error-notes could be modified to http_protocol.c: * directive. For now "*" is used to designate an error-notes http_protocol.c: if (((error_notes = ap_table_get(r->notes, "error-notes")) != NULL) http_protocol.c: && (h1 = ap_table_get(r->notes, "verbose-error-to")) != NULL http_protocol.c: ap_escape_html(r->pool, r->server->server_admin), http_protocol.c: * if ((error_notes = ap_table_get(r->notes, "error-notes")) != NULL) { Binary file http_protocol.o matches http_request.c: if (r->finfo.st_mode == 0 /* doesn't exist */ http_request.c: || S_ISDIR(r->finfo.st_mode) http_request.c: || S_ISREG(r->finfo.st_mode) http_request.c: || S_ISLNK(r->finfo.st_mode)) { http_request.c: r->filename); http_request.c: char *path = r->filename; http_request.c: if (r->finfo.st_mode) { http_request.c: rv = stat(path, &r->finfo); http_request.c: if (S_ISDIR(r->finfo.st_mode) && last_cp) { http_request.c: r->finfo.st_mode = 0; /* No such file... */ http_request.c: r->path_info = ap_pstrdup(r->pool, cp); http_request.c: r->finfo.st_mode = 0; http_request.c: "access to %s failed", r->uri); http_request.c: core_server_config *sconf = ap_get_module_config(r->server->module_config, http_request.c: void *per_dir_defaults = r->server->lookup_defaults; http_request.c: if (r->filename == NULL) { http_request.c: r->filename = ap_pstrdup(r->pool, r->uri); http_request.c: r->finfo.st_mode = 0; /* Not really a file... */ http_request.c: r->per_dir_config = per_dir_defaults; http_request.c: if (!ap_os_is_path_absolute(r->filename)) http_request.c: if (!ap_regexec(entry_core->r, r->filename, 0, NULL, 0)) http_request.c: if (!ap_fnmatch(entry_dir, r->filename, 0)) http_request.c: else if (!strncmp(r->filename, entry_dir, strlen(entry_dir))) http_request.c: per_dir_defaults = ap_merge_per_dir_configs(r->pool, http_request.c: r->per_dir_config = per_dir_defaults; http_request.c: r->filename = ap_os_case_canonical_filename(r->pool, r->filename); http_request.c: r->filename = ap_os_canonical_filename(r->pool, r->filename); http_request.c: test_filename = ap_pstrdup(r->pool, r->filename); http_request.c: if (!ap_os_is_filename_valid(r->filename)) { http_request.c: "Filename is not valid: %s", r->filename); http_request.c: if (S_ISDIR(r->finfo.st_mode)) http_request.c: test_dirname = ap_palloc(r->pool, test_filename_len + 2); http_request.c: if ((res = check_symlinks(test_dirname, core_dir->opts))) { http_request.c: per_dir_defaults = ap_merge_per_dir_configs(r->pool, http_request.c: overrides_here = core_dir->override; http_request.c: ap_pstrdup(r->pool, test_dirname), http_request.c: per_dir_defaults = ap_merge_per_dir_configs(r->pool, http_request.c: r->per_dir_config = per_dir_defaults; http_request.c: ap_merge_per_dir_configs(r->pool, per_dir_defaults, http_request.c: r->per_dir_config = per_dir_defaults; http_request.c: if (!S_ISDIR(r->finfo.st_mode) http_request.c: && (res = check_symlinks(r->filename, ap_allow_options(r)))) { http_request.c: "Symbolic link not allowed: %s", r->filename); http_request.c: core_server_config *sconf = ap_get_module_config(r->server->module_config, http_request.c: void *per_dir_defaults = r->per_dir_config; http_request.c: if (r->uri[0] != '/') { http_request.c: test_location = r->uri; http_request.c: test_location = ap_pstrdup(r->pool, r->uri); http_request.c: if (!ap_regexec(entry_core->r, r->uri, 0, NULL, 0)) http_request.c: per_dir_defaults = ap_merge_per_dir_configs(r->pool, http_request.c: r->per_dir_config = per_dir_defaults; http_request.c: core_dir_config *conf = ap_get_module_config(r->per_dir_config, &core_module); http_request.c: void *per_dir_defaults = r->per_dir_config; http_request.c: test_file = strrchr(r->filename, '/'); http_request.c: test_file = r->filename; http_request.c: per_dir_defaults = ap_merge_per_dir_configs(r->pool, http_request.c: r->per_dir_config = per_dir_defaults; http_request.c: pool *rrp = ap_make_sub_pool(r->pool); http_request.c: rr->pool = rrp; http_request.c: rnew->hostname = r->hostname; http_request.c: rnew->request_time = r->request_time; http_request.c: rnew->connection = r->connection; http_request.c: rnew->server = r->server; http_request.c: rnew->htaccess = r->htaccess; http_request.c: rnew->per_dir_config = r->server->lookup_defaults; http_request.c: udir = ap_make_dirstr_parent(rnew->pool, r->uri); http_request.c: rnew->hostname = r->hostname; http_request.c: rnew->request_time = r->request_time; http_request.c: rnew->connection = r->connection; http_request.c: rnew->server = r->server; http_request.c: rnew->htaccess = r->htaccess; http_request.c: fdir = ap_make_dirstr_parent(rnew->pool, r->filename); http_request.c: char *udir = ap_make_dirstr_parent(rnew->pool, r->uri); http_request.c: rnew->per_dir_config = r->per_dir_config; http_request.c: if (rnew->per_dir_config == r->per_dir_config) { http_request.c: rnew->per_dir_config = r->server->lookup_defaults; http_request.c: int convert = ap_bgetflag(r->connection->client, B_EBCDIC2ASCII); http_request.c: ap_bsetflag(r->connection->client, B_EBCDIC2ASCII, convert); http_request.c: ap_destroy_pool(r->pool); http_request.c: if (r->status != HTTP_OK) { http_request.c: while (r->prev && (r->prev->status != HTTP_OK)) http_request.c: r = r->prev; /* Get back to original error */ http_request.c: type = r->status; http_request.c: r->status = type; http_request.c: if (r->status == AUTH_REQUIRED && r->proxyreq) { http_request.c: r->status = HTTP_PROXY_AUTHENTICATION_REQUIRED; http_request.c: if ((r->status != HTTP_NOT_MODIFIED) && (r->status != HTTP_NO_CONTENT) http_request.c: && !ap_status_drops_connection(r->status) http_request.c: && r->connection && (r->connection->keepalive != -1)) { http_request.c: r->status = REDIRECT; http_request.c: ap_table_setn(r->headers_out, "Location", custom_response); http_request.c: r->no_local_copy = 1; /* Do NOT send USE_LOCAL_COPY for http_request.c: ap_table_setn(r->subprocess_env, "REQUEST_METHOD", r->method); http_request.c: if ((error_notes = ap_table_get(r->notes, "error-notes")) != NULL) { http_request.c: ap_table_setn(r->subprocess_env, "ERROR_NOTES", error_notes); http_request.c: r->method = ap_pstrdup(r->pool, "GET"); http_request.c: r->method_number = M_GET; http_request.c: "configuration error: couldn't %s: %s", phase, r->uri); http_request.c: reqs = (require_line *) reqs_arr->elts; http_request.c: for (i = 0; i < reqs_arr->nelts; ++i) http_request.c: if (reqs[i].method_mask & (1 << r->method_number)) http_request.c: if (!r->proxyreq && r->parsed_uri.path) { http_request.c: access_status = ap_unescape_url(r->parsed_uri.path); http_request.c: ap_getparents(r->uri); /* OK --- shrinking transformations... */ http_request.c: if (!r->proxyreq) { http_request.c: if (r->method_number == M_TRACE) { http_request.c: if (r->proto_num > HTTP_VERSION(1,0) && ap_table_get(r->subprocess_env, "downgrade-1.0")) { http_request.c: r->proto_num = HTTP_VERSION(1,0); http_request.c: if (! (r->proxyreq http_request.c: && r->parsed_uri.scheme != NULL http_request.c: && strcmp(r->parsed_uri.scheme, "http") == 0) ) { http_request.c: ap_time_process_request(r->connection->child_num, START_PREQUEST); http_request.c: old_stat = ap_update_child_status(r->connection->child_num, http_request.c: ap_bhalfduplex(r->connection->client); http_request.c: (void) ap_update_child_status(r->connection->child_num, old_stat, r); http_request.c: ap_time_process_request(r->connection->child_num, STOP_PREQUEST); http_request.c: table_entry *elts = (table_entry *) env_arr->elts; http_request.c: table *new = ap_make_table(p, env_arr->nalloc); http_request.c: for (i = 0; i < env_arr->nelts; ++i) { http_request.c: request_rec *new = (request_rec *) ap_pcalloc(r->pool, sizeof(request_rec)); http_request.c: new->connection = r->connection; http_request.c: new->server = r->server; http_request.c: new->pool = r->pool; http_request.c: new->method = r->method; http_request.c: new->method_number = r->method_number; http_request.c: new->request_config = ap_create_request_config(r->pool); http_request.c: new->per_dir_config = r->server->lookup_defaults; http_request.c: r->next = new; http_request.c: new->the_request = r->the_request; http_request.c: new->allowed = r->allowed; http_request.c: new->status = r->status; http_request.c: new->assbackwards = r->assbackwards; http_request.c: new->header_only = r->header_only; http_request.c: new->protocol = r->protocol; http_request.c: new->proto_num = r->proto_num; http_request.c: new->hostname = r->hostname; http_request.c: new->request_time = r->request_time; http_request.c: new->main = r->main; http_request.c: new->headers_in = r->headers_in; http_request.c: new->headers_out = ap_make_table(r->pool, 12); http_request.c: new->err_headers_out = r->err_headers_out; http_request.c: new->subprocess_env = rename_original_env(r->pool, r->subprocess_env); http_request.c: new->notes = ap_make_table(r->pool, 5); http_request.c: new->htaccess = r->htaccess; http_request.c: new->no_cache = r->no_cache; http_request.c: new->expecting_100 = r->expecting_100; http_request.c: new->no_local_copy = r->no_local_copy; http_request.c: new->read_length = r->read_length; /* We can only read it once */ http_request.c: new->vlist_validator = r->vlist_validator; http_request.c: ap_psprintf(r->pool, "%d", r->status)); http_request.c: if (r->handler) http_request.c: new->content_type = r->content_type; http_request.c: (r->main == NULL) /* otherwise, this is a sub-request */ http_request.c: (r->prev == NULL); /* otherwise, this is an internal redirect */ http_request.c: * Function to set the r->mtime field to the specified value if it's later http_request.c: if (r->mtime < dependency_mtime) { http_request.c: r->mtime = dependency_mtime; http_request.c: return r->mtime; Binary file http_request.o matches http_vhost.c: *paddr = &sar->next; http_vhost.c: sar->host_addr.s_addr = my_addr; http_vhost.c: sar->host_port = port; http_vhost.c: sar->virthost = ap_pstrdup(p, w); http_vhost.c: *paddr = &sar->next; http_vhost.c: sar->host_addr = *(struct in_addr *) hep->h_addr_list[i]; http_vhost.c: sar->host_port = port; http_vhost.c: sar->virthost = ap_pstrdup(p, w); http_vhost.c: cmd->server->port); http_vhost.c: if ((sar->host_addr.s_addr == addr) http_vhost.c: && (sar->host_port == 0 || sar->host_port == port http_vhost.c: if (sar->host_port == 0 || sar->host_port == port) { http_vhost.c: if (ic->sar->host_port == 0) { http_vhost.c: ap_snprintf(buf, sizeof(buf), "%pA:*", &ic->sar->host_addr); http_vhost.c: ap_snprintf(buf, sizeof(buf), "%pA:%u", &ic->sar->host_addr, http_vhost.c: ic->sar->host_port); http_vhost.c: ic->server->server_hostname, ic->server->defn_name, http_vhost.c: ic->server->defn_line_number); http_vhost.c: buf, "", ic->server->server_hostname, http_vhost.c: ic->server->defn_name, ic->server->defn_line_number); http_vhost.c: if (nc->sar->host_port) { http_vhost.c: fprintf(f, "%22s port %u ", "", nc->sar->host_port); http_vhost.c: nc->server->server_hostname, http_vhost.c: nc->server->defn_name, http_vhost.c: nc->server->defn_line_number); http_vhost.c: if (ic->sar->host_port == 0) { http_vhost.c: fprintf(f, "port %u ", ic->sar->host_port); http_vhost.c: ic->server->server_hostname, ic->server->defn_name, http_vhost.c: ic->server->defn_line_number); http_vhost.c: for (sar = name_vhost_list; sar; sar = sar->next) { http_vhost.c: unsigned bucket = hash_inaddr(sar->host_addr.s_addr); http_vhost.c: for (sar = s->addrs; sar; sar = sar->next) { http_vhost.c: if (sar->host_addr.s_addr == DEFAULT_VHOST_ADDR http_vhost.c: || sar->host_addr.s_addr == INADDR_ANY) { http_vhost.c: other = find_default_server(sar->host_port); http_vhost.c: if (other && other->sar->host_port != 0) { http_vhost.c: " the first has precedence", sar->host_port); http_vhost.c: ic = find_ipaddr(&sar->host_addr, sar->host_port); http_vhost.c: if (sar->host_port != ic->sar->host_port) { http_vhost.c: sar->virthost, sar->host_port); http_vhost.c: sar->virthost, sar->host_port, http_vhost.c: ic->sar->virthost, ic->sar->host_port); http_vhost.c: unsigned bucket = hash_inaddr(sar->host_addr.s_addr); http_vhost.c: ic->sar->virthost, ic->sar->host_port); http_vhost.c: const char *hostname = r->hostname; http_vhost.c: char *host = ap_getword(r->pool, &hostname, ':'); /* get rid of port */ http_vhost.c: r->hostname = host; http_vhost.c: * a header "Host: host:port", would it map to r->server? It's more http_vhost.c: s = r->server; http_vhost.c: * Suppose r->server is v2, and we're asked to match "10.1.1.1". We'll say http_vhost.c: for (sar = s->addrs; sar; sar = sar->next) { http_vhost.c: if ((sar->host_port == 0 || port == sar->host_port) http_vhost.c: && !strcasecmp(host, sar->virthost)) { http_vhost.c: const char *host = r->hostname; http_vhost.c: unsigned port = ntohs(r->connection->local_addr.sin_port); http_vhost.c: for (src = r->connection->vhost_lookup_data; src; src = src->next) { http_vhost.c: if (sar->host_port != 0 && port != sar->host_port) { http_vhost.c: if (!strcasecmp(host, sar->virthost)) { http_vhost.c: r->server = r->connection->server = s; http_vhost.c: unsigned port = ntohs(r->connection->local_addr.sin_port); http_vhost.c: for (src = r->connection->vhost_lookup_data; src; src = src->next) { http_vhost.c: if (src->sar->host_port != 0 && port != src->sar->host_port) { http_vhost.c: if (s->path && !strncmp(r->uri, s->path, s->pathlen) && http_vhost.c: r->uri[s->pathlen] == '/' || http_vhost.c: r->uri[s->pathlen] == '\0')) { http_vhost.c: r->server = r->connection->server = s; http_vhost.c: if (r->hostname || (r->hostname = ap_table_get(r->headers_in, "Host"))) { http_vhost.c: if (r->connection->vhost_lookup_data) { http_vhost.c: if (r->hostname) Binary file libmain.a matches util_date.c: year--; util_date.c: * Originally from Andrew Daviel , 29 Jul 96 util_script.c: * in one place (if only to avoid creating inter-module dependancies util_script.c: table_entry *elts = (table_entry *) env_arr->elts; util_script.c: char **env = (char **) ap_palloc(p, (env_arr->nelts + 2) * sizeof(char *)); util_script.c: for (i = 0; i < env_arr->nelts; ++i) { util_script.c: server_rec *s = r->server; util_script.c: conn_rec *c = r->connection; util_script.c: array_header *hdrs_arr = ap_table_elts(r->headers_in); util_script.c: table_entry *hdrs = (table_entry *) hdrs_arr->elts; util_script.c: * r->subprocess_env later util_script.c: e = ap_make_table(r->pool, 25 + hdrs_arr->nelts); util_script.c: for (i = 0; i < hdrs_arr->nelts; ++i) { util_script.c: ap_table_addn(e, http2env(r->pool, hdrs[i].key), hdrs[i].val); util_script.c: ap_table_addn(e, "SERVER_ADDR", r->connection->local_ip); /* Apache */ util_script.c: ap_psprintf(r->pool, "%u", ap_get_server_port(r))); util_script.c: host = ap_get_remote_host(c, r->per_dir_config, REMOTE_HOST); util_script.c: ap_table_addn(e, "SCRIPT_FILENAME", r->filename); /* Apache */ util_script.c: ap_psprintf(r->pool, "%d", ntohs(c->remote_addr.sin_port))); util_script.c: ap_table_addn(e, "REMOTE_IDENT", ap_pstrdup(r->pool, rem_logname)); util_script.c: if (r->prev) { util_script.c: if (r->prev->args) { util_script.c: ap_table_addn(e, "REDIRECT_QUERY_STRING", r->prev->args); util_script.c: if (r->prev->uri) { util_script.c: ap_table_addn(e, "REDIRECT_URL", r->prev->uri); util_script.c: ap_overlap_tables(r->subprocess_env, e, AP_OVERLAP_TABLES_SET); util_script.c: if (r->the_request == NULL) { util_script.c: return (char *) ap_pcalloc(r->pool, 1); util_script.c: first = r->the_request; /* use the request-line */ util_script.c: return ap_pstrndup(r->pool, first, last - first); util_script.c: table *e = r->subprocess_env; util_script.c: ap_table_setn(e, "SERVER_PROTOCOL", r->protocol); util_script.c: ap_table_setn(e, "REQUEST_METHOD", r->method); util_script.c: ap_table_setn(e, "QUERY_STRING", r->args ? r->args : ""); util_script.c: if (!strcmp(r->protocol, "INCLUDED")) { util_script.c: ap_table_setn(e, "SCRIPT_NAME", r->uri); util_script.c: if (r->path_info && *r->path_info) { util_script.c: ap_table_setn(e, "PATH_INFO", r->path_info); util_script.c: else if (!r->path_info || !*r->path_info) { util_script.c: ap_table_setn(e, "SCRIPT_NAME", r->uri); util_script.c: int path_info_start = ap_find_path_info(r->uri, r->path_info); util_script.c: ap_pstrndup(r->pool, r->uri, path_info_start)); util_script.c: ap_table_setn(e, "PATH_INFO", r->path_info); util_script.c: if (r->path_info && r->path_info[0]) { util_script.c: pa_req = ap_sub_req_lookup_uri(ap_escape_uri(r->pool, r->path_info), r); util_script.c: char *pt = ap_pstrcat(r->pool, pa_req->filename, pa_req->path_info, util_script.c: ap_table_setn(e, "PATH_TRANSLATED", ap_pstrdup(r->pool, buffer)); util_script.c: merge = ap_make_table(r->pool, 10); util_script.c: cookie_table = ap_make_table(r->pool, 2); util_script.c: ap_table_do(set_cookie_doo_doo, cookie_table, r->err_headers_out, "Set-Cookie", NULL); util_script.c: "Premature end of script headers: %s", r->filename); util_script.c: if ((cgi_status == HTTP_OK) && (r->method_number == M_GET)) { util_script.c: ap_overlap_tables(r->err_headers_out, merge, util_script.c: ap_table_unset(r->err_headers_out, "Set-Cookie"); util_script.c: r->err_headers_out = ap_overlay_tables(r->pool, util_script.c: r->err_headers_out, cookie_table); util_script.c: ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r->server, util_script.c: "CGI Interface Error: Script headers apparently ASCII: (CGI = %s)", r->filename); util_script.c: "%s: %s", malformed, r->filename); util_script.c: tmp = ap_pstrdup(r->pool, l); util_script.c: r->content_type = tmp; util_script.c: r->status = cgi_status = atoi(l); util_script.c: r->status_line = ap_pstrdup(r->pool, l); util_script.c: ap_table_set(r->headers_out, w, l); util_script.c: ap_table_set(r->headers_out, w, l); util_script.c: else if (!strcasecmp(w, "Transfer-Encoding")) { util_script.c: ap_table_set(r->headers_out, w, l); util_script.c: conf = (core_dir_config *) ap_get_module_config(r->per_dir_config, util_script.c: /* the fd on r->server->error_log is closed, but we need somewhere to util_script.c: r->server->error_log = stderr; util_script.c: ap_log_error(APLOG_MARK, APLOG_ERR, r->server, util_script.c: ap_log_error(APLOG_MARK, APLOG_ERR, r->server, util_script.c: ap_log_error(APLOG_MARK, APLOG_ERR, r->server, util_script.c: ap_log_error(APLOG_MARK, APLOG_ERR, r->server, util_script.c: ap_log_error(APLOG_MARK, APLOG_ERR, r->server, util_script.c: char *cmdline = r->filename, *cmdline_pos; util_script.c: if (r->args && r->args[0] && !strchr(r->args, '=')) util_script.c: args = r->args; util_script.c: program = fopen(r->filename, "rt"); util_script.c: r->filename); util_script.c: cmdline = ap_pstrcat(r->pool, interpreter+2, " ", r->filename, NULL); util_script.c: else if (strstr(strupr(r->filename), ".CMD") > 0) { util_script.c: os2pathname(r->filename); util_script.c: cmdline = ap_pstrcat(r->pool, SHELL_PATH, " /C ", r->filename, NULL); util_script.c: cmdline = r->filename; util_script.c: args = ap_pstrdup(r->pool, args); util_script.c: args = ap_double_quotes(r->pool, args); util_script.c: cmdline = ap_pstrndup(r->pool, cmdline, cmdlen); util_script.c: arg = ap_getword_nc(r->pool, &args, '+'); util_script.c: arg = ap_pstrcat(r->pool, "\"", arg, "\"", NULL); util_script.c: env_block = ap_palloc(r->pool, env_len); util_script.c: r->filename); util_script.c: if ((r->args) && (r->args[0]) && !strchr(r->args, '=')) { util_script.c: arguments = ap_pstrdup(r->pool, r->args); util_script.c: arguments = ap_escape_shell_cmd(r->pool, arguments); util_script.c: quoted_filename = ap_pstrcat(r->pool, "\"", r->filename, "\"", NULL); util_script.c: pCommand = ap_pstrcat(r->pool, interpreter, " ", util_script.c: pCommand = ap_pstrcat(r->pool, quoted_filename, " ", arguments, NULL); util_script.c: pCommand = ap_pstrcat(r->pool, shell_cmd, argv0, NULL); util_script.c: pEnvBlock = (char *)ap_pcalloc(r->pool,iEnvBlockLen); util_script.c: ap_make_dirstr_parent(r->pool, r->filename), util_script.c: && ((r->server->server_uid != ap_user_id) util_script.c: || (r->server->server_gid != ap_group_id) util_script.c: || (!strncmp("/~", r->uri, 2)))) { util_script.c: if (!strncmp("/~", r->uri, 2)) { util_script.c: char *username = ap_pstrdup(r->pool, r->uri + 2); util_script.c: execuser = ap_pstrcat(r->pool, "~", pw->pw_name, NULL); util_script.c: if ((grpname = ap_palloc(r->pool, 16)) == NULL) { util_script.c: grpname = gr->gr_name; util_script.c: if ((pw = getpwuid(r->server->server_uid)) == NULL) { util_script.c: (long) r->server->server_uid); util_script.c: execuser = ap_pstrdup(r->pool, pw->pw_name); util_script.c: if ((gr = getgrgid(r->server->server_gid)) == NULL) { util_script.c: (long) r->server->server_gid); util_script.c: grpname = gr->gr_name; util_script.c: else if ((!r->args) || (!r->args[0]) || strchr(r->args, '=')) { util_script.c: create_argv(r->pool, SUEXEC_BIN, execuser, grpname, util_script.c: argv0, r->args), util_script.c: else if ((!r->args) || (!r->args[0]) || strchr(r->args, '=')) { util_script.c: execle(r->filename, argv0, NULL, env); util_script.c: execve(r->filename, util_script.c: create_argv(r->pool, NULL, NULL, NULL, argv0, r->args), Binary file util_script.o matches util_uri.c: return (r->parsed_uri.scheme) util_uri.c: ? ap_default_port_for_scheme(r->parsed_uri.scheme) util_uri.c: if (uptr->user||uptr->password) util_uri.c: (uptr->user && !(flags & UNP_OMITUSER)) ? uptr->user : "", util_uri.c: (uptr->password && !(flags & UNP_OMITPASSWORD)) ? ":" : "", util_uri.c: (uptr->password && !(flags & UNP_OMITPASSWORD)) util_uri.c: ? ((flags & UNP_REVEALPASSWORD) ? uptr->password : "XXXXXXXX") util_uri.c: if (uptr->hostname) { util_uri.c: (uptr->port_str == NULL || util_uri.c: uptr->port == 0 || util_uri.c: uptr->port == ap_default_port_for_scheme(uptr->scheme)); util_uri.c: uptr->scheme, "://", ret, util_uri.c: uptr->hostname ? uptr->hostname : "", util_uri.c: is_default_port ? "" : uptr->port_str, util_uri.c: uptr->path ? uptr->path : "", util_uri.c: (uptr->query && !(flags & UNP_OMITQUERY)) ? "?" : "", util_uri.c: (uptr->query && !(flags & UNP_OMITQUERY)) ? uptr->query : "", util_uri.c: (uptr->fragment && !(flags & UNP_OMITQUERY)) ? "#" : NULL, util_uri.c: (uptr->fragment && !(flags & UNP_OMITQUERY)) ? uptr->fragment : NULL, util_uri.c: * - none on any of the r->* fields util_uri.c: uptr->is_initialized = 1; util_uri.c: uptr->scheme = ap_pstrndup (p, uri+match[2].rm_so, match[2].rm_eo - match[2].rm_so); util_uri.c: uptr->hostinfo = ap_pstrndup (p, uri+match[3].rm_so, match[3].rm_eo - match[3].rm_so); util_uri.c: uptr->path = ap_pstrndup (p, uri+match[4].rm_so, match[4].rm_eo - match[4].rm_so); util_uri.c: uptr->query = ap_pstrndup (p, uri+match[6].rm_so, match[6].rm_eo - match[6].rm_so); util_uri.c: uptr->fragment = ap_pstrndup (p, uri+match[8].rm_so, match[8].rm_eo - match[8].rm_so); util_uri.c: if (uptr->hostinfo) { util_uri.c: ret = ap_regexec(&re_hostpart, uptr->hostinfo, re_hostpart.re_nsub + 1, match, 0); util_uri.c: uptr->hostinfo); util_uri.c: uptr->user = ap_pstrndup (p, uptr->hostinfo+match[2].rm_so, match[2].rm_eo - match[2].rm_so); util_uri.c: uptr->password = ap_pstrndup (p, uptr->hostinfo+match[4].rm_so, match[4].rm_eo - match[4].rm_so); util_uri.c: uptr->hostname = ap_pstrndup (p, uptr->hostinfo+match[5].rm_so, match[5].rm_eo - match[5].rm_so); util_uri.c: uptr->port_str = ap_pstrndup (p, uptr->hostinfo+match[7].rm_so, match[7].rm_eo - match[7].rm_so); util_uri.c: if (uptr->port_str[0] != '\0') { util_uri.c: port = strtol(uptr->port_str, &endstr, 10); util_uri.c: uptr->port = port; util_uri.c: uptr->port = uptr->scheme ? ap_default_port_for_scheme(uptr->scheme) : DEFAULT_HTTP_PORT; util_uri.c: * - none on any of the r->* fields util_uri.c: uptr->is_initialized = 1; util_uri.c: uptr->path = ap_pstrndup(p, uri, s - uri); util_uri.c: uptr->fragment = ap_pstrdup(p, s1 + 1); util_uri.c: uptr->query = ap_pstrndup(p, s, s1 - s); util_uri.c: uptr->query = ap_pstrdup(p, s); util_uri.c: uptr->fragment = ap_pstrdup(p, s + 1); util_uri.c: uptr->scheme = ap_pstrndup(p, uri, s - uri); util_uri.c: uptr->hostinfo = ap_pstrndup(p, hostinfo, uri - hostinfo); util_uri.c: uptr->hostname = ap_pstrndup(p, hostinfo, uri - hostinfo); util_uri.c: uptr->hostname = ap_pstrndup(p, hostinfo, s - hostinfo); util_uri.c: uptr->port_str = ap_pstrndup(p, s, uri - s); util_uri.c: port = strtol(uptr->port_str, &endstr, 10); util_uri.c: uptr->port = port; util_uri.c: uptr->port = ap_default_port_for_scheme(uptr->scheme); util_uri.c: uptr->user = ap_pstrndup(p, hostinfo, s1 - hostinfo); util_uri.c: uptr->password = ap_pstrndup(p, s1, s - s1); util_uri.c: uptr->user = ap_pstrndup(p, hostinfo, s - hostinfo); util_uri.c: uptr->is_initialized = 1; util_uri.c: uptr->hostinfo = ap_pstrdup(p, hostinfo); util_uri.c: uptr->hostname = ap_pstrndup(p, hostinfo, s - hostinfo); util_uri.c: uptr->port_str = ap_pstrdup(p, s); util_uri.c: uptr->port = strtol(uptr->port_str, &endstr, 10);