Re: Output filters and body filters

2018-08-20 Thread Antonio Nappa
; ngx_http_send_header(r); rc = ngx_http_output_filter(r, ); ngx_http_finalize_request(r, NGX_ERROR); Thanks, Antonio Il giorno ven 17 ago 2018 alle ore 01:28 Maxim Dounin ha scritto: > Hello! > > On Thu, Aug 16, 2018 at 12:36:05AM +0200, Antonio Nappa wrote: > > >

Output filters and body filters

2018-08-15 Thread Antonio Nappa
Hello, I have two modules loaded and it looks like when I terminate a request from one module by calling ngx_http_output_filter the body filter in the other module does not get called. The module with the body filter is loaded first in the config (IMO it shouldn't matter). Do you have any

When to delete event timers

2018-08-14 Thread Antonio Nappa
Hello, I have a module which registers several events and I am using Nginx 1.12.1, it looks like when I do a reload that the worker(s) hang and with the help of strace I see that the events hanging are my events. I have added a function on process exit but it does not get called (probably because

ngx_write_fd

2018-03-29 Thread Antonio Nappa
Hi, I was wondering what happens with ngx_write_fd function and multiple workers, I have made some tests and it doesn't look like they are interfering with each other and writing in the middle of a line. However I am not sure, that's the reason of my question. The file was opened with the

Conditional Logging

2018-03-23 Thread Antonio Nappa
Hello, I am doing experiments on a module with the ngx_http_log_loc_conf_t structure by setting the off flag to 1. I have defined a custom log format and use it with the access_log directive. I noticed that if there is a 302 even if lcf->off is set to 1 I get some output in the log file. Do you

Permanent structure to accumulate data

2018-02-09 Thread Antonio Nappa
Hello, I am looking for a structure that I can use to store a counter in the module, this structure should not be reset every time there is a new request. I have made tests with the module custom ctx and the module custom srv configuration without success, which means every time there is a new

remote_port variable is empty in log

2017-09-08 Thread Antonio Nappa
Hello, Is there a reason why the $remote_port variable of the http module could be empty? I am using it in a custom log format, and from time to time it is empty. Thanks, Antonio ___ nginx-devel mailing list nginx-devel@nginx.org

PREACCESS CTX is NULL

2017-05-26 Thread Antonio Nappa
Hello, I am allocating a ctx (on r->connection->pool) during the POST_READ phase, and I find out that in PREACCESS the ctx is NULL, is this an intended behavior? Thanks, Jeppo ___ nginx-devel mailing list nginx-devel@nginx.org

Proxy Pass

2017-04-04 Thread Antonio Nappa
Hello, in another of my experiments I would like to redirect to a completely different website the request, I had a look at the proxy_pass directive and the corresponding module, and I see that a location handler is set, which means it will hook as the only content handler. My question is, could I

Re: Module connecting outside

2017-03-30 Thread Antonio Nappa
is to send some information to the outside world and both ways may work, but I want to be sure to make the correct design decision. Thanks a lot, Antonio 2017-03-21 14:57 GMT+01:00 Maxim Dounin <mdou...@mdounin.ru>: > Hello! > > On Tue, Mar 21, 2017 at 02:42:01PM +0100, Anto

Module connecting outside

2017-03-08 Thread Antonio Nappa
Hello everyone, I am in the process of creating a module that connects to the outside to exchange data with another service, I am taking as inspiration the mail_module and the upstream module, basically my module is connecting using the ngx_event_connect_peer and handling the read and write