Lines Matching refs:f

72 	ap_filter_t *f; /* remaining output filters */  in php_apache_sapi_ub_write()  local
76 f = ctx->f; in php_apache_sapi_ub_write()
80 ba = f->c->bucket_alloc; in php_apache_sapi_ub_write()
86 if (ap_pass_brigade(f->next, bb) != APR_SUCCESS || ctx->r->connection->aborted) { in php_apache_sapi_ub_write()
97 ap_filter_t *f; in php_apache_sapi_header_handler() local
101 f = ctx->r->output_filters; in php_apache_sapi_header_handler()
254 ap_filter_t *f; /* output filters */ in php_apache_sapi_flush() local
269 f = ctx->f; in php_apache_sapi_flush()
280 if (ap_pass_brigade(f->next, bb) != APR_SUCCESS || ctx->r->connection->aborted) { in php_apache_sapi_flush()
300 php_apache_disable_caching(ap_filter_t *f) in php_apache_disable_caching() argument
306 f->r->no_local_copy = 1; in php_apache_disable_caching()
359 static int php_input_filter(ap_filter_t *f, apr_bucket_brigade *bb, in php_input_filter() argument
370 if (f->r->proxyreq) { in php_input_filter()
371 return ap_get_brigade(f->next, bb, mode, block, readbytes); in php_input_filter()
376 ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, f->r, in php_input_filter()
381 if ((rv = ap_get_brigade(f->next, bb, mode, block, readbytes)) != APR_SUCCESS) { in php_input_filter()
397 static void php_apache_request_ctor(ap_filter_t *f, php_struct *ctx TSRMLS_DC) in php_apache_request_ctor() argument
404 SG(sapi_headers).http_response_code = !f->r->status ? HTTP_OK : f->r->status; in php_apache_request_ctor()
405 SG(request_info).content_type = apr_table_get(f->r->headers_in, "Content-Type"); in php_apache_request_ctor()
408 SG(request_info).query_string = safe_strdup(f->r->args); in php_apache_request_ctor()
409 SG(request_info).request_method = f->r->method; in php_apache_request_ctor()
410 SG(request_info).proto_num = f->r->proto_num; in php_apache_request_ctor()
411 SG(request_info).request_uri = safe_strdup(f->r->uri); in php_apache_request_ctor()
412 SG(request_info).path_translated = safe_strdup(f->r->filename); in php_apache_request_ctor()
413 f->r->no_local_copy = 1; in php_apache_request_ctor()
415 f->r->content_type = apr_pstrdup(f->r->pool, content_type); in php_apache_request_ctor()
421 content_length = (char *) apr_table_get(f->r->headers_in, "Content-Length"); in php_apache_request_ctor()
424 apr_table_unset(f->r->headers_out, "Content-Length"); in php_apache_request_ctor()
425 apr_table_unset(f->r->headers_out, "Last-Modified"); in php_apache_request_ctor()
426 apr_table_unset(f->r->headers_out, "Expires"); in php_apache_request_ctor()
427 apr_table_unset(f->r->headers_out, "ETag"); in php_apache_request_ctor()
429 auth = apr_table_get(f->r->headers_in, "Authorization"); in php_apache_request_ctor()
432 if (SG(request_info).auth_user == NULL && f->r->user) { in php_apache_request_ctor()
433 SG(request_info).auth_user = estrdup(f->r->user); in php_apache_request_ctor()
441 static void php_apache_request_dtor(ap_filter_t *f TSRMLS_DC) in php_apache_request_dtor()
443 php_apr_bucket_brigade *pbb = (php_apr_bucket_brigade *)f->ctx; in php_apache_request_dtor()
460 static int php_output_filter(ap_filter_t *f, apr_bucket_brigade *bb) in php_output_filter() argument
463 void *conf = ap_get_module_config(f->r->per_dir_config, &php5_module); in php_output_filter()
470 if (f->r->proxyreq) { in php_output_filter()
474 return ap_pass_brigade(f->next, bb); in php_output_filter()
482 return ap_pass_brigade(f->next, bb); in php_output_filter()
485 if(f->ctx) { in php_output_filter()
486 pbb = (php_apr_bucket_brigade *)f->ctx; in php_output_filter()
488 pbb = f->ctx = apr_palloc(f->r->pool, sizeof(*pbb)); in php_output_filter()
489 pbb->bb = apr_brigade_create(f->r->pool, f->c->bucket_alloc); in php_output_filter()
492 if(ap_save_brigade(NULL, &pbb->bb, &bb, f->r->pool) != APR_SUCCESS) { in php_output_filter()
505 if (f->r->main == NULL || in php_output_filter()
507 f->r->subprocess_env != f->r->main->subprocess_env in php_output_filter()
510 ap_add_common_vars(f->r); in php_output_filter()
511 ap_add_cgi_vars(f->r); in php_output_filter()
516 ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, f->r, in php_output_filter()
524 ctx->f = f->next; /* save whatever filters are after us in the chain. */ in php_output_filter()
530 return ap_pass_brigade(f->next, bb); in php_output_filter()
534 php_apache_request_ctor(f, ctx TSRMLS_CC); in php_output_filter()
547 zfd.filename = f->r->filename; in php_output_filter()
556 php_apache_request_dtor(f TSRMLS_CC); in php_output_filter()
558 if (!f->r->main) { in php_output_filter()
562 b = apr_bucket_eos_create(f->c->bucket_alloc); in php_output_filter()
566 return ap_pass_brigade(f->next, pbb->bb); in php_output_filter()
641 static void php_add_filter(request_rec *r, ap_filter_t *f) in php_add_filter() argument
643 int output = (f == r->output_filters); in php_add_filter()
646 while (f) { in php_add_filter()
647 if (strcmp(f->frec->name, "PHP") == 0) { in php_add_filter()
654 f = f->next; in php_add_filter()