Re: Removing response headers

2013-07-03 Thread Yichun Zhang (agentzh)
Hello! On Tue, Jul 2, 2013 at 7:35 AM, Jeff Kaufman jef...@google.com wrote: In a header filter, to remove a filter that's already been set, I see two options: 1. set the header's hash to 0 For *response* headers, this approach is recommended. 2. actually delete the header from

Re: How to abort subrequest properly?

2013-07-03 Thread Yichun Zhang (agentzh)
Hello! On Wed, Jul 3, 2013 at 5:37 PM, Marcus Clyne wrote: If the subrequest uses the upstream mechanism, wouldn't it be safe to just close the socket of upstream's connection? I'm assuming there would be an entry in the error log, but is there anything harmful that could come from it? And

Re: How to abort subrequest properly?

2013-07-08 Thread Yichun Zhang (agentzh)
Hello! On Thu, Jul 4, 2013 at 3:41 AM, Marcus Clyne ngx.eug...@gmail.com wrote: The upstream request obviously needs to be closed properly, but if the upstream cleanup function is going to be called anyway by the main request, then I'm not sure it really makes any difference, and you'd be

Re: handle NGX_AGAIN properly

2013-07-14 Thread Yichun Zhang (agentzh)
Hello! On Sat, Jul 13, 2013 at 4:43 PM, Julien Zefi wrote: I have been trying many workarounds without luck, the last one that i have is that if in my timer-callback the flush returns NGX_AGAIN, invoke a new handler that sends out an empty chain, but it continue returning NGX_AGAIN, it never

Re: Only fire a handler once

2013-09-04 Thread Yichun Zhang (agentzh)
Hello! On Fri, Aug 16, 2013 at 10:28 PM, Aaron Bedra wrote: I'm looking for a way to make sure a handler only fires once. If your handler is possible to run multiple times for the same request (like the post_subrequest handlers) and you want to avoid that, you can just use a module ctx field to

Re: Disallowing multiple http {} blocks in nginx.conf?

2013-10-10 Thread Yichun Zhang (agentzh)
Hello! On Thu, Oct 10, 2013 at 1:21 PM, Maxim Dounin wrote: I don't thinks that it's a good idea to disallow configurations with multiple http{} blocks. While this wasn't claimed to be supported, it allows fun things like running multiple configuration isolated, and e.g. makes merging

[PATCH] ngx_gzip might hang the request for slow downstreams

2013-10-25 Thread Yichun Zhang (agentzh)
Hello! I've noticed a request hang due to an issue in ngx_http_gzip_filter_module's output body filter. Basically when the downstream connection is slow to write to, a write event can trigger a call of ngx_http_output_filter(r, NULL) but ngx_gzip's body filter does not pass the NULL chain link to

[PATCH] Request hang when cache_lock is used in subrequests

2013-10-26 Thread Yichun Zhang (agentzh)
Hello! Akos Gyimesi reported a request hang (downstream connections stuck in the CLOSE_WAIT state forever) regarding use of proxy_cache_lock in subrequests. The issue is that when proxy_cache_lock_timeout is reached, ngx_http_file_cache_lock_wait_handler calls r-connection-write-handler()

[PATCH] Make $proxy_host and $proxy_port accessible in dynamic languages

2013-10-27 Thread Yichun Zhang (agentzh)
Hello! Recently a user of our ngx_lua module reported that he could not access $proxy_host and $proxy_port in Lua because these two variables set the flag NGX_HTTP_VAR_NOHASH: https://github.com/chaoslawful/lua-nginx-module/issues/301 The patch below removes this flag from these two

[PATCH] Cache: gracefully exit the cache manager process

2013-11-04 Thread Yichun Zhang (agentzh)
Hello! I've recently run into an issue in the nginx cache manager process which does not call ngx_worker_process_exit to gracefully exit, thus tragically skipping all my cleanup code registered by my (3rd-party) modules. Below is a patch to fix this. This fix also makes the cache manager process

Re: [PATCH] Cache: gracefully exit the cache manager process

2013-11-04 Thread Yichun Zhang (agentzh)
Hello! On Mon, Nov 4, 2013 at 1:31 PM, Maxim Dounin wrote: The cache manager process isn't worker process, so calling ngx_worker_process_exit() looks strange. But ngx_cache_manager_process_cycle() is already calling ngx_worker_process_init(). Are you suggesting removing this call as well?

Re: Help on designing using multiple location/upstream modules

2013-11-27 Thread Yichun Zhang (agentzh)
Hello! On Tue, Nov 26, 2013 at 4:30 AM, Reetesh Ranjan wrote: I have thought of the following design, in terms of nginx modules I would use: 1 My main location module that picks the keywords entered and communicates to Redis and Sphinx 2 For communicating to Redis I thought of using

[PATCH] Resolver: added support for domain names with a trailing dot

2014-01-08 Thread Yichun Zhang (agentzh)
Hello! We've noticed that the builtin resolver in Nginx cannot handle domain names with a trailing dot (like agentzh.org.) and just return the error Host not found. The following patch attempts a fix. Thanks! -agentzh # HG changeset patch # User Yichun Zhang agen...@gmail.com # Date 1389209699

Re: [PATCH] Resolver: added support for domain names with a trailing dot

2014-01-10 Thread Yichun Zhang (agentzh)
Hello! On Fri, Jan 10, 2014 at 11:10 AM, Ruslan Ermilov wrote: There's no such thing as domain names with a trailing dot, with one exception of the root domain name. Well, they are just a fully qualified domain names. So I must ask. Why do you think that resolver in nginx should ever

Re: Help with shared memory usage

2014-01-22 Thread Yichun Zhang (agentzh)
Hello Maxim! On Wed, Jan 22, 2014 at 8:51 AM, Maxim Dounin wrote: It looks more or less correct, though I don't happy with the checks done, and there are various style issues. I'm planning to look into it and build a better version as time permits. We're also having this issue. Hopefully

Valgrind error in nginx 1.5.9

2014-03-05 Thread Yichun Zhang (agentzh)
Hello! My EC2 test cluster caught a valgrind error in nginx 1.5.9 recently which I cannot easily reproduce by hand. Just FYI :) ==28619== Invalid read of size 1 ==28619== at 0x426B11: ngx_init_cycle (ngx_cycle.c:535) ==28619== by 0x437DA1: ngx_master_process_cycle (ngx_process_cycle.c:240)

Re: [PATCH] Configure: call make distclean for zlib only if Makefile exists

2014-04-24 Thread Yichun Zhang (agentzh)
Hello! On Thu, Apr 24, 2014 at 7:47 PM, Ryan Brown wrote: Slightly off-topic, does cloudflare have a nginx fork publicly available? No. Actually we've been trying hard not to diverge from the official nginx core too far. That's why we've been working hard on the openresty bundle project:

[PATCH] Core: merge adjacent free slab pages to ameliorate fragmentation from multi-page blocks (Was Re: Help with shared memory usage)

2014-05-11 Thread Yichun Zhang (agentzh)
Hello! On Mon, Jul 29, 2013 at 10:11 AM, Maxim Dounin wrote: Additionally, doing a full merge of all free blocks on a free operation looks too much. It might be something we want to do on allocation failure, but not on a normal path in ngx_slab_free_pages(). And/or something lightweight may

Re: [PATCH] Core: merge adjacent free slab pages to ameliorate fragmentation from multi-page blocks (Was Re: Help with shared memory usage)

2014-05-31 Thread Yichun Zhang (agentzh)
Hi Maxim! On Wed, May 28, 2014 at 11:38 AM, Maxim Dounin wrote: Below is a patch which does mostly the same without introducing any additional per-page fields. Please take a look if it works for you. Thank you for looking into this! I've run my local test suite for this issue against an

Re: [PATCH] Core: use uppercase hexadecimal digits for percent-encoding

2014-06-30 Thread Yichun Zhang (agentzh)
Hello! On Fri, Jun 27, 2014 at 10:57 AM, Maxim Dounin wrote: I can't say I like this change. I've considered this a while ago, and decided to keep it as is. This preserve compatibility with what nginx used to do for years. And it also looks like Apache does the same. Any other opinions?

Re: couple questions regarding log phase handlers

2014-07-07 Thread Yichun Zhang (agentzh)
Hello! On Mon, Jul 7, 2014 at 1:49 PM, bsfranks wrote: Also, is the log phase resumable? It looks like all the log phase handlers are looped through in ngx_http_log_request() called from ngx_http_free_request(). However, return codes are not checked. Was hoping for a way to return

Re: [nginx] Entity tags: explicit flag to skip not modified filter.

2014-07-14 Thread Yichun Zhang (agentzh)
Hello! On Wed, Jun 25, 2014 at 3:40 PM, Maxim Dounin wrote: +r-disable_not_modified = !u-cacheable; + Hmm, this line of change is giving me problems to fix the new regression in my ngx_memc module's memc_flags_to_last_modified feature

Re: [nginx] Entity tags: explicit flag to skip not modified filter.

2014-07-16 Thread Yichun Zhang (agentzh)
Hello! On Wed, Jul 16, 2014 at 8:54 AM, Maxim Dounin wrote: The same applies to r-headers_out.last_modified_time modifications in your module - what previously worked in your module was a hack, and there is no surprise it no longer works after changes. IMHO, the ngx_http_upstream_module

[PATCH] Proxy: added timeout protection to SSL handshake.

2014-07-22 Thread Yichun Zhang (agentzh)
# HG changeset patch # User Yichun Zhang agen...@gmail.com # Date 1406068295 25200 # Tue Jul 22 15:31:35 2014 -0700 # Node ID 1db962fc3522ce61313b684ca8251a6462992d40 # Parent 93614769dd4b6df8844c3c43c6a0b3f83bfa6746 Proxy: added timeout protection to SSL handshake. Previously, proxy relied

Re: [PATCH] Proxy: added timeout protection to SSL handshake.

2014-07-23 Thread Yichun Zhang (agentzh)
Hi Maxim! On Wed, Jul 23, 2014 at 7:10 AM, Maxim Dounin wrote: Thanks for noting this. I think that it would be better to use slightly different code, similar to what to we use in case of client SSL handshakes: [...] This will consistently limit total connect and ssl handshake time to

Re: Reading request body in PRE_ACCESS phase

2014-08-28 Thread Yichun Zhang (agentzh)
Hello! On Thu, Aug 28, 2014 at 10:34 AM, Fasih wrote: I am trying to read the request body in pre_access phase. This seems like a regular requirement but I dont seem to find a good way to do this. Since the request body is read asynchronously, I have to do phases++ and core_run_phases myself

Re: Reading request body in PRE_ACCESS phase

2014-08-29 Thread Yichun Zhang (agentzh)
Hello! On Fri, Aug 29, 2014 at 12:53 AM, Fasih wrote: Btw, I think you have to set write_event_handler to empty. Basically, if you dont set it, and there is a write_event (while the body is not read), nginx would call core_run_phases which you werent expecting. The

[BUG] ngx_http_sub_module fails to process single-char patterns

2014-09-03 Thread Yichun Zhang (agentzh)
Hello! I've noted a bug in nginx 1.7.4's standard ngx_http_sub_module that single-char patterns are never handled properly but longer patterns work. Consider the following minimal example: location = /t { default_type text/html; return 200 hello world; sub_filter 'h'

Re: [BUG] ngx_http_sub_module fails to process single-char patterns

2014-09-03 Thread Yichun Zhang (agentzh)
Hello! On Wed, Sep 3, 2014 at 12:06 PM, Yichun Zhang (agentzh) wrote: I've noted a bug in nginx 1.7.4's standard ngx_http_sub_module that single-char patterns are never handled properly but longer patterns work. Oops, I used to report this issue almost 2 years ago: http

Re: [BUG] ngx_http_sub_module fails to process single-char patterns

2014-09-03 Thread Yichun Zhang (agentzh)
Hi Konstantin On Wed, Sep 3, 2014 at 12:20 PM, Konstantin Pavlov wrote: And it was, nine days ago: http://hg.nginx.org/nginx/rev/5322be87fc02 Awesome! Thanks! Sorry for not checking the latest hg repos :) Regards, -agentzh ___ nginx-devel mailing

Re: [nginx-announce] nginx security advisory (CVE-2014-3616)

2014-09-17 Thread Yichun Zhang (agentzh)
Hello! On Wed, Sep 17, 2014 at 12:58 AM, Christos Trochalakis wrote: I am one of the debian nginx maintainers. Is it possible to provide a patch for nginx-1.2 series since the relevant commit is not backportable as-is? +1 I also hope there is a standalone patch that can (also) be applied to

Re: [BUG] New memory invalid read regression in resolver since nginx 1.7.5

2014-10-01 Thread Yichun Zhang (agentzh)
Hello! On Tue, Sep 30, 2014 at 5:36 PM, Maxim Dounin wrote: With such a change timer idents will become much less readable for connection-related timers (that is, most of them), so this is a last resort. Yes, I know. Maybe let the caller explicitly tell ngx_event_t whether ev-data is an

[PATCH] Fix a buffer overflow issue in ngx_hash_t when exceeding limits

2014-10-02 Thread Yichun Zhang (agentzh)
Hello! Valgrind memcheck caught a buffer overflow issue in ngx_hash_t when exceeding the pre-configured limits on my side: ==7417== Invalid write of size 2 ==7417==at 0x40600D: ngx_hash_init (ngx_hash.c:324) ==7417==by 0x45BBFD: ngx_http_proxy_merge_loc_conf

Re: Session Ticket Rotation

2014-10-10 Thread Yichun Zhang (agentzh)
Hello! On Mon, Sep 22, 2014 at 4:39 AM, Richard Fussenegger, BSc wrote: I'd like to implement built-in session ticket rotation. I know that it this was discussed before but it was never implemented. Right now a custom external ticket key system is supported. Admins with single installations

Gzip Gunzip: always flush busy bufs when the incoming chain is NULL.

2014-10-31 Thread Yichun Zhang (agentzh)
# HG changeset patch # User Yichun Zhang agen...@gmail.com # Date 1414804249 25200 # Fri Oct 31 18:10:49 2014 -0700 # Node ID 38a74e59f199edafad0a8caae5cfc921ab3302e8 # Parent dff86e2246a53b0f4a61935cd5c8c0a0f66d0ca2 Gzip Gunzip: always flush busy bufs when the incoming chain is NULL. After

Re: Gzip Gunzip: always flush busy bufs when the incoming chain is NULL.

2014-11-04 Thread Yichun Zhang (agentzh)
Hello! On Mon, Nov 3, 2014 at 4:54 PM, Maxim Dounin wrote: The commit log in question explains the reason for the change. Work on the gzip stalls problem as fixed by 973fded4f461 clearly showed that just passing NULL chains is wrong unless last buffer was already sent or there are busy

Re: Gzip Gunzip: always flush busy bufs when the incoming chain is NULL.

2014-11-05 Thread Yichun Zhang (agentzh)
Hello! On Wed, Nov 5, 2014 at 7:41 AM, Maxim Dounin wrote: The questions are: - How it happened that all content handler's buffers are busy, while there are no busy buffers in gzip? Sorry, I was wrong in this part. The content handler actually checked the r-buffered flag instead of

Re: Gzip Gunzip: always flush busy bufs when the incoming chain is NULL.

2014-11-05 Thread Yichun Zhang (agentzh)
Hello! On Wed, Nov 5, 2014 at 5:02 PM, Yichun Zhang (agentzh) wrote: Sorry, I was wrong in this part. The content handler actually checked the r-buffered flag instead of checking its own busy bufs. Sorry again, it actually checked c-buffered NGX_HTTP_LOWLEVEL_BUFFERED. This condition

Re: Gzip Gunzip: always flush busy bufs when the incoming chain is NULL.

2014-11-10 Thread Yichun Zhang (agentzh)
Hello! On Wed, Nov 5, 2014 at 5:08 PM, Yichun Zhang (agentzh) wrote: Sorry again, it actually checked c-buffered NGX_HTTP_LOWLEVEL_BUFFERED. This condition is indeed too strong and I've made it check its own busy bufs instead. Hmm, the problem here is more complicated than I originally

Re: [PATCH] Request hang when cache_lock is used in subrequests

2014-11-28 Thread Yichun Zhang (agentzh)
Hi Maxim! On Thu, Nov 27, 2014 at 7:31 AM, Maxim Dounin wrote: Yichun, I've spent some time looking in this, and I don't see how it can cause infinite hang at least with stock nginx modules. It certainly can cause suboptimal behaviour though, both with proxy cache locks and with AIO.

Document the changeability of the nginx builtin variables?

2014-12-05 Thread Yichun Zhang (agentzh)
Hello! I suggest that the official nginx documentation should explicitly document whether a particular built-in variable is changeable or readonly. For example, $http_name variables do not allow overwrites but $args does. Such explicit documentation and avoid a lot of confusion for new comers.

Re: Nginx module data sent handler

2015-02-03 Thread Yichun Zhang (agentzh)
Hello! On Tue, Feb 3, 2015 at 1:26 AM, Tigran Bayburtsyan wrote: As I understand all that 700kb data Nginx not sending at once it will take some Nginx loops to be sent. Right. Both of the ngx_http_finalize_request and ngx_http_output_filter are asynchronous calls. So data might be later

Re: Nginx module data sent handler

2015-02-03 Thread Yichun Zhang (agentzh)
Hello! On Tue, Feb 3, 2015 at 2:18 PM, Yichun Zhang (agentzh) wrote: One good approximation for this is to register your own *pool cleanup* handler in r-pool. The request pool will not be destroyed when there's still pending data (don't get confused it with the request cleanup thing created

Re: Event loop plus another event loop

2015-01-21 Thread Yichun Zhang (agentzh)
Hello! On Sat, Jan 17, 2015 at 5:10 PM, Marat Dakota wrote: I'm writing a module for a piece of software which works the same way. So, what I need is a mechanism to call both handlers in a busy loop: while (true) { `process events and call callbacks`(); `process my piece of software

[PATCH] Upstream: fixed $upstream_response_time for filter_finalize + error_page.

2015-02-12 Thread Yichun Zhang (agentzh)
Hello! Please review the following patch. Thanks! -agentzh # HG changeset patch # User Yichun Zhang agen...@gmail.com # Date 1423789183 28800 # Thu Feb 12 16:59:43 2015 -0800 # Node ID 8b3d7171f35e74c8bea3234e88d8977b4f11f815 # Parent f3f25ad09deee27485050a75732e5f46ab1b18b3 Upstream:

Re: [PATCH] Upstream: fixed $upstream_response_time for filter_finalize + error_page.

2015-02-15 Thread Yichun Zhang (agentzh)
Hello! On Fri, Feb 13, 2015 at 7:05 AM, Maxim Dounin wrote: Rather, I would suggest something like this: --- a/src/http/ngx_http_upstream.c +++ b/src/http/ngx_http_upstream.c @@ -3744,10 +3744,13 @@ ngx_http_upstream_finalize_request(ngx_h ngx_log_debug1(NGX_LOG_DEBUG_HTTP,

Re: When r != r-connection-data

2015-03-16 Thread Yichun Zhang (agentzh)
Hello! On Sun, Mar 15, 2015 at 5:05 PM, Marat Dakota wrote: In a few modules I've found a trick: if (r != r-connection-data) r-connection-data = r; Careful. This is a common hack to cheat nginx's ngx_http_postpone_filter_module when the in-stock subrequest model cannot serve us well.

Re: [PATCH] Upstream: fixed $upstream_response_time for filter_finalize + error_page.

2015-03-02 Thread Yichun Zhang (agentzh)
Hi Maxim On Mon, Mar 2, 2015 at 11:09 AM, Maxim Dounin wrote: I've committed this and another patch related to filter finalization, see here: http://hg.nginx.org/nginx/rev/5abf5af257a7 http://hg.nginx.org/nginx/rev/5f179f344096 Great. Thanks! In the particular case you've described in

Re: How to make a subrequest from content handler?

2015-02-26 Thread Yichun Zhang (agentzh)
Hello! On Thu, Feb 26, 2015 at 4:41 AM, kabirova wrote: I have a problem when using subrequest in content handler. The content handler (my_content_handler) calls ngx_http_read_client_request_body with callback handler (my_callback). my_callback() makes a subrequest: Just check out how my

Re: Breaking content generation phase into multiple phases or adding custom events in content phase

2015-06-18 Thread Yichun Zhang (agentzh)
Hello! On Thu, Jun 18, 2015 at 7:06 PM, Jeff Kaufman wrote: ngx_pagespeed does this by giving nginx a pipe to watch, setting up a handler for that pipe, calling an async api that uses threads, then the from the callback writing a byte to the pipe. Now when the async code finishes we're back

Re: Subrequests and output filters

2015-08-05 Thread Yichun Zhang (agentzh)
Hello! On Wed, Aug 5, 2015 at 7:21 PM, Maxime Henrion wrote: I am currently developing an nginx module in order to implement a software component in our platform. This module's responsibility is to receive upstream requests, forward them to multiple hosts (one host per pool, with N pools;

Re: subrequest error with http2

2015-10-07 Thread Yichun Zhang (agentzh)
Hello! On Tue, Oct 6, 2015 at 5:33 PM, Carlos Eduardo Ferreira Rodrigues wrote: > I'm aware 1.9.5 isn't supported yet and that SPDY is mentioned in the docs as > non-working for certain API calls > as well. However, we are have been using location.capture with SPDY for a > while now and haven't

Re: [nginx] Decreased the NGX_HTTP_MAX_SUBREQUESTS limit.

2015-08-31 Thread Yichun Zhang (agentzh)
Hello! On Tue, Sep 1, 2015 at 4:29 AM, Valentin Bartenev wrote: > #define NGX_HTTP_MAX_URI_CHANGES 10 > -#define NGX_HTTP_MAX_SUBREQUESTS 200 > +#define NGX_HTTP_MAX_SUBREQUESTS 50 > Hmm, this change makes me sad. In our ngx_lua module, for example, we allow

Re: [nginx] Decreased the NGX_HTTP_MAX_SUBREQUESTS limit.

2015-09-01 Thread Yichun Zhang (agentzh)
Hello! On Tue, Sep 1, 2015 at 6:14 PM, Valentin V. Bartenev wrote: > Why do you guys use *recursive* subrequests() for that? > > Please note, that this constant now limits recursion (not parallelism) > of subrequests, when one subrequest creates another subrequest and the > depth of this

Re: subrequest error with http2

2015-10-05 Thread Yichun Zhang (agentzh)
Hello! On Wed, Sep 23, 2015 at 1:14 AM, Carlos Eduardo Ferreira Rodrigues wrote: > I just upgraded nginx to 1.9.5 on our testing enviroment, and immediately > started seeing this error on http2 requests: > > 2015/09/22 18:04:06 [alert] 27305#27305: *1 epoll_ctl(1, 17) failed (17: File >

Re: subrequest error with http2

2015-10-05 Thread Yichun Zhang (agentzh)
Hello! On Wed, Sep 23, 2015 at 1:34 AM, Maxim Dounin wrote: > > The lua module deeply integrates into nginx internals (far beyond > what we consider to be nginx modules API), and there is no surprise > it's broken by the changes in nginx 1.9.5. > True. This is also why ngx_lua has so many

[PATCH] SSL: handled SSL_CTX_set_cert_cb() callback yielding.

2016-01-02 Thread Yichun Zhang (agentzh)
# HG changeset patch # User Yichun Zhang # Date 1451762084 28800 # Sat Jan 02 11:14:44 2016 -0800 # Node ID 449f0461859c16e95bdb18e8be6b94401545d3dd # Parent 78b4e10b4367b31367aad3c83c9c3acdd42397c4 SSL: handled SSL_CTX_set_cert_cb() callback yielding. OpenSSL 1.0.2+

Re: [PATCH] SSL: handled SSL_CTX_set_cert_cb() callback yielding.

2016-01-05 Thread Yichun Zhang (agentzh)
Hello! On Sat, Jan 2, 2016 at 8:06 PM, Yichun Zhang (agentzh) wrote: > SSL: handled SSL_CTX_set_cert_cb() callback yielding. > > OpenSSL 1.0.2+ introduces SSL_CTX_set_cert_cb() to allow custom > callbacks to serve the SSL certificiates and private keys dynamically > and lazily. Th

Re: Unit testing approach for nginx modules

2015-11-24 Thread Yichun Zhang (agentzh)
Hello! On Sun, Nov 22, 2015 at 5:40 AM, Ritesh Jha wrote: > Hello everyone, > We are developing nginx modules to implement few usecases in our product. > Most of the other usecases cases have been implemented using Java. At my > office we follow TDD for Java development.

Re: Reading body during the REWRITE phase ?

2016-01-15 Thread Yichun Zhang (agentzh)
Hello! On Fri, Jan 15, 2016 at 6:01 AM, Thibault Koechlin wrote: > When used with auth_request (or maybe other modules, but that's the > first time I encounter this issue within a few years of usage), there is > no request made to the upstream if the request is made using POST/PUT > and the body

Resumable and composable access handlers in the stream subsystem

2016-02-07 Thread Yichun Zhang (agentzh)
Hi guys! This is just a feature request. I hope that the stream subsystem of NGINX can support access handlers that are both resumable and composable, just like the access phase handlers in the http subsystem. The former means that the access handler can yield (like returning NGX_DONE) and

Re: Already loaded NGINX modules

2016-02-11 Thread Yichun Zhang (agentzh)
Hello! On Thu, Feb 11, 2016 at 3:29 PM, Piotr Sikora wrote: > > That doesn't really answer my question: which version (statically > linked or dynamic) of the module should we use at runtime if both are > present... and why? > For portable NGINX-based applications, for example, we only want to

Re: Already loaded NGINX modules

2016-02-11 Thread Yichun Zhang (agentzh)
Hello! On Thu, Feb 11, 2016 at 2:33 PM, Piotr Sikora wrote: > I disagree, because this would lead to unexpected behavior (since > statically linked module can be slightly different from the dynamic > module). > > Which version should be used at runtime in your non-fatal scenario and why? We

Re: Already loaded NGINX modules

2016-02-11 Thread Yichun Zhang (agentzh)
Hello! On Thu, Feb 11, 2016 at 3:16 PM, Yichun Zhang (agentzh) wrote: > We don't have version numbers in the DSO file names anyway :) And we > can issue warnings to error.log, even with a high log level. > Or with an explicit option to the load_module directive, as in lo

Add /etc/hosts support to NGINX's own resolver

2016-02-11 Thread Yichun Zhang (agentzh)
Hi guys! I wonder if you have any plans or interest in adding support for system hosts configuration files (like /etc/hosts on Linux/*BSD/Mac OS X) to NGINX's own nonblocking resolver implementation. This makes debugging and other sysadmin work much easier otherwise we must set up a local DNS

Dynamic module search paths?

2016-02-11 Thread Yichun Zhang (agentzh)
Hi folks It seems to me that the the load_module directive for loading NGINX dynamic modules just use the server prefix when resolving relative module DSO file paths specified in nginx.conf. Here is my wishlist: I hope that we can have support for module search paths specified via an external

Already loaded NGINX modules

2016-02-11 Thread Yichun Zhang (agentzh)
Hi guys! Currently when an NGINX module is statically linked against the NGINX binary, the load_module directive bails out the server startup with the error message "module already loaded" (or something like that). Hopefully we can make this a nonfatal error (or provide an option to make it

Re: Stream Module Variables

2016-02-03 Thread Yichun Zhang (agentzh)
Hello! On Wed, Feb 3, 2016 at 3:37 PM, SplitIce wrote: > I have been taking a look at the Stream modules for use in a particular > application. I noticed the entire subsystem lacks any variable support. > > Is variable support planned? > Is there a significant reason for the omission? > +1 I'm

Re: Stream Module

2016-02-03 Thread Yichun Zhang (agentzh)
Hello! On Wed, Feb 3, 2016 at 7:09 PM, SplitIce wrote: > What is the appropriate way to allocate memory during the stream? The http > context has a pool member as part of the request structure, what is the > equivalent in the stream module context? > I think it is s->connection->pool where s is

[ANN] Test::Nginx 0.25 released

2016-02-24 Thread Yichun Zhang (agentzh)
Hi guys, I've just uploaded Test::Nginx 0.25 to CPAN: https://metacpan.org/release/Test-Nginx It will appear on the CPAN mirror near you in the next few hours or so. Special thanks go to all our contributors and users :) Here's the complete change log for this release (compared to the

Re: 3rd party modules requiring ngx_http_postpone_filter_module

2016-04-22 Thread Yichun Zhang (agentzh)
Hello! On Wed, Apr 20, 2016 at 7:16 AM, Maxim Dounin wrote: > I personally think that documenting that SSI module should not be > excluded from a build is good enough approach for all practical > reasons. > As the author of the ngx_echo and ngx_srcache modules that require the http postpone

[ANN] Test::Nginx 0.26 released

2017-04-09 Thread Yichun Zhang (agentzh)
Hi folks, I've just uploaded Test::Nginx 0.26 to CPAN: https://metacpan.org/release/Test-Nginx It will appear on the CPAN mirror near you in the next few hours or so. After that, you can install the module like below sudo cpan Test::Nginx or better, when you have the App::cpanminus

[ANN] Test::Nginx 0.27 released

2020-07-07 Thread Yichun Zhang (agentzh)
Hi there, I am happy to announce the new 0.27 release of Test::Nginx: https://openresty.org/en/ann-test-nginx-027.html This Perl module provides a test scaffold for automated testing in Nginx C module or OpenResty-based Lua library development and regression testing. This class inherits from

[ANN] Test::Nginx 0.28 is released

2020-07-17 Thread Yichun Zhang (agentzh)
Hi there, I am happy to announce the new 0.28 release of Test::Nginx: https://openresty.org/en/ann-test-nginx-028.html This version fixes the Test2::Util module dependency problem introduced in the previous 0.27 release. This Perl module provides a test scaffold for automated testing in Nginx

[ANN] Test::Nginx 0.29 is released

2020-11-17 Thread Yichun Zhang (agentzh)
Hi there, I am happy to announce the new 0.29 release of Test::Nginx: https://openresty.org/en/ann-test-nginx-029.html This version fixes the Test2::Util module dependency problem introduced in the previous 0.28 release. This Perl module provides a test scaffold for automated testing in Nginx