Re: [nginx module] Save response into temp file

2014-10-09 Thread hungnguyen
Hello, Sorry for my late replay. Now I can be able to write file into disk and read from it without problem (csv file) by using this: ngx_temp_file_t *tf; tf = ngx_pcalloc(r->pool, sizeof (ngx_temp_file_t)); tf->file.fd = NGX_INVALID_FILE; tf->file.lo

Re: [nginx module] Save response into temp file

2014-09-24 Thread Wandenberg Peixoto
As your snippet is very short I cannot be sure but some questions to guide on debugging - did you closed the file when finished to write? some bytes may be in buffer and will be flushed after the close. - the m->chain was used before to write its content to other place? If yes, may be necessary to

Re: [nginx module] Save response into temp file

2014-09-24 Thread hungnguyen
anyone? Please! Posted at Nginx Forum: http://forum.nginx.org/read.php?2,253477,253506#msg-253506 ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx

[nginx module] Save response into temp file

2014-09-23 Thread Hung Nguyen
Hi, I am working on an nginx module, that has flow: receive user request -> parse request -> read local file -> process file -> response to client This flow is working well. But now we have another requirement. Afer process this file and build response into ngx_chain, I want to write response c