how to write a filter module after the postpone filter . if i change module's config file or complie file (auto/) ? any example?by honwel - Nginx Mailing List - English
hi, angentzh I use echo module(angentzh) to issue a subrequest(POST method) that it's body from parent's request body, and i add some code in ngx_http_echo_subrequest->ngx_http_echo_parse_subrequest_spec : so, it's not work, but change to '-b' or '-f', it's OK. help ? ........................ if (ngx_strncmp("-h", arg->data, arg->len) == 0) { //by honwel - Nginx Mailing List - English
Excepting response: "John abc" Not Response1:"John" Response2:"abc" Thanks for your patience!by honwel - Nginx Mailing List - English
Yes,you are right. But I want combine the data like: Subrequst1's response: "first name: John" Subrequst2's response: "last name: abc" Excepting response: "John abc"by honwel - Nginx Mailing List - English
hi, agentzh There is also a problem that how can hold the one subrequest's response meanwhile waiting others(subrequest) comes, then combine the all response(data) and send it to client? is it possible? thanks a lot! Best regards, honwelby honwel - Nginx Mailing List - English
hi, Maxim It is seem like that ngx_http_subrequest() supports only GET method: sr->method = NGX_HTTP_GET; sr->http_version = r->http_version; ............... sr->method_name = ngx_http_core_get_method; In my application currently, NGINX received a POST request and issue mutiple subrequests(Parallel) to get combine content by set proxy_pass loby honwel - Nginx Mailing List - English
Ok,thanks a lot,I will try.by honwel - Nginx Mailing List - English
Hi I want write a http hadler(using subrequest) to deal with combine response from mutiple backend. but "Emiller's Advanced Topics In Nginx Module Development - 2.3. Sequential subrequests" issue that " Subrequests might need to access the network, and if so, Nginx needs to return to its other work while it waits for a response. So we need to check the return value of ngx_httby honwel - Nginx Mailing List - English
second rank pointer. ---- ctx->last_out Matches (10 in 1 files) ---- Ngx_http_gunzip_filter_module.c (add-on): ctx->last_out = &ctx->out; Ngx_http_gunzip_filter_module.c (add-on): ctx->last_out = &ctx->out; Ngx_http_gunzip_filter_module.c (add-on): *ctx->last_out = cl; Ngx_http_gunzip_filter_module.c (add-on): ctx->last_out = &cl->by honwel - Nginx Mailing List - English
Thanks, i add a line " len = NGX_SOCKADDRLEN ", then , it is ok! thanks very much. but i want to know , why? (struct sockaddr *) &sa and &len as are input paramter, why len need initialized?by honwel - Nginx Mailing List - English
static void 457 ngx_http_upstream_init_request(ngx_http_request_t *r) ........................................ 498 #endif 499 500 u->store = (u->conf->store || u->conf->store_lengths); 501 502 if (!u->store && !r->post_action && !u->conf->ignore_client_abort) { 503 r->read_event_handler = ngx_http_upstream_rd_check_brokeby honwel - Nginx Mailing List - English
Ok, code is as follow: Code: src/event/ngx_event_connect.c In ngx_event_connect_peer() .................................... rc = connect(s, pc->sockaddr, pc->socklen); if (rc == -1) { err = ngx_socket_errno; if (err != NGX_EINPROGRESS #if (NGX_WIN32) /* Winsock returns WSAEWOULDBLOCK (NGX_EAGAIN) */ && err != NGX_by honwel - Nginx Mailing List - English
Hi, there I want to get ip and port under forward proxy use NGINX, a forward proxy sketch like this: -> -> so i want to get proxy's ip and port . i have try and made some modifications to the source code including ngx_http_upstream.c ngx_event_connect.c , there are some details: 1、add local_socket variable to get socket fd in ngx_event_connect_peer() 2、add local_sockaddby honwel - Nginx Mailing List - English
good news !by honwel - Nginx Mailing List - English
i use valgrind to check memory leak, and have detected some error: ==2243== Invalid write of size 1 ==2243== at 0x4A08088: memcpy (mc_replace_strmem.c:628) ==2243== by 0x4448C9: ngx_http_proxy_subs_headers (ngx_http_proxy_subs_filter.c:149) ==2243== by 0x45B2FB: ngx_http_proxy_create_request (ngx_http_proxy_module.c:1235) ==2243== by 0x43EA7E: ngx_http_upstream_init_request (ngxby honwel - Nginx Mailing List - English
thanks, i will try as you mention and report it on forum.by honwel - Nginx Mailing List - English
hi on centos 6, nginx-1.2.2, nginx was compiled with: --prefix=/usr/local/nginx --user=root --group=root --with-http_ssl_module --with-ipv6 --with-pcre=/home/nginx/src/pcre-8.20 --with-openssl=/home/nginx/src/openssl-1.0.1c --with-zlib=/home/nginx/src/zlib-1.2.7 --add-module=/home/nginx/svn/nginx-1.2.2/src/add-on/nginx_subs_filter --add-module=/home/nginx/svn/nginx-1.2.2/src/add-on/nginx_gunby honwel - Nginx Mailing List - English