MCPcopy Create free account
hub / github.com/apache/httpd / ap_create_request

Function ap_create_request

server/protocol.c:1356–1410  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1354}
1355
1356AP_DECLARE(request_rec *) ap_create_request(conn_rec *conn)
1357{
1358 request_rec *r;
1359 apr_pool_t *p;
1360
1361 apr_pool_create(&p, conn->pool);
1362 apr_pool_tag(p, "request");
1363 r = apr_pcalloc(p, sizeof(request_rec));
1364 AP_READ_REQUEST_ENTRY((intptr_t)r, (uintptr_t)conn);
1365 r->pool = p;
1366 r->connection = conn;
1367 r->server = conn->base_server;
1368
1369 r->user = NULL;
1370 r->ap_auth_type = NULL;
1371
1372 r->allowed_methods = ap_make_method_list(p, 2);
1373
1374 r->headers_in = apr_table_make(r->pool, 25);
1375 r->trailers_in = apr_table_make(r->pool, 5);
1376 r->subprocess_env = apr_table_make(r->pool, 25);
1377 r->headers_out = apr_table_make(r->pool, 12);
1378 r->err_headers_out = apr_table_make(r->pool, 5);
1379 r->trailers_out = apr_table_make(r->pool, 5);
1380 r->notes = apr_table_make(r->pool, 5);
1381
1382 r->request_config = ap_create_request_config(r->pool);
1383 /* Must be set before we run create request hook */
1384
1385 r->proto_output_filters = conn->output_filters;
1386 r->output_filters = r->proto_output_filters;
1387 r->proto_input_filters = conn->input_filters;
1388 r->input_filters = r->proto_input_filters;
1389 ap_run_create_request(r);
1390 r->per_dir_config = r->server->lookup_defaults;
1391
1392 r->sent_bodyct = 0; /* bytect isn't for body */
1393
1394 r->read_length = 0;
1395 r->read_body = REQUEST_NO_BODY;
1396
1397 r->status = HTTP_OK; /* Until further notice */
1398 r->header_only = 0;
1399 r->the_request = NULL;
1400
1401 /* Begin by presuming any module can make its own path_info assumptions,
1402 * until some module interjects and changes the value.
1403 */
1404 r->used_path_info = AP_REQ_DEFAULT_PATH_INFO;
1405
1406 r->useragent_addr = conn->client_addr;
1407 r->useragent_ip = conn->client_ip;
1408
1409 return r;
1410}
1411
1412/* Apply the server's timeout/config to the connection/request. */
1413static void apply_server_config(request_rec *r)

Callers 3

h2_create_request_recFunction · 0.85
ap_read_requestFunction · 0.85
http_protocol.hFile · 0.85

Calls 2

ap_make_method_listFunction · 0.85
ap_create_request_configFunction · 0.85

Tested by

no test coverage detected