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

Function my_ap_create_request

modules/http2/h2_request.c:233–286  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

231
232#if !AP_MODULE_MAGIC_AT_LEAST(20120211, 106)
233static request_rec *my_ap_create_request(conn_rec *c)
234{
235 apr_pool_t *p;
236 request_rec *r;
237
238 apr_pool_create(&p, c->pool);
239 apr_pool_tag(p, "request");
240 r = apr_pcalloc(p, sizeof(request_rec));
241 AP_READ_REQUEST_ENTRY((intptr_t)r, (uintptr_t)c);
242 r->pool = p;
243 r->connection = c;
244 r->server = c->base_server;
245
246 r->user = NULL;
247 r->ap_auth_type = NULL;
248
249 r->allowed_methods = ap_make_method_list(p, 2);
250
251 r->headers_in = apr_table_make(r->pool, 5);
252 r->trailers_in = apr_table_make(r->pool, 5);
253 r->subprocess_env = apr_table_make(r->pool, 25);
254 r->headers_out = apr_table_make(r->pool, 12);
255 r->err_headers_out = apr_table_make(r->pool, 5);
256 r->trailers_out = apr_table_make(r->pool, 5);
257 r->notes = apr_table_make(r->pool, 5);
258
259 r->request_config = ap_create_request_config(r->pool);
260 /* Must be set before we run create request hook */
261
262 r->proto_output_filters = c->output_filters;
263 r->output_filters = r->proto_output_filters;
264 r->proto_input_filters = c->input_filters;
265 r->input_filters = r->proto_input_filters;
266 ap_run_create_request(r);
267 r->per_dir_config = r->server->lookup_defaults;
268
269 r->sent_bodyct = 0; /* bytect isn't for body */
270
271 r->read_length = 0;
272 r->read_body = REQUEST_NO_BODY;
273
274 r->status = HTTP_OK; /* Until further notice */
275 r->header_only = 0;
276 r->the_request = NULL;
277
278 /* Begin by presuming any module can make its own path_info assumptions,
279 * until some module interjects and changes the value.
280 */
281 r->used_path_info = AP_REQ_DEFAULT_PATH_INFO;
282
283 r->useragent_addr = c->client_addr;
284 r->useragent_ip = c->client_ip;
285 return r;
286}
287#endif
288
289#if AP_HAS_RESPONSE_BUCKETS

Callers 1

h2_create_request_recFunction · 0.85

Calls 2

ap_make_method_listFunction · 0.85
ap_create_request_configFunction · 0.85

Tested by

no test coverage detected