#include "ngx_http_xxslt_filter_module.h"#include "ngx_http_xxslt_selector.h"#include <download/ngx_http_download_module.h>Go to the source code of this file.
Functions | |
| static void * | ngx_http_xxslt_filter_create_conf (ngx_conf_t *cf) |
| Nginx module configuration. | |
| static char * | ngx_http_xxslt_filter_merge_conf (ngx_conf_t *cf, void *parent, void *child) |
| Nginx module configuration. | |
| static ngx_int_t | ngx_http_xxslt_filter_init (ngx_conf_t *cf) |
| Filter initialization. | |
| static void | ngx_http_xxslt_filter_exit (ngx_cycle_t *cycle) |
| Filter exit. | |
| static void | ngx_http_xxslt_process_unknown_result (ngx_http_xxslt_out_data_t *data) |
| Processes the data accordingly. | |
| static void | ngx_http_xxslt_process_parse_result (ngx_http_xxslt_out_data_t *data) |
| Processes the parse data accordingly. | |
| static ngx_int_t | ngx_http_xxslt_finalize (ngx_http_request_t *r) |
| Finalizes XXSLT, sends the result to the client. | |
| static ngx_int_t | ngx_http_xxslt_send (ngx_http_request_t *r, ngx_chain_t *in, ngx_int_t total_len) |
| Sends the result to the client. | |
| static void | ngx_http_xxslt_cleanup (void *cln_data) |
| Release allocated resources from the module and other related. | |
| void | ngx_http_xxslt_enqueue_data (ngx_http_xxslt_out_data_t *data) |
| Enqueues data pack in global output data queue. | |
| ngx_int_t | ngx_http_xxslt_process_data (ngx_http_request_t *r) |
| Processes output data packs. | |
| static void | ngx_http_xxslt_fast_handler (ngx_http_request_t *r) |
| Pushes the data out to client and finalizes request. | |
| ngx_int_t | ngx_http_xxslt_finalize_with_error (ngx_http_request_t *r, ngx_int_t err, char *msg,...) |
| Finalizes request and generates an appropriate error page. | |
| static ngx_int_t | ngx_http_xxslt_header_filter (ngx_http_request_t *r) |
| XXSLT header filter. | |
| static ngx_int_t | ngx_http_xxslt_body_filter (ngx_http_request_t *r, ngx_chain_t *in) |
| XXSLT body filter. | |
Variables | |
| static ngx_str_t | ngx_http_xxslt_default_types [] |
| HTTP content types accepted by XXSLT module. | |
| static ngx_command_t | ngx_http_xxslt_filter_commands [] |
| Nginx config file commands configuration. | |
| static ngx_http_module_t | ngx_http_xxslt_filter_module_ctx |
| Nginx module context. | |
| ngx_module_t | ngx_http_xxslt_filter_module |
| Nginx module settings. | |
| static ngx_http_output_header_filter_pt | ngx_http_next_header_filter |
| static ngx_http_output_body_filter_pt | ngx_http_next_body_filter |
| static ngx_int_t ngx_http_xxslt_body_filter | ( | ngx_http_request_t * | r, | |
| ngx_chain_t * | in | |||
| ) | [static] |
XXSLT body filter.
If xxslt enabled then processes input chain. Inputs are shared between the respective modules.
| r | nginx http request | |
| in | data input chain |
Definition at line 618 of file ngx_http_xxslt_filter_module.c.
References ngx_http_xxslt_selector_data_t::async, ngx_http_xxslt_filter_ctx_t::async, ngx_http_xxslt_filter_ctx_t::done, ngx_http_next_body_filter, ngx_http_xxslt_filter_module, ngx_http_xxslt_selector_add_data_chunk(), ngx_http_xxslt_selector_init(), and ngx_http_xxslt_filter_ctx_t::selector.
Referenced by ngx_http_xxslt_filter_init().
| static void ngx_http_xxslt_cleanup | ( | void * | cln_data | ) | [static] |
Release allocated resources from the module and other related.
| cln_data | module context |
Definition at line 290 of file ngx_http_xxslt_filter_module.c.
References ngx_http_xxslt_out_data_s::data_type, ngx_http_xxslt_out_data_s::next, ngx_http_xxslt_parse_cleanup(), ngx_http_xxslt_selector_cleanup(), NGX_HTTP_XXSLT_SELECTOR_PARSE, NGX_HTTP_XXSLT_SELECTOR_UNKNOWN, ngx_http_xxslt_filter_ctx_t::out_data, ngx_http_xxslt_out_data_s::parse, and ngx_http_xxslt_filter_ctx_t::selector.
Referenced by ngx_http_xxslt_header_filter().
| void ngx_http_xxslt_enqueue_data | ( | ngx_http_xxslt_out_data_t * | data | ) |
Enqueues data pack in global output data queue.
That queue is checked and processed every ngx_http_xxslt_process_data call.
| data | output data pack |
Definition at line 143 of file ngx_http_xxslt_filter_module.c.
References ngx_http_xxslt_filter_ctx_t::act_data, ngx_http_xxslt_out_data_s::next, ngx_http_xxslt_filter_module, ngx_http_xxslt_filter_ctx_t::out_data, ngx_http_xxslt_filter_ctx_t::out_data_tail, and ngx_http_xxslt_out_data_s::r.
Referenced by ngx_http_xxslt_selector_parse_match(), and ngx_http_xxslt_selector_unknown_match().
| static void ngx_http_xxslt_fast_handler | ( | ngx_http_request_t * | r | ) | [static] |
Pushes the data out to client and finalizes request.
It's called by nginx core when socket is ready to accept more data.
| r | nginx http request |
Definition at line 266 of file ngx_http_xxslt_filter_module.c.
Referenced by ngx_http_xxslt_send().
| static void * ngx_http_xxslt_filter_create_conf | ( | ngx_conf_t * | cf | ) | [static] |
Nginx module configuration.
| cf | config |
Definition at line 811 of file ngx_http_xxslt_filter_module.c.
References ngx_http_xxslt_filter_loc_conf_t::cache_expire, ngx_http_xxslt_filter_loc_conf_t::cache_timeout, ngx_http_xxslt_filter_loc_conf_t::download_timeout, and ngx_http_xxslt_filter_loc_conf_t::enabled.
| static void ngx_http_xxslt_filter_exit | ( | ngx_cycle_t * | cycle | ) | [static] |
Filter exit.
| cycle | nginx cycle pointer |
Definition at line 885 of file ngx_http_xxslt_filter_module.c.
| static ngx_int_t ngx_http_xxslt_filter_init | ( | ngx_conf_t * | cf | ) | [static] |
Filter initialization.
| cf | config |
Definition at line 864 of file ngx_http_xxslt_filter_module.c.
References ngx_http_next_body_filter, ngx_http_next_header_filter, ngx_http_xxslt_body_filter(), and ngx_http_xxslt_header_filter().
| static char * ngx_http_xxslt_filter_merge_conf | ( | ngx_conf_t * | cf, | |
| void * | parent, | |||
| void * | child | |||
| ) | [static] |
Nginx module configuration.
| cf | config | |
| parent | previous config | |
| child | config |
Definition at line 837 of file ngx_http_xxslt_filter_module.c.
References ngx_http_xxslt_filter_loc_conf_t::cache_expire, ngx_http_xxslt_filter_loc_conf_t::cache_timeout, ngx_http_xxslt_filter_loc_conf_t::download_timeout, ngx_http_xxslt_filter_loc_conf_t::enabled, ngx_http_xxslt_default_types, ngx_http_xxslt_filter_loc_conf_t::types, and ngx_http_xxslt_filter_loc_conf_t::types_keys.
| static ngx_int_t ngx_http_xxslt_finalize | ( | ngx_http_request_t * | r | ) | [static] |
Finalizes XXSLT, sends the result to the client.
| r | nginx http request |
Definition at line 425 of file ngx_http_xxslt_filter_module.c.
References ngx_http_xxslt_out_data_s::buffer_chain, ngx_http_xxslt_out_data_s::done, ngx_http_xxslt_out_data_s::error, ngx_http_xxslt_out_data_s::last, ngx_http_xxslt_out_data_s::len, ngx_http_xxslt_out_data_s::next, ngx_http_xxslt_filter_module, ngx_http_xxslt_send(), and ngx_http_xxslt_filter_ctx_t::out_data.
Referenced by ngx_http_xxslt_process_data().
| ngx_int_t ngx_http_xxslt_finalize_with_error | ( | ngx_http_request_t * | r, | |
| ngx_int_t | err, | |||
| char * | msg, | |||
| ... | ||||
| ) |
Finalizes request and generates an appropriate error page.
If err is greater than 0, then the page will be generated with your msg, otherwise the standard nginx 503 page.
| r | nginx http request | |
| err | error code | |
| msg | error page message |
Definition at line 330 of file ngx_http_xxslt_filter_module.c.
References ngx_http_xxslt_send().
Referenced by ngx_http_xxslt_parse_add_data_chunk(), ngx_http_xxslt_parse_apply(), ngx_http_xxslt_parse_get_external_include(), ngx_http_xxslt_parse_get_local_include(), ngx_http_xxslt_parse_process_include(), and ngx_http_xxslt_unknown_add_data_chunk().
| static ngx_int_t ngx_http_xxslt_header_filter | ( | ngx_http_request_t * | r | ) | [static] |
XXSLT header filter.
If xxslt enabled captures headers.
| r | nginx http request |
Definition at line 565 of file ngx_http_xxslt_filter_module.c.
References ngx_http_xxslt_filter_loc_conf_t::enabled, ngx_http_next_header_filter, ngx_http_xxslt_cleanup(), ngx_http_xxslt_filter_module, and ngx_http_xxslt_filter_loc_conf_t::types.
Referenced by ngx_http_xxslt_filter_init().
| ngx_int_t ngx_http_xxslt_process_data | ( | ngx_http_request_t * | r | ) |
Processes output data packs.
Passes through the queue and performs actions specific to the data type.
| r | nginx http request |
Definition at line 177 of file ngx_http_xxslt_filter_module.c.
References ngx_http_xxslt_filter_ctx_t::act_data, ngx_http_xxslt_out_data_s::data_type, ngx_http_xxslt_parse_data_t::done, ngx_http_xxslt_unknown_data_t::done, ngx_http_xxslt_out_data_s::last, ngx_http_xxslt_out_data_s::next, ngx_http_xxslt_filter_module, ngx_http_xxslt_finalize(), ngx_http_xxslt_parse_apply(), ngx_http_xxslt_process_parse_result(), ngx_http_xxslt_process_unknown_result(), NGX_HTTP_XXSLT_SELECTOR_PARSE, NGX_HTTP_XXSLT_SELECTOR_UNKNOWN, ngx_http_xxslt_filter_ctx_t::out_data_tail, ngx_http_xxslt_out_data_s::parse, and ngx_http_xxslt_out_data_s::unknown.
Referenced by ngx_http_xxslt_parse_process_include(), ngx_http_xxslt_selector_add_data_chunk(), and ngx_http_xxslt_unknown_add_data_chunk().
| static void ngx_http_xxslt_process_parse_result | ( | ngx_http_xxslt_out_data_t * | data | ) | [static] |
Processes the parse data accordingly.
| data | output data pack |
Definition at line 543 of file ngx_http_xxslt_filter_module.c.
References ngx_http_xxslt_parse_data_t::buffer_chain, ngx_http_xxslt_out_data_s::buffer_chain, ngx_http_xxslt_out_data_s::done, ngx_http_xxslt_out_data_s::len, ngx_http_xxslt_out_data_s::parse, ngx_http_xxslt_out_data_s::r, and ngx_http_xxslt_parse_data_t::res_len.
Referenced by ngx_http_xxslt_process_data().
| static void ngx_http_xxslt_process_unknown_result | ( | ngx_http_xxslt_out_data_t * | data | ) | [static] |
Processes the data accordingly.
| data | output data pack |
Definition at line 523 of file ngx_http_xxslt_filter_module.c.
References ngx_http_xxslt_unknown_data_t::buffer_chain, ngx_http_xxslt_out_data_s::buffer_chain, ngx_http_xxslt_out_data_s::done, ngx_http_xxslt_out_data_s::len, ngx_http_xxslt_out_data_s::r, ngx_http_xxslt_unknown_data_t::res_len, and ngx_http_xxslt_out_data_s::unknown.
Referenced by ngx_http_xxslt_process_data().
| ngx_int_t ngx_http_xxslt_send | ( | ngx_http_request_t * | r, | |
| ngx_chain_t * | in, | |||
| ngx_int_t | total_len | |||
| ) | [static] |
Sends the result to the client.
Configures or runs the fast handler.
| r | nginx http request | |
| in | data chain | |
| total_len | data len |
Definition at line 723 of file ngx_http_xxslt_filter_module.c.
References ngx_http_xxslt_filter_ctx_t::async, ngx_http_xxslt_filter_ctx_t::done, ngx_http_next_body_filter, ngx_http_next_header_filter, ngx_http_xxslt_fast_handler(), and ngx_http_xxslt_filter_module.
Referenced by ngx_http_xxslt_finalize(), and ngx_http_xxslt_finalize_with_error().
ngx_http_output_body_filter_pt ngx_http_next_body_filter [static] |
Definition at line 134 of file ngx_http_xxslt_filter_module.c.
Referenced by ngx_http_xxslt_body_filter(), ngx_http_xxslt_filter_init(), and ngx_http_xxslt_send().
ngx_http_output_header_filter_pt ngx_http_next_header_filter [static] |
Definition at line 133 of file ngx_http_xxslt_filter_module.c.
Referenced by ngx_http_xxslt_filter_init(), ngx_http_xxslt_header_filter(), and ngx_http_xxslt_send().
ngx_str_t ngx_http_xxslt_default_types[] [static] |
{
ngx_string("text/html"),
ngx_null_string
}
HTTP content types accepted by XXSLT module.
Definition at line 53 of file ngx_http_xxslt_filter_module.c.
Referenced by ngx_http_xxslt_filter_merge_conf().
ngx_command_t ngx_http_xxslt_filter_commands[] [static] |
Nginx config file commands configuration.
Definition at line 59 of file ngx_http_xxslt_filter_module.c.
| ngx_module_t ngx_http_xxslt_filter_module |
{
NGX_MODULE_V1,
&ngx_http_xxslt_filter_module_ctx,
ngx_http_xxslt_filter_commands,
NGX_HTTP_MODULE,
NULL,
NULL,
NULL,
NULL,
NULL,
ngx_http_xxslt_filter_exit,
ngx_http_xxslt_filter_exit,
NGX_MODULE_V1_PADDING
}
Nginx module settings.
Definition at line 115 of file ngx_http_xxslt_filter_module.c.
Referenced by ngx_http_xxslt_body_filter(), ngx_http_xxslt_enqueue_data(), ngx_http_xxslt_finalize(), ngx_http_xxslt_header_filter(), ngx_http_xxslt_parse_include_node(), ngx_http_xxslt_process_data(), and ngx_http_xxslt_send().
ngx_http_module_t ngx_http_xxslt_filter_module_ctx [static] |
{
NULL,
ngx_http_xxslt_filter_init,
NULL,
NULL,
NULL,
NULL,
ngx_http_xxslt_filter_create_conf,
ngx_http_xxslt_filter_merge_conf
}
Nginx module context.
Definition at line 100 of file ngx_http_xxslt_filter_module.c.
1.6.1