/* Licensed to the Apache Software Foundation (ASF) under one or more *contributorlicenseagreements.SeetheNOTICEfiledistributedwith *thisworkforadditionalinformationregardingcopyrightownership. *TheASFlicensesthisfiletoYouundertheApacheLicense,Version2.0 *(the"License");youmaynotusethisfileexceptincompliancewith *theLicense.YoumayobtainacopyoftheLicenseat * *http://www.apache.org/licenses/LICENSE-2.0 * *Unlessrequiredbyapplicablelaworagreedtoinwriting,software *distributedundertheLicenseisdistributedonan"ASIS"BASIS, *WITHOUTWARRANTIESORCONDITIONSOFANYKIND,eitherexpressorimplied. *SeetheLicenseforthespecificlanguagegoverningpermissionsand *limitationsundertheLicense.
*/
#include"apr_strings.h" #include"apr_thread_proc.h"/* for RLIMIT stuff */
#define APR_WANT_STRFUNC #include"apr_want.h"
#include"httpd.h" #include"http_config.h" #include"http_connection.h" #include"http_core.h" #include"http_protocol.h"/* For index_of_response(). Grump. */ #include"http_request.h"
/* Stolen from mod_proxy.c */ if (ap_timeout_parameter_parse(arg, &timeout, "s") != APR_SUCCESS) return"KeepAliveTimeout has wrong format";
cmd->server->keep_alive_timeout = timeout;
/* We don't want to take into account whether or not KeepAliveTimeout is *setforthemainserver,becauseifnohttp_moduledirectiveisused *foravhost,itwillinheritthehttp_srv_cfgfromthemainserver. *Howeverkeep_alive_timeout_sethelpsdeterminewhetherthevhostshould *useitsownconfiguredtimeoutortheonefromthevhostdeclaredfirst *onthesameIP:port(ie.c->base_server,andthelegacybehaviour).
*/ if (cmd->server->is_virtual) {
cmd->server->keep_alive_timeout_set = 1;
} return NULL;
}
/* To preserve legacy behaviour, use the keepalive timeout from the *baseserver(firstonthisIP:port)whennoneisexplicitly *configuredonthisserver.
*/ if (!r->server->keep_alive_timeout_set) {
keep_alive_timeout = c->base_server->keep_alive_timeout;
}
if (r->status == HTTP_OK) { if (cs)
cs->state = CONN_STATE_HANDLER;
ap_update_child_status(c->sbh, SERVER_BUSY_WRITE, r);
ap_process_request(r); /* After the call to ap_process_request, the *requestpoolwillhavebeendeleted.Weset *r=NULLheretoensurethatanydereference *ofrthatmightbeaddedlaterinthisfunction *willresultinasegfaultimmediatelyinstead *ofnondeterministicfailureslater.
*/
r = NULL;
}
if (c->keepalive != AP_CONN_KEEPALIVE || c->aborted) break;
if (ap_mpm_query(AP_MPMQ_MPM_STATE, &mpm_state)) { break;
}
if (mpm_state == AP_MPMQ_STOPPING) { break;
}
if (!csd) {
csd = ap_get_conn_socket(c);
}
apr_socket_opt_set(csd, APR_INCOMPLETE_READ, 1);
apr_socket_timeout_set(csd, keep_alive_timeout); /* Go straight to select() to wait for the next request */
}
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.15Bemerkung:
(vorverarbeitet am 2026-09-28)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.