Style(http/modules): fix the incorrect front spaces to unite style.
Hello! Nginx is famous for code readability and neat code format. I use the tool( https://github.com/openresty/openresty-devel-utils) to try to unify the incorrect front spaces, Here is my attempt at http/modules. # HG changeset patch # User Jinhua Tan <312841...@qq.com> # Date 1589948645 -28800 # Wed May 20 12:24:05 2020 +0800 # Node ID 3242f98298975e556a7e87130611ce84799fe935 # Parent 10678810de74edc4c02d5cd7303f0099eee9fac3 Style(http/modules): fix the incorrect front spaces to unite style. diff -r 10678810de74 -r 3242f9829897 src/http/modules/ngx_http_access_module.c --- a/src/http/modules/ngx_http_access_module.c Wed May 20 12:21:32 2020 +0800 +++ b/src/http/modules/ngx_http_access_module.c Wed May 20 12:24:05 2020 +0800 @@ -327,7 +327,7 @@ if (rc == NGX_ERROR) { ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, - "invalid parameter \"%V\"", [1]); + "invalid parameter \"%V\"", [1]); return NGX_CONF_ERROR; } diff -r 10678810de74 -r 3242f9829897 src/http/modules/ngx_http_dav_module.c --- a/src/http/modules/ngx_http_dav_module.c Wed May 20 12:21:32 2020 +0800 +++ b/src/http/modules/ngx_http_dav_module.c Wed May 20 12:24:05 2020 +0800 @@ -1116,10 +1116,10 @@ ngx_http_dav_loc_conf_t *conf = child; ngx_conf_merge_bitmask_value(conf->methods, prev->methods, - (NGX_CONF_BITMASK_SET|NGX_HTTP_DAV_OFF)); + (NGX_CONF_BITMASK_SET|NGX_HTTP_DAV_OFF)); ngx_conf_merge_uint_value(conf->min_delete_depth, - prev->min_delete_depth, 0); + prev->min_delete_depth, 0); ngx_conf_merge_uint_value(conf->access, prev->access, 0600); diff -r 10678810de74 -r 3242f9829897 src/http/modules/ngx_http_fastcgi_module.c --- a/src/http/modules/ngx_http_fastcgi_module.c Wed May 20 12:21:32 2020 +0800 +++ b/src/http/modules/ngx_http_fastcgi_module.c Wed May 20 12:24:05 2020 +0800 @@ -2805,7 +2805,7 @@ if (conf->upstream.store == NGX_CONF_UNSET) { ngx_conf_merge_value(conf->upstream.store, - prev->upstream.store, 0); + prev->upstream.store, 0); conf->upstream.store_lengths = prev->upstream.store_lengths; conf->upstream.store_values = prev->upstream.store_values; @@ -2818,22 +2818,22 @@ prev->upstream.next_upstream_tries, 0); ngx_conf_merge_value(conf->upstream.buffering, - prev->upstream.buffering, 1); + prev->upstream.buffering, 1); ngx_conf_merge_value(conf->upstream.request_buffering, - prev->upstream.request_buffering, 1); + prev->upstream.request_buffering, 1); ngx_conf_merge_value(conf->upstream.ignore_client_abort, - prev->upstream.ignore_client_abort, 0); + prev->upstream.ignore_client_abort, 0); ngx_conf_merge_value(conf->upstream.force_ranges, - prev->upstream.force_ranges, 0); + prev->upstream.force_ranges, 0); ngx_conf_merge_ptr_value(conf->upstream.local, - prev->upstream.local, NULL); + prev->upstream.local, NULL); ngx_conf_merge_value(conf->upstream.socket_keepalive, - prev->upstream.socket_keepalive, 0); + prev->upstream.socket_keepalive, 0); ngx_conf_merge_msec_value(conf->upstream.connect_timeout, prev->upstream.connect_timeout, 6); @@ -2951,15 +2951,15 @@ ngx_conf_merge_bitmask_value(conf->upstream.ignore_headers, - prev->upstream.ignore_headers, - NGX_CONF_BITMASK_SET); + prev->upstream.ignore_headers, + NGX_CONF_BITMASK_SET); ngx_conf_merge_bitmask_value(conf->upstream.next_upstream, - prev->upstream.next_upstream, - (NGX_CONF_BITMASK_SET - |NGX_HTTP_UPSTREAM_FT_ERROR - |NGX_HTTP_UPSTREAM_FT_TIMEOUT)); + prev->upstream.next_upstream, + (NGX_CONF_BITMASK_SET + |NGX_HTTP_UPSTREAM_FT_ERROR + |NGX_HTTP_UPSTREAM_FT_TIMEOUT)); if (conf->upstream.next_upstream & NGX_HTTP_UPSTREAM_FT_OFF) { conf->upstream.next_upstream = NGX_CONF_BITMASK_SET @@ -2978,7 +2978,7 @@ if (conf->upstream.cache == NGX_CONF_UNSET) { ngx_conf_merge_value(conf->upstream.cache, - prev->upstream.cache, 0); + prev->upstream.cache, 0);
Style(core): fix the incorrect front spaces to unite style.
Hello! Nginx is famous for code readability and neat code format. I use the tool( https://github.com/openresty/openresty-devel-utils) to try to unify the incorrect front spaces, Here is my attempt at core. # HG changeset patch # User Jinhua Tan <312841...@qq.com> # Date 1589948492 -28800 # Wed May 20 12:21:32 2020 +0800 # Node ID 10678810de74edc4c02d5cd7303f0099eee9fac3 # Parent 3c8082c3f98ab7fdec8a598b55609701452b5254 Style(core): fix the incorrect front spaces to unite style. diff -r 3c8082c3f98a -r 10678810de74 src/core/ngx_conf_file.c --- a/src/core/ngx_conf_file.c Wed May 13 22:02:47 2020 +0800 +++ b/src/core/ngx_conf_file.c Wed May 20 12:21:32 2020 +0800 @@ -544,8 +544,8 @@ } ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, - "unexpected end of file, " - "expecting \";\" or \"}\""); + "unexpected end of file, " + "expecting \";\" or \"}\""); return NGX_ERROR; } @@ -1047,9 +1047,9 @@ } else { ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, - "invalid value \"%s\" in \"%s\" directive, " - "it must be \"on\" or \"off\"", - value[1].data, cmd->name.data); + "invalid value \"%s\" in \"%s\" directive, " + "it must be \"on\" or \"off\"", + value[1].data, cmd->name.data); return NGX_CONF_ERROR; } diff -r 3c8082c3f98a -r 10678810de74 src/core/ngx_cycle.c --- a/src/core/ngx_cycle.c Wed May 13 22:02:47 2020 +0800 +++ b/src/core/ngx_cycle.c Wed May 20 12:21:32 2020 +0800 @@ -1308,9 +1308,9 @@ if (tag != shm_zone[i].tag) { ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, -"the shared memory zone \"%V\" is " -"already declared for a different use", -_zone[i].shm.name); + "the shared memory zone \"%V\" is " + "already declared for a different use", + _zone[i].shm.name); return NULL; } diff -r 3c8082c3f98a -r 10678810de74 src/core/ngx_file.c --- a/src/core/ngx_file.c Wed May 13 22:02:47 2020 +0800 +++ b/src/core/ngx_file.c Wed May 20 12:21:32 2020 +0800 @@ -1005,7 +1005,7 @@ name = ngx_de_name(); ngx_log_debug2(NGX_LOG_DEBUG_CORE, ctx->log, 0, - "tree name %uz:\"%s\"", len, name); + "tree name %uz:\"%s\"", len, name); if (len == 1 && name[0] == '.') { continue; diff -r 3c8082c3f98a -r 10678810de74 src/core/ngx_log.c --- a/src/core/ngx_log.c Wed May 13 22:02:47 2020 +0800 +++ b/src/core/ngx_log.c Wed May 20 12:21:32 2020 +0800 @@ -121,7 +121,7 @@ /* pid#tid */ p = ngx_slprintf(p, last, "%P#" NGX_TID_T_FMT ": ", -ngx_log_pid, ngx_log_tid); + ngx_log_pid, ngx_log_tid); if (log->connection) { p = ngx_slprintf(p, last, "*%uA ", log->connection); @@ -385,8 +385,8 @@ ngx_open_file_n " \"%s\" failed", name); #if (NGX_WIN32) ngx_event_log(ngx_errno, - "could not open error log file: " - ngx_open_file_n " \"%s\" failed", name); + "could not open error log file: " + ngx_open_file_n " \"%s\" failed", name); #endif ngx_log_file.fd = ngx_stderr; diff -r 3c8082c3f98a -r 10678810de74 src/core/ngx_regex.c --- a/src/core/ngx_regex.c Wed May 13 22:02:47 2020 +0800 +++ b/src/core/ngx_regex.c Wed May 20 12:21:32 2020 +0800 @@ -111,8 +111,8 @@ if (re == NULL) { if ((size_t) erroff == rc->pattern.len) { rc->err.len = ngx_snprintf(rc->err.data, rc->err.len, - "pcre_compile() failed: %s in \"%V\"", - errstr, >pattern) + "pcre_compile() failed: %s in \"%V\"", + errstr, >pattern) - rc->err.data; } else { diff -r 3c8082c3f98a -r 10678810de74 src/core/ngx_resolver.c --- a/src/core/ngx_resolver.c Wed May 13 22:02:47 2020 +0800 +++ b/src/core/ngx_resolver.c Wed May 20 12:21:32 2020 +0800 @@ -3265,8 +3265,8 @@ } ngx_log_debug3(NGX_LOG_DEBUG_CORE, r->log, 0, - "resolver qt:%ui cl:%ui len:%uz", - type, class, len); + "resolver qt:%ui cl:%ui len:%uz", + type, class, len); i += sizeof(ngx_resolver_an_t); Thanks! ___ nginx-devel mailing list nginx-devel@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx-devel
njs-0.4.1
Hello, I'm glad to announce a new release of NGINX JavaScript module (njs). This release extends http module. Notable new features: - raw headers API: With the following request headers: : Host: localhost : Foo: bar : foo: bar2 All 'foo' headers can be collected with the syntax: : r.rawHeadersIn.filter(v=>v[0].toLowerCase() == 'foo').map(v=>v[1]); the output will be: : ['bar', 'bar2'] - TypeScript API definition: : foo.ts: : /// : function content_handler(r: NginxHTTPRequest) : { :r.headersOut['content-type'] = 'text/plain'; :r.return(200, "Hello from TypeScript"); : } : : tsc foo.ts --outFile foo.js foo.js can be used directly with njs. You can learn more about njs: - Overview and introduction: http://nginx.org/en/docs/njs/ - Using node modules with njs: http://nginx.org/en/docs/njs/node_modules.html - Writing njs code using TypeScript definition files: http://nginx.org/en/docs/njs/typescript.html Feel free to try it and give us feedback on: - Github: https://github.com/nginx/njs/issues - Mailing list: http://mailman.nginx.org/mailman/listinfo/nginx-devel Changes with njs 0.4.1 19 May 2020 *) Feature: added support for multi-value headers in r.headersIn. *) Feature: introduced raw headers API. *) Feature: added TypeScript API description. Core: *) Bugfix: fixed Array.prototype.slice() for sparse arrays.___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx
Re: Passing a special Magento URL to PHP-FPM
On Sat, May 16, 2020 at 06:29:01PM -0400, hgv wrote: Hi there, > I’m trying to learn how to pass special Magento 1.x URLs such as this to a > PHP-FPM backend. https://forum.nginx.org/read.php?2,288050, plus the response at https://forum.nginx.org/read.php?2,288050,288051, perhaps? Cheers, f -- Francis Dalyfran...@daoine.org ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx
[njs] Added tag 0.4.1 for changeset 9400790bf538
details: https://hg.nginx.org/njs/rev/46ec2411fb7c branches: changeset: 1392:46ec2411fb7c user: Dmitry Volyntsev date: Tue May 19 11:42:11 2020 + description: Added tag 0.4.1 for changeset 9400790bf538 diffstat: .hgtags | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diffs (8 lines): diff -r 9400790bf538 -r 46ec2411fb7c .hgtags --- a/.hgtags Tue May 19 11:41:05 2020 + +++ b/.hgtags Tue May 19 11:42:11 2020 + @@ -34,3 +34,4 @@ 9e5ef927c7eaed003de3e5e4a16fa3eab08de7f7 1abb97e9d9dc07dcff2616d4c75132e6d189a6aa 0.3.8 fc4eeaaf0dfe7dc7d41232f1b643bd364f1efe82 0.3.9 6144aafa1472fbdf79bc9d1f858555938ee08452 0.4.0 +9400790bf53843001f94c77b47bc99b05518af78 0.4.1 ___ nginx-devel mailing list nginx-devel@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx-devel
[njs] Version 0.4.1.
details: https://hg.nginx.org/njs/rev/9400790bf538 branches: changeset: 1391:9400790bf538 user: Dmitry Volyntsev date: Tue May 19 11:41:05 2020 + description: Version 0.4.1. diffstat: CHANGES | 12 1 files changed, 12 insertions(+), 0 deletions(-) diffs (19 lines): diff -r cd1a7a0c3fe9 -r 9400790bf538 CHANGES --- a/CHANGES Mon May 18 14:43:00 2020 + +++ b/CHANGES Tue May 19 11:41:05 2020 + @@ -1,3 +1,15 @@ + +Changes with njs 0.4.1 19 May 2020 + +*) Feature: added support for multi-value headers in r.headersIn. + +*) Feature: introduced raw headers API. + +*) Feature: added TypedScript API description. + +Core: + +*) Bugfix: fixed Array.prototype.slice() for sparse arrays. Changes with njs 0.4.0 23 Apr 2020 ___ nginx-devel mailing list nginx-devel@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx-devel