Re: Internals: how do I send large file to the client?

2013-08-14 Thread ruslan_osmanov
I know those commands. But the question was about Nginx's internals. I thought somebody would suggest a pseudo-code snippet similar to the following: ngx_buf_t b; size_t length = 0; loop (files as file) { ... u_char *filename = file->name; if (ngx_open_cached_file(ccf->open_file

Internals: how do I send large file to the client?

2013-08-12 Thread ruslan_osmanov
Hi, I'm writing a filter module which implies a backend to be sending XML with information about files that have to be concatenated and sent to the client. One way to send a file is to `ngx_read_file` into a buffer allocated in the heap(pool) and push it onto the chain. However, I obviously can't

Re: My filter module is not called

2013-08-11 Thread ruslan_osmanov
Yes, indeed, I had to put it into HTTP_FILTER_MODULES. Thank you! Posted at Nginx Forum: http://forum.nginx.org/read.php?2,241761,241767#msg-241767 ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx

Re: My filter module is not called

2013-08-11 Thread ruslan_osmanov
Oh, sorry, the `config` file contains: ngx_addon_name=ngx_http_file_chunks_filter_module HTTP_MODULES="$HTTP_MODULES ngx_http_file_chunks_filter_module" HTTP_INCS="$HTTP_INCS /usr/include/libxml2 " CORE_LIBS="$CORE_LIBS -lxml2" NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/ngx_http_file_chunks

Re: My filter module is not called

2013-08-11 Thread ruslan_osmanov
Thank you for the reply. Hmm, maybe I build it different way. I have the following files to configure, make and install it: conf.sh: cd ~/src/nginx ./auto/configure --prefix=/home/ruslan \ --with-debug \ --conf-path=/home/ruslan/etc/nginx/nginx.conf \ --user=ruslan \

My filter module is not called

2013-08-11 Thread ruslan_osmanov
Hi, I'm writing a filter module which will output static files according to information returned by an upstream handler like FastCGI, or Apache. There is some testing code in header/body filters. I'm launching the server merely to see whether my code is invoked. All configuration and cleanup stuf