Go to the source code of this file.
Data Structures | |
struct | ngx_http_download_conn_s |
Download structure. More... | |
struct | ngx_http_download_conf_t |
Download configuration. More... | |
Defines | |
#define | BUFFER_SIZE 4096 |
Typedefs | |
typedef struct ngx_http_download_conn_s | ngx_http_download_conn_t |
typedef void(* | ngx_http_download_conn_handler_pt )(ngx_http_download_conn_t *conn) |
Functions | |
ngx_http_download_conn_t * | ngx_http_download_create_new () |
ngx_int_t | ngx_http_download_enqueue (ngx_http_download_conn_t *conn) |
Enqueues download, when finished done_handler will be called. | |
ngx_int_t | ngx_http_download_parse_url (ngx_str_t *url, ngx_http_download_conn_t *conn) |
Parses url and put all required data to download structure. | |
void | ngx_http_download_cleanup (ngx_http_download_conn_t *conn) |
Cancel download and free all allocated resources. |
#define BUFFER_SIZE 4096 |
Definition at line 25 of file ngx_http_download_module.h.
Referenced by ngx_http_download_create_new(), ngx_http_download_enqueue(), and ngx_http_download_read_handler().
typedef void(* ngx_http_download_conn_handler_pt)(ngx_http_download_conn_t *conn) |
Definition at line 28 of file ngx_http_download_module.h.
typedef struct ngx_http_download_conn_s ngx_http_download_conn_t |
Definition at line 27 of file ngx_http_download_module.h.
void ngx_http_download_cleanup | ( | ngx_http_download_conn_t * | conn | ) |
Cancel download and free all allocated resources.
conn | download structure |
Definition at line 357 of file ngx_http_download_module.c.
References ngx_http_download_conn_s::done, ngx_http_download_conn_s::done_handler, ngx_http_download_conn_s::log, ngx_http_download_conn_s::p, ngx_http_download_conn_s::pool, and ngx_http_download_conn_s::terminated.
Referenced by ngx_http_download_finalize_connection(), ngx_http_xslt2_xml_cleanup(), ngx_http_xxslt_parse_cleanup(), and ngx_http_xxslt_parse_get_external_include().
ngx_http_download_conn_t* ngx_http_download_create_new | ( | ) |
ngx_int_t ngx_http_download_enqueue | ( | ngx_http_download_conn_t * | conn | ) |
Enqueues download, when finished done_handler will be called.
conn | correctly set download structure |
Definition at line 153 of file ngx_http_download_module.c.
References ngx_http_download_conn_s::buffer, BUFFER_SIZE, ngx_http_download_conn_s::connect_timeout, ngx_http_download_conn_s::data, ngx_http_download_conn_s::done, ngx_http_download_conn_s::host, ngx_http_download_conn_s::log, ngx_http_download_create_request(), ngx_http_download_finalize_connection(), ngx_http_download_read_handler(), ngx_http_download_write_handler(), ngx_http_download_conn_s::out_bufs, ngx_http_download_conn_s::out_bufs_tail, ngx_http_download_conn_s::p, ngx_http_download_conn_s::pool, ngx_http_download_conn_s::port, ngx_http_download_conn_s::r, ngx_http_download_conn_s::read_timeout, ngx_http_download_conn_s::request, ngx_http_download_conn_s::response_length, ngx_http_download_conn_s::rpool, and ngx_http_download_conn_s::write_timeout.
Referenced by ngx_http_xslt2_xml_get_external_stylesheet(), and ngx_http_xxslt_parse_get_external_include().
ngx_int_t ngx_http_download_parse_url | ( | ngx_str_t * | url, | |
ngx_http_download_conn_t * | conn | |||
) |
Parses url and put all required data to download structure.
url | correct url, ex. http://example.com/file.php?a=1 | |
conn | initialized download structure |
Definition at line 255 of file ngx_http_download_module.c.
References ngx_http_download_conn_s::err, ngx_http_download_conn_s::host, ngx_http_download_conn_s::pool, ngx_http_download_conn_s::port, and ngx_http_download_conn_s::uri.
Referenced by ngx_http_xslt2_xml_get_external_stylesheet(), and ngx_http_xxslt_parse_get_external_include().