extension to server_name directive - include top-level directory in search

2023-07-25 Thread Chris Newton via nginx-devel
their own server blocks >From a01fd492fb8935e9c9e0f4c703b9430c83c12590 Mon Sep 17 00:00:00 2001 From: Chris Newton Date: Mon, 24 Jul 2023 19:32:03 + Subject: [PATCH] virtual aliases --- src/http/ngx_http.c | 2 ++ src/http/ngx_http.h | 1 + src/http/ngx_http_core_module.c | 4 +-- src

ngx_http_script_run() question

2022-07-18 Thread Chris Newton via nginx-devel
I'm adding a variable that wants to provide an absolute URL to proxy_pass, whose value is based in part on a database lookup - but if the search key is not found in that database, my handler function is returning an NGX_ERROR which seemed reasonable (there is no good default I can return), so just

Re: question around ngx_http_get_flushed_variable()

2022-04-06 Thread Chris Newton via nginx-devel
should it always set it that flag to 0 and instead rely on the call to the ngx_http_add_variable() function to set it? (coding style?) Thank you again for your help Chris On Tue, Apr 5, 2022 at 9:02 AM Maxim Dounin wrote: > Hello! > > On Mon, Apr 04, 2022 at 12:44:38PM -0700, Chr

question around ngx_http_get_flushed_variable()

2022-04-04 Thread Chris Newton via nginx-devel
I'm a little unclear as to when ngx_http_get_flushed_variable() should be used rather than ngx_http_get_indexed_variable(). The dev guide is a little sparse, so I'm hoping someone could help. The relevant flags within the ngx_variable_value_t with their dev guide descriptions (followed by my inter

Re: Remove unnecessary check in ngx_http_stub_status_handler()

2021-01-14 Thread Chris Newton
any thoughts on this? TIA Chris On Tue, Jan 5, 2021 at 1:24 PM Chris Newton wrote: > > I was desk checking return codes generated in handlers following calls to > ngx_http_send_header(), and noticed what appears to be an unnecessary test > in ngx_http_stub_status_handler() --

Unexpected structure of macros in ngx_string.h

2021-01-11 Thread Chris Newton
Hello I just came across a problem with an innocuous looking line of code in a new module I have been working on: if (tmp_str.len == 0) ngx_str_set(&tmp_str, "/"); The modification of tmp_str.data to '/' was always being made, but the length wasn't if the test failed. This turns ou

Remove unnecessary check in ngx_http_stub_status_handler()

2021-01-05 Thread Chris Newton
I was desk checking return codes generated in handlers following calls to ngx_http_send_header(), and noticed what appears to be an unnecessary test in ngx_http_stub_status_handler() -- or rather, I think the test should always evaluate as true, and if somehow it isn't odd things could occur - at l

proposed solution for ticket 686 (With some condition, ngx_palloc() function will alloc a illegal memory address)

2020-12-10 Thread Chris Newton
Ticket 686 is marked as 'wontfix' as the constraints on the size of the memory pool are documented. I'd like to suggest that the constraints are enforced by the code to prevent issues. eg., *--- a/src/core/ngx_palloc.c* *+++ b/src/core/ngx_palloc.c* @@ -20,6 +20,12 @@ ngx_create_pool(size_t siz

filesystem entries that are neither 'file' nor 'dir' can result in double ngx_close_file() if processed as FLV or MP4

2020-12-10 Thread Chris Newton
Hello It has been noticed that when 'of' as returned by ngx_open_cached_file() is not is_file, but otherwise valid and also not is_dir, then both the ngx_http_flv_handler() and ngx_http_mp4_handler() functions will call ngx_close_file() immediately. However, the ngx_pool_cleanup_file() will still