[PATCH] Upstream: ignore read-readiness if request wasn't sent

2017-06-03 Thread Piotr Sikora via nginx-devel
# HG changeset patch # User Piotr Sikora # Date 1491296505 25200 # Tue Apr 04 02:01:45 2017 -0700 # Node ID bff5ac3da350d8d9225d4204d8aded90fb670f3f # Parent 716852cce9136d977b81a2d1b8b6f9fbca0dce49 Upstream: ignore read-readiness if request wasn't sent. Signed-off-by: Piotr Sikora diff -

Re: [PATCH 1 of 3] Added support for trailers in HTTP responses

2017-06-05 Thread Piotr Sikora via nginx-devel
Hey Maxim, > I would prefer to preserve the typical code path (when there are no > trailers) without an extra allocation. It looks like it would be > as trivail as: > > @@ -273,14 +273,18 @@ ngx_http_chunked_create_trailers(ngx_htt > b->memory = 1; > b->last_buf = 1; > > +if (len ==

Re: [PATCH 3 of 3] Headers filter: added "add_trailer" directive

2017-06-05 Thread Piotr Sikora via nginx-devel
Hey Maxim, > It doesn't look like "if (h[i].value.value.len)" is needed here. > It is either true, or the "add_trailer" directive is nop and we > already know this while parsing the configuration. > > -if (h[i].value.value.len) { > -r->expect_trailers = 1; > -

[PATCH 1 of 3] Added support for trailers in HTTP responses

2017-06-13 Thread Piotr Sikora via nginx-devel
# HG changeset patch # User Piotr Sikora # Date 1490351854 25200 # Fri Mar 24 03:37:34 2017 -0700 # Node ID 07a5d26b49f04425ff54cc998f885aa987b7823f # Parent e6f399a176e7cae0fa08f1183d31315bce3b9ecb Added support for trailers in HTTP responses. Example: ngx_table_elt_t *h; h = ngx_

[PATCH 2 of 3] HTTP/2: added support for trailers in HTTP responses

2017-06-13 Thread Piotr Sikora via nginx-devel
# HG changeset patch # User Piotr Sikora # Date 1490351854 25200 # Fri Mar 24 03:37:34 2017 -0700 # Node ID 73f67e06ab103e0368d1810c6f8cac5c70c4e246 # Parent 07a5d26b49f04425ff54cc998f885aa987b7823f HTTP/2: added support for trailers in HTTP responses. Signed-off-by: Piotr Sikora diff -r

[PATCH 2 of 4] HTTP/2: reject HTTP/2 requests with invalid "TE" header value

2017-06-13 Thread Piotr Sikora via nginx-devel
# HG changeset patch # User Piotr Sikora # Date 1490516709 25200 # Sun Mar 26 01:25:09 2017 -0700 # Node ID 349648a6f91f9bd5cc80d22390b95c2239a8bfb3 # Parent 10c3f4c37f96ef496eff859b6f6815817e79455a HTTP/2: reject HTTP/2 requests with invalid "TE" header value. Signed-off-by: Piotr Sikora

[PATCH 1 of 4] HTTP/2: reject HTTP/2 requests with "Connection" header

2017-06-13 Thread Piotr Sikora via nginx-devel
# HG changeset patch # User Piotr Sikora # Date 1490516709 25200 # Sun Mar 26 01:25:09 2017 -0700 # Node ID 10c3f4c37f96ef496eff859b6f6815817e79455a # Parent e6f399a176e7cae0fa08f1183d31315bce3b9ecb HTTP/2: reject HTTP/2 requests with "Connection" header. While there, populate r->headers_in

[PATCH 4 of 4] HTTP/2: reject HTTP/2 requests with connection-specific headers

2017-06-13 Thread Piotr Sikora via nginx-devel
# HG changeset patch # User Piotr Sikora # Date 1490516709 25200 # Sun Mar 26 01:25:09 2017 -0700 # Node ID e2abc3bc3fc12b788d2631d3c47215acdc4ebbe6 # Parent 6263d68cb96042d8f8974a4a3945226227ce13b9 HTTP/2: reject HTTP/2 requests with connection-specific headers. Signed-off-by: Piotr Sikora

[PATCH 3 of 4] HTTP/2: reject HTTP/2 requests with "Transfer-Encoding" header

2017-06-13 Thread Piotr Sikora via nginx-devel
# HG changeset patch # User Piotr Sikora # Date 1490516709 25200 # Sun Mar 26 01:25:09 2017 -0700 # Node ID 6263d68cb96042d8f8974a4a3945226227ce13b9 # Parent 349648a6f91f9bd5cc80d22390b95c2239a8bfb3 HTTP/2: reject HTTP/2 requests with "Transfer-Encoding" header. Signed-off-by: Piotr Sikora

[PATCH 3 of 3] Headers filter: added "add_trailer" directive

2017-06-13 Thread Piotr Sikora via nginx-devel
# HG changeset patch # User Piotr Sikora # Date 1490351854 25200 # Fri Mar 24 03:37:34 2017 -0700 # Node ID 46150fb672e7b92cfbe678bad71df187fcb25ae6 # Parent 73f67e06ab103e0368d1810c6f8cac5c70c4e246 Headers filter: added "add_trailer" directive. Trailers added using this directive are evalu

Re: [PATCH 1 of 3] Added support for trailers in HTTP responses

2017-06-13 Thread Piotr Sikora via nginx-devel
Hey Maxim, > I've tried this as well, and decided that "if (len == > sizeof(...))" is slightly more readable, and also produces smaller > patch to your code. No strict preference though, feel free to > use any variant you think is better. I've ended up using "if (len == 0) { ... }" in the end,

Re: [PATCH 2 of 3] HTTP/2: added support for trailers in HTTP responses

2017-06-13 Thread Piotr Sikora via nginx-devel
Hey Valentin, > It's better to keep return values consistent with > ngx_http_v2_create_headers_frame() and introduce > NGX_HTTP_V2_NO_TRAILERS instead of NGX_HTTP_V2_FRAME_ERROR. NGX_HTTP_V2_NO_TRAILERS feels a bit weird, but whatever works for you is fine. > There's no reason to check "trailers

Re: [PATCH] HTTP/2: reject HTTP/2 requests with "Connection" header

2017-06-13 Thread Piotr Sikora via nginx-devel
Hey Valentin, > Since HTTP/2 is a separate protocol and not just GET / HTTP/2.0, so > the r->stream pointer should be tested instead (like in many other > places). Done. I've also sent few more patches rejecting remaining invalid headers. Feel free to squash them together if you prefer. Best reg

Re: [PATCH 2 of 3] HTTP/2: added support for trailers in HTTP responses

2017-06-17 Thread Piotr Sikora via nginx-devel
Hey Maxim, > Series committed with the above change. > Thanks to all involved. Thanks! :) Best regards, Piotr Sikora ___ nginx-devel mailing list nginx-devel@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx-devel

Re: [PATCH 2 of 3] HTTP/2: added support for trailers in HTTP responses

2017-06-17 Thread Piotr Sikora via nginx-devel
Hey Valentin, > I've overlooked this while doing previous review, but it looks strange. > > Why do you use NGX_LOG_WARN for trailers headers? It results in > finalizing request with an error (in case of HTTP/2 it means RST_STREAM). > > For main headers the NGX_LOG_CRIT level is used. It looks to

Re: [PATCH 4 of 4] HTTP/2: reject HTTP/2 requests with connection-specific headers

2017-06-17 Thread Piotr Sikora via nginx-devel
Hey Maxim, > I'm highly sceptical about the whole series in general, and this > patch specifically. > > In particular, the "Proxy-Connection" header is not something even > defined by any standard, and even in its non-standard [broken] > meaning never expected to be used in connections to nginx.

Re: [PATCH] Output chain: propagate flush and last_buf flags to send_chain()

2017-06-17 Thread Piotr Sikora via nginx-devel
Hey Maxim, > Note well that in HTTP/2-related code the special flag > c->need_last_buf is used to indicate that a (fake) connection > needs an information about last_buf, thus allowing HTTP/2 > c->send_chain() wrapper to add its own framing. If the goal is > the same, please consider using the sa

[PATCH] Output chain: propagate last_buf flag to c->send_chain()

2017-06-17 Thread Piotr Sikora via nginx-devel
# HG changeset patch # User Piotr Sikora # Date 1491708381 25200 # Sat Apr 08 20:26:21 2017 -0700 # Node ID 3363bdf821c7110b577437bd59c962653f3a144f # Parent d1816a2696de8c2faa1cd913a151e5f62a8620f3 Output chain: propagate last_buf flag to c->send_chain(). Signed-off-by: Piotr Sikora diff

Re: [PATCH] HTTP/2: add debug logging of control frames

2017-06-19 Thread Piotr Sikora via nginx-devel
Hey Valentin, > Ok, I've already resigned myself to multiline output, but don't let it > look like an another SETTINGS frame. > > IMHO, something like that will be good enough: > >http2 send SETTINGS frame >http2 SETTINGS param MAX_CONCURRENT_STREAMS: 100 >http2 SETTINGS param INITIAL_

[PATCH] HTTP/2: add debug logging of control frames

2017-06-19 Thread Piotr Sikora via nginx-devel
# HG changeset patch # User Piotr Sikora # Date 1490516711 25200 # Sun Mar 26 01:25:11 2017 -0700 # Node ID 1f1549823fba355a0dd1af49108be4b4898bf331 # Parent d1816a2696de8c2faa1cd913a151e5f62a8620f3 HTTP/2: add debug logging of control frames. Signed-off-by: Piotr Sikora diff -r d1816a269

Re: [PATCH] Proxy: add "proxy_ssl_alpn" directive

2017-06-19 Thread Piotr Sikora via nginx-devel
Hey Maxim, > It doesn't look like this patch make sense by its own. > > If this patch is a part of a larger work, please consider > submitting a patch series with the whole feature instead. > Individual patches which doesn't make much sense > by its own are hard to review, and are likely to be rej

Re: [PATCH] Proxy: split configured header names and values

2017-06-22 Thread Piotr Sikora via nginx-devel
Hey Maxim, > Full patch with the above comments below: Applied, thanks! Best regards, Piotr Sikora ___ nginx-devel mailing list nginx-devel@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx-devel

[PATCH 03 of 14] HTTP/2: add debug logging of control frames

2017-06-22 Thread Piotr Sikora via nginx-devel
# HG changeset patch # User Piotr Sikora # Date 1490516711 25200 # Sun Mar 26 01:25:11 2017 -0700 # Node ID 22d178a11e30c4a8576c3ce28859dfe1cc8adec0 # Parent a147dd50ee3fb8628b79f4482c552c7c2852a732 HTTP/2: add debug logging of control frames. Signed-off-by: Piotr Sikora diff -r a147dd50e

[PATCH 02 of 14] Upstream keepalive: preserve c->data

2017-06-22 Thread Piotr Sikora via nginx-devel
# HG changeset patch # User Piotr Sikora # Date 1491886301 25200 # Mon Apr 10 21:51:41 2017 -0700 # Node ID a147dd50ee3fb8628b79f4482c552c7c2852a732 # Parent 5f5d70428655db0889a2111d17d912a7383df152 Upstream keepalive: preserve c->data. Signed-off-by: Piotr Sikora diff -r 5f5d70428655 -r

[PATCH 04 of 14] HTTP/2: s/client/peer/

2017-06-22 Thread Piotr Sikora via nginx-devel
# HG changeset patch # User Piotr Sikora # Date 1485917964 28800 # Tue Jan 31 18:59:24 2017 -0800 # Node ID 912d9cf36783146e61a68d554253e70956ea9125 # Parent 22d178a11e30c4a8576c3ce28859dfe1cc8adec0 HTTP/2: s/client/peer/. No functional changes. Signed-off-by: Piotr Sikora diff -r 22d178

[PATCH 01 of 14] Output chain: propagate last_buf flag to c->send_chain()

2017-06-22 Thread Piotr Sikora via nginx-devel
# HG changeset patch # User Piotr Sikora # Date 1491708381 25200 # Sat Apr 08 20:26:21 2017 -0700 # Node ID 5f5d70428655db0889a2111d17d912a7383df152 # Parent a39bc74873faf9e5bea616561b43f6ecc55229f9 Output chain: propagate last_buf flag to c->send_chain(). Signed-off-by: Piotr Sikora diff

[PATCH 05 of 14] HTTP/2: introduce h2c->conf_ctx

2017-06-22 Thread Piotr Sikora via nginx-devel
# HG changeset patch # User Piotr Sikora # Date 1489106035 25200 # Thu Mar 09 17:33:55 2017 -0700 # Node ID 24b0f9f4ebfa560edd984146548ab07925dba73f # Parent 912d9cf36783146e61a68d554253e70956ea9125 HTTP/2: introduce h2c->conf_ctx. No functional changes. Signed-off-by: Piotr Sikora diff

[PATCH 08 of 14] HTTP/2: add HTTP/2 to upstreams

2017-06-22 Thread Piotr Sikora via nginx-devel
# HG changeset patch # User Piotr Sikora # Date 1490767180 25200 # Tue Mar 28 22:59:40 2017 -0700 # Node ID 154ca6c5e62a1931a616e9f2b99ef2553b7c2c8b # Parent 00bfd879eaf03f32373ab27110dd8f77c2b722a0 HTTP/2: add HTTP/2 to upstreams. Signed-off-by: Piotr Sikora diff -r 00bfd879eaf0 -r 154ca

[PATCH 10 of 14] Proxy: always emit "Host" header first

2017-06-22 Thread Piotr Sikora via nginx-devel
# HG changeset patch # User Piotr Sikora # Date 1489618489 25200 # Wed Mar 15 15:54:49 2017 -0700 # Node ID 068381014f256ad6e2dc490bacc2529cebbb0462 # Parent 96075d4cd2a6e8bd67caf1d7b78f8e87d757c48d Proxy: always emit "Host" header first. Signed-off-by: Piotr Sikora diff -r 96075d4cd2a6 -

[PATCH 06 of 14] HTTP/2: introduce stream->fake_connection

2017-06-22 Thread Piotr Sikora via nginx-devel
# HG changeset patch # User Piotr Sikora # Date 1489111358 28800 # Thu Mar 09 18:02:38 2017 -0800 # Node ID 64d12a65309eca3859055a04eb02cc14f3b3168d # Parent 24b0f9f4ebfa560edd984146548ab07925dba73f HTTP/2: introduce stream->fake_connection. No functional changes. Signed-off-by: Piotr Siko

[PATCH 07 of 14] HTTP/2: introduce ngx_http_v2_handle_event()

2017-06-22 Thread Piotr Sikora via nginx-devel
# HG changeset patch # User Piotr Sikora # Date 1489114845 28800 # Thu Mar 09 19:00:45 2017 -0800 # Node ID 00bfd879eaf03f32373ab27110dd8f77c2b722a0 # Parent 64d12a65309eca3859055a04eb02cc14f3b3168d HTTP/2: introduce ngx_http_v2_handle_event(). No functional changes. Signed-off-by: Piotr S

[PATCH 09 of 14] Proxy: add "proxy_ssl_alpn" directive

2017-06-22 Thread Piotr Sikora via nginx-devel
# HG changeset patch # User Piotr Sikora # Date 1489621682 25200 # Wed Mar 15 16:48:02 2017 -0700 # Node ID 96075d4cd2a6e8bd67caf1d7b78f8e87d757c48d # Parent 154ca6c5e62a1931a616e9f2b99ef2553b7c2c8b Proxy: add "proxy_ssl_alpn" directive. ALPN is used here only to indicate which version of t

[PATCH 13 of 14] Proxy: add "proxy_pass_trailers" directive

2017-06-22 Thread Piotr Sikora via nginx-devel
# HG changeset patch # User Piotr Sikora # Date 1490351854 25200 # Fri Mar 24 03:37:34 2017 -0700 # Node ID cde1f42da7b26b7d2b788f916685e736b919138e # Parent 7eb807b056da7abe9c679b59e94595d59a1406e6 Proxy: add "proxy_pass_trailers" directive. Signed-off-by: Piotr Sikora diff -r 7eb807b056

[PATCH 11 of 14] Proxy: split configured header names and values

2017-06-22 Thread Piotr Sikora via nginx-devel
# HG changeset patch # User Piotr Sikora # Date 1489618535 25200 # Wed Mar 15 15:55:35 2017 -0700 # Node ID 0637acdb51e29e1f68f5f3e762115c702cab4e72 # Parent 068381014f256ad6e2dc490bacc2529cebbb0462 Proxy: split configured header names and values. Previously, each configured header was repr

[PATCH 12 of 14] Proxy: add HTTP/2 support

2017-06-22 Thread Piotr Sikora via nginx-devel
# HG changeset patch # User Piotr Sikora # Date 1490769087 25200 # Tue Mar 28 23:31:27 2017 -0700 # Node ID 7eb807b056da7abe9c679b59e94595d59a1406e6 # Parent 0637acdb51e29e1f68f5f3e762115c702cab4e72 Proxy: add HTTP/2 support. Signed-off-by: Piotr Sikora diff -r 0637acdb51e2 -r 7eb807b056d

[PATCH 14 of 14] Cache: add HTTP/2 support

2017-06-22 Thread Piotr Sikora via nginx-devel
# HG changeset patch # User Piotr Sikora # Date 1491954701 25200 # Tue Apr 11 16:51:41 2017 -0700 # Node ID 432abcf285745ec6b6ee14d6487a4a42b51b7bce # Parent cde1f42da7b26b7d2b788f916685e736b919138e Cache: add HTTP/2 support. Signed-off-by: Piotr Sikora diff -r cde1f42da7b2 -r 432abcf2857

Re: [PATCH 03 of 14] HTTP/2: add debug logging of control frames

2017-07-05 Thread Piotr Sikora via nginx-devel
Hey Valentin, comments below. I commented only on the first occurrence, but obviously those comments apply to all similar changes. > ngx_log_debug0(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, > - "http2 SETTINGS frame ack:1"); > + "http2 SETTIN

Re: [PATCH 10 of 14] Proxy: always emit "Host" header first

2017-07-05 Thread Piotr Sikora via nginx-devel
Hey Maxim, > As already outlined in the review here: > > http://mailman.nginx.org/pipermail/nginx-devel/2017-June/010087.html > > the approach taken looks very fragile. There should be a better > way to do this. I disagree. The change is minimal (which is something that you seem to always prefer

Re: [PATCH 12 of 14] Proxy: add HTTP/2 support

2017-07-25 Thread Piotr Sikora via nginx-devel
Hey Maxim, > There are serious concerns about this and with other patches. > Most generic ones are outlined below. > > 1. Server-side HTTP/2 code complexity concerns. > > As per discussion with Valentin, introducing client-related code > paths in the server HTTP/2 code seems to complicate things.

Re: [PATCH 12 of 14] Proxy: add HTTP/2 support

2017-07-31 Thread Piotr Sikora via nginx-devel
Hey Maxim, On Tue, Jul 25, 2017 at 6:28 PM, Piotr Sikora wrote: > Hey Maxim, > >> There are serious concerns about this and with other patches. >> Most generic ones are outlined below. >> >> 1. Server-side HTTP/2 code complexity concerns. >> >> As per discussion with Valentin, introducing client-

[PATCH] HTTP/2: signal 0-byte HPACK's dynamic table size

2017-08-30 Thread Piotr Sikora via nginx-devel
# HG changeset patch # User Piotr Sikora # Date 1504129931 25200 # Wed Aug 30 14:52:11 2017 -0700 # Node ID 7e1e91f9ca063563cb293136e7b1cede36e63dc6 # Parent c7d4017c8876af6d8570e400320537d7d39e9578 HTTP/2: signal 0-byte HPACK's dynamic table size. This change lets NGINX talk to clients wit

[PATCH] HTTP/2: don't limit number of requests per HTTP/2 connection

2017-08-30 Thread Piotr Sikora via nginx-devel
# HG changeset patch # User Piotr Sikora # Date 1504129797 25200 # Wed Aug 30 14:49:57 2017 -0700 # Node ID 49b677bf2ae7ab92499766e8184ddcbf7a4233f9 # Parent c7d4017c8876af6d8570e400320537d7d39e9578 HTTP/2: don't limit number of requests per HTTP/2 connection. Previous default limit (1000 r

Re: [PATCH] HTTP/2: don't limit number of requests per HTTP/2 connection

2017-08-30 Thread Piotr Sikora via nginx-devel
Hey Valentin, > This opens a vector for dos attack. There are some configurations > when memory can be allocated from connection pool for each request. > Removing a reasonable enough limit for requests per connection > potentially allow an attacker to grow this pool until a worker > process will

Re: [PATCH] HTTP/2: signal 0-byte HPACK's dynamic table size

2017-09-11 Thread Piotr Sikora via nginx-devel
Hey Maxim, > Thank you for the patch. I've pushed a change which fixes tests > with this patch (http://hg.nginx.org/nginx-tests/rev/24e175025ad8). > Unless there are objections, I'll push this patch with the > following mostly style changes: Those changes look fine, thanks. Best regards, Piotr

[PATCH] Upstream: flush low-level buffers on write retry

2017-12-01 Thread Piotr Sikora via nginx-devel
# HG changeset patch # User Patryk Lesiewicz # Date 1512172754 28800 # Fri Dec 01 15:59:14 2017 -0800 # Node ID 0e2e2da798261fe5105017d9678566267b07e2b9 # Parent fc0d06224edac2c7cfbfd9a4def478f285d9957b Upstream: flush low-level buffers on write retry. If the data to write is bigger than wh

Re: yield 499 while reading client body and client prematurely closed connection

2018-01-15 Thread Piotr Sikora via nginx-devel
Hi Alex, On Mon, Jan 15, 2018 at 9:59 PM, tokers wrote: > # HG changeset patch > # User Alex Zhang > # Date 1516079440 -28800 > # Tue Jan 16 13:10:40 2018 +0800 > # Node ID 9ca5af970d2296a02acefb3070237c5f52119708 > # Parent 93abb5a855d6534f0356882f45be49f8c6a95a8b > yield 499 while readin

Re: [PATCH] HTTP/2: copy additional headers in the pushed requests

2018-02-08 Thread Piotr Sikora via nginx-devel
Hi Ruslan, > http header: "User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36" > http header: "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8" > http header: "Accept-En

Re: [PATCH] HTTP/2: don't limit number of requests per HTTP/2 connection

2018-03-12 Thread Piotr Sikora via nginx-devel
Hey, just as reminder, limiting HTTP/2 connections to 1000 requests without graceful shutdown via 2-stage GOAWAY is still an issue and while this might work with browsers, you're going to break gRPC-based microservices proxied via NGINX pretty badly, so you should either implement graceful shutdown

[PATCH] Upstream: added $upstream_bytes_sent variable

2018-11-27 Thread Piotr Sikora via nginx-devel
# HG changeset patch # User Piotr Sikora # Date 1494129075 25200 # Sat May 06 20:51:15 2017 -0700 # Node ID fafbb3ee41e5bb03bcfba73f7d4367b8ab7d36cc # Parent be5cb9c67c05ccaf22dab7abba78aa4c1545a8ee Upstream: added $upstream_bytes_sent variable. Signed-off-by: Piotr Sikora diff -r be5cb9c

[PATCH] HTTP/2: fixed handling of fully preread request bodies

2018-11-27 Thread Piotr Sikora via nginx-devel
# HG changeset patch # User Piotr Sikora # Date 1540435636 25200 # Wed Oct 24 19:47:16 2018 -0700 # Node ID 466c154c5c53b956660211df96331b3c25669485 # Parent be5cb9c67c05ccaf22dab7abba78aa4c1545a8ee HTTP/2: fixed handling of fully preread request bodies. Previously, fully preread request bo

[PATCH] HTTP: stop emitting server version by default

2024-02-27 Thread Piotr Sikora via nginx-devel
# HG changeset patch # User Piotr Sikora # Date 1708977611 0 # Mon Feb 26 20:00:11 2024 + # Branch patch001 # Node ID a8a592b9b62eff7bca03e8b46669f59d2da689ed # Parent 89bff782528a91ad123b63b624f798e6fd9c8e68 HTTP: stop emitting server version by default. This information is only useful

[PATCH] Core: free connections and read/write events at shutdown

2024-02-27 Thread Piotr Sikora via nginx-devel
# HG changeset patch # User Piotr Sikora # Date 1708977616 0 # Mon Feb 26 20:00:16 2024 + # Branch patch002 # Node ID f8d9fb94eab212f6e640b7a68ed111562e3157d5 # Parent a8a592b9b62eff7bca03e8b46669f59d2da689ed Core: free connections and read/write events at shutdown. Found with LeakSanit

[PATCH] Upstream: cleanup at shutdown

2024-02-27 Thread Piotr Sikora via nginx-devel
# HG changeset patch # User Piotr Sikora # Date 1708977618 0 # Mon Feb 26 20:00:18 2024 + # Branch patch003 # Node ID 8edb4003177dac56301aed7f86f8d2a564b47552 # Parent f8d9fb94eab212f6e640b7a68ed111562e3157d5 Upstream: cleanup at shutdown. Add "free_upstream" callback called on worker e

[PATCH] Correctly initialize ngx_str_t

2024-02-27 Thread Piotr Sikora via nginx-devel
# HG changeset patch # User Piotr Sikora # Date 1708977619 0 # Mon Feb 26 20:00:19 2024 + # Branch patch004 # Node ID 52936793ac076072c3544aa4e27f973d2f8fecda # Parent 8edb4003177dac56301aed7f86f8d2a564b47552 Correctly initialize ngx_str_t. Previously, only the "len" field was set, whic

[PATCH] Geo: fix uninitialized memory access

2024-02-27 Thread Piotr Sikora via nginx-devel
# HG changeset patch # User Piotr Sikora # Date 1708977621 0 # Mon Feb 26 20:00:21 2024 + # Branch patch005 # Node ID fe6f8a72d42970df176ea53f4f0aea16947ba5b8 # Parent 52936793ac076072c3544aa4e27f973d2f8fecda Geo: fix uninitialized memory access. Found with MemorySanitizer. Signed-off-

[PATCH] Core: fix conversion of IPv4-mapped IPv6 addresses

2024-02-27 Thread Piotr Sikora via nginx-devel
# HG changeset patch # User Piotr Sikora # Date 1708977626 0 # Mon Feb 26 20:00:26 2024 + # Branch patch007 # Node ID 5584232259d28489efba149f2f5ae730691ff0d4 # Parent 03e5549976765912818120e11f6b08410a2af6a9 Core: fix conversion of IPv4-mapped IPv6 addresses. Found with UndefinedBehavi

[PATCH] Rewrite: fix "return" directive without response text

2024-02-27 Thread Piotr Sikora via nginx-devel
# HG changeset patch # User Piotr Sikora # Date 1708977628 0 # Mon Feb 26 20:00:28 2024 + # Branch patch008 # Node ID 3cde11b747c08c69889edc014a700317fe4d1d88 # Parent 5584232259d28489efba149f2f5ae730691ff0d4 Rewrite: fix "return" directive without response text. Previously, the respons

[PATCH 2 of 2] SSL: add $ssl_curve when using AWS-LC

2024-02-27 Thread Piotr Sikora via nginx-devel
# HG changeset patch # User Piotr Sikora # Date 1708977632 0 # Mon Feb 26 20:00:32 2024 + # Branch patch009 # Node ID dfffc67d286b788204f60701ef4179566d933a1b # Parent 5e923992006199748e79b08b1e65c4ef41f07495 SSL: add $ssl_curve when using AWS-LC. Signed-off-by: Piotr Sikora diff -r 5

[PATCH 1 of 2] SSL: add support for AWS-LC

2024-02-27 Thread Piotr Sikora via nginx-devel
# HG changeset patch # User Piotr Sikora # Date 1708977630 0 # Mon Feb 26 20:00:30 2024 + # Branch patch009 # Node ID 5e923992006199748e79b08b1e65c4ef41f07495 # Parent 3cde11b747c08c69889edc014a700317fe4d1d88 SSL: add support for AWS-LC. AWS-LC is a fork of BoringSSL with some performan

[PATCH] Core: fix build without libcrypt

2024-02-27 Thread Piotr Sikora via nginx-devel
# HG changeset patch # User Piotr Sikora # Date 1708977637 0 # Mon Feb 26 20:00:37 2024 + # Branch patch013 # Node ID cdc173477ea99fd6c952a85e5cd11db66452076a # Parent 04e3155b3b9651fee708898aaf82ac35532806ee Core: fix build without libcrypt. libcrypt is no longer part of glibc, so it m

[PATCH] Configure: link libcrypt when a feature using it is detected

2024-02-27 Thread Piotr Sikora via nginx-devel
# HG changeset patch # User Piotr Sikora # Date 1708977638 0 # Mon Feb 26 20:00:38 2024 + # Branch patch014 # Node ID 570e97dddeeddb79c71587aa8a10150b64404beb # Parent cdc173477ea99fd6c952a85e5cd11db66452076a Configure: link libcrypt when a feature using it is detected. Previously, this

[PATCH] Configure: set cache line sizes for more architectures

2024-02-27 Thread Piotr Sikora via nginx-devel
# HG changeset patch # User Piotr Sikora # Date 1708977642 0 # Mon Feb 26 20:00:42 2024 + # Branch patch016 # Node ID bb99cbe3a343ae581d2369b990aee66e69679ca2 # Parent f58bc1041ebca635517b919d58b49923bf24f76d Configure: set cache line sizes for more architectures. Signed-off-by: Piotr S

[PATCH] macOS: detect cache line size at runtime

2024-02-27 Thread Piotr Sikora via nginx-devel
# HG changeset patch # User Piotr Sikora # Date 1708977640 0 # Mon Feb 26 20:00:40 2024 + # Branch patch015 # Node ID f58bc1041ebca635517b919d58b49923bf24f76d # Parent 570e97dddeeddb79c71587aa8a10150b64404beb macOS: detect cache line size at runtime. Notably, Apple Silicon CPUs have 128

[PATCH] Configure: add support for Homebrew on Apple Silicon

2024-02-27 Thread Piotr Sikora via nginx-devel
# HG changeset patch # User Piotr Sikora # Date 1708977643 0 # Mon Feb 26 20:00:43 2024 + # Branch patch017 # Node ID dd95daa55cf6131a7e845edd6ad3b429bcef6f98 # Parent bb99cbe3a343ae581d2369b990aee66e69679ca2 Configure: add support for Homebrew on Apple Silicon. Signed-off-by: Piotr Sik

[PATCH] Win32: include missing

2024-02-27 Thread Piotr Sikora via nginx-devel
# HG changeset patch # User Piotr Sikora # Date 1708977633 0 # Mon Feb 26 20:00:33 2024 + # Branch patch011 # Node ID 9b57470dc49f8d8d10abe30a5df628732d7618dc # Parent 480071fe7251829912a4f42301e8fc85da2d1905 Win32: include missing . Signed-off-by: Piotr Sikora diff -r 480071fe7251 -r

[PATCH] Configure: allow cross-compiling to Windows using Clang

2024-02-27 Thread Piotr Sikora via nginx-devel
# HG changeset patch # User Piotr Sikora # Date 1708977648 0 # Mon Feb 26 20:00:48 2024 + # Branch patch019 # Node ID 77eab4d83413b053d9681611d243335a95ee5567 # Parent ea1ab31c166c52372b40429a1cccece9ec9e003b Configure: allow cross-compiling to Windows using Clang. Signed-off-by: Piotr

[PATCH] Win32: fix unique file index calculations

2024-02-27 Thread Piotr Sikora via nginx-devel
# HG changeset patch # User Piotr Sikora # Date 1708977635 0 # Mon Feb 26 20:00:35 2024 + # Branch patch012 # Node ID 04e3155b3b9651fee708898aaf82ac35532806ee # Parent 9b57470dc49f8d8d10abe30a5df628732d7618dc Win32: fix unique file index calculations. The old code was breaking strict al

[PATCH] Configure: fix "make install" when cross-compiling to Windows

2024-02-27 Thread Piotr Sikora via nginx-devel
# HG changeset patch # User Piotr Sikora # Date 1708977646 0 # Mon Feb 26 20:00:46 2024 + # Branch patch018 # Node ID ea1ab31c166c52372b40429a1cccece9ec9e003b # Parent dd95daa55cf6131a7e845edd6ad3b429bcef6f98 Configure: fix "make install" when cross-compiling to Windows. Signed-off-by:

Re: [PATCH] HTTP: stop emitting server version by default

2024-03-08 Thread Piotr Sikora via nginx-devel
Hi Sergey, > I don't think this is a good idea to change the default behaviour > for the directive we have for a long-long time. But it's arguably a wrong behavior, and keeping it forever wrong because of a decision made ~20 years ago, doesn't seem like a particularly great idea. Also, while I'

Re: [PATCH] Configure: add support for Homebrew on Apple Silicon

2024-03-08 Thread Piotr Sikora via nginx-devel
Hi Sergey, > An obvious question is why do you need this change. Homebrew seems > to be quite niche to pay attention. Homebrew [1] is orders of magnitude more popular than MacPorts [2], which is already supported by the configure script. > Using appropriate paths in > --with-cc-opt / --with-ld-

Re: [PATCH] Core: free connections and read/write events at shutdown

2024-03-08 Thread Piotr Sikora via nginx-devel
Hi Sergey, > Since this is not a real memory leak (the allocations made in the > init_process method of the ngx_event_core_module module are used up > to this function and already freed on exit automatically, as this > function never returns), I don't think there is something to fix. Agreed, this

Re: [PATCH] Core: free connections and read/write events at shutdown

2024-03-20 Thread Piotr Sikora via nginx-devel
Hi Sergey, > While I agree that false positives do not allow to run LeakSanitizer > in a clean fashion, I don't think it is nginx which should be fixed. > Rather, sanitizer analysis could be improved instead to prevent FPs. Patches welcome? > Meanwhile, leak sanitizer can be used with suppressio

Re: [PATCH] Geo: fix uninitialized memory access

2024-03-20 Thread Piotr Sikora via nginx-devel
Hi Roman, > Thanks for the patch, looks valid, except we no longer need to explicitly > initialize fields to zero. Right, I was going back-and-forth between which version I should send. > Also, I think we need more details about the > uninitialized memory access. See updated patch. LGTM, thank

Re: [PATCH] Core: fix conversion of IPv4-mapped IPv6 addresses

2024-03-20 Thread Piotr Sikora via nginx-devel
Hi Sergey, > The "shift" remark doesn't describe a problem in details. It's not a remark, it's the name of the UndefinedBehaviorSanitizer check that caught the issue [1]. > @@ -507,7 +507,7 @@ ngx_cidr_match(struct sockaddr *sa, ngx_ > > p = inaddr6->s6_addr; > > -inad

Re: [PATCH 1 of 2] SSL: add support for AWS-LC

2024-03-21 Thread Piotr Sikora via nginx-devel
Hi Roman, > It looks like this library is not super popular, but the patch is relatively > large. Perhaps it's not as widely used as the forks that started ~10 years ago, but it's basically a version of BoringSSL that's more suitable to use with NGINX than BoringSSL itself: - it ships releases an

Re: [PATCH] Core: fix build without libcrypt

2024-03-21 Thread Piotr Sikora via nginx-devel
Hi Roman, > Can you provide an example of a system where this fix is needed? 1. When linking against musl-libc on a system where libcrypt is linked against glibc and thus not linkable. 2. When cross-compiling, for similar reasons. Best regards, Piotr Sikora __

Re: [PATCH] macOS: detect cache line size at runtime

2024-03-21 Thread Piotr Sikora via nginx-devel
Hi Sergey, > I prefer not to introduce more ad-hoc prefixes in the log summary. > Something like moving the "macOS" part to the end should be fine. That's fine with me. > style: this breaks a perfect indentation of two spaces after type; > further, it appears to be unsorted by type; I'd put it a

Re: [PATCH] Configure: link libcrypt when a feature using it is detected

2024-03-21 Thread Piotr Sikora via nginx-devel
Hi Sergey, > I'd rewrote the description to be more specific: > > : Configure: fixed Linux crypt_r() test to add libcrypt. > : > : Previously, the resulting binary was successfully linked > : because libcrypt was added in a separate test for crypt(). That's fine with me. Best regards, Piotr Sik

Re: [PATCH 2 of 2] SSL: add $ssl_curve when using AWS-LC

2024-03-25 Thread Piotr Sikora via nginx-devel
Hi Sergey, > Not sure nginx needs such complexity. > Instead, I'd expect the missing API to be added to the library, > especially that both parent and grandparent implement it. > > BoringSSL didn't have such API for quite some time until recently. Right, this patch predates addition of this API

[PATCH] QUIC: fix build against musl-libc when using Clang

2024-05-02 Thread Piotr Sikora via nginx-devel
# HG changeset patch # User Piotr Sikora # Date 1714589495 0 # Wed May 01 18:51:35 2024 + # Node ID 962cddbaecf02b9c213dca492a74b23924b8f24c # Parent 49dce50fad40bf09db81ca2a35983ecd7b740e43 QUIC: fix build against musl-libc when using Clang. Signed-off-by: Piotr Sikora diff -r 49dce5

[PATCH] Configure: test --with-cc-opt options

2024-05-02 Thread Piotr Sikora via nginx-devel
# HG changeset patch # User Piotr Sikora # Date 1714589524 0 # Wed May 01 18:52:04 2024 + # Node ID 0d5498e86bf8a7f119ed83dbc0789be37d728334 # Parent 49dce50fad40bf09db81ca2a35983ecd7b740e43 Configure: test --with-cc-opt options. Previously, invalid C compiler options would fail with an

[PATCH] Configure: fix warnings in a few feature tests

2024-05-02 Thread Piotr Sikora via nginx-devel
# HG changeset patch # User Piotr Sikora # Date 1714589586 0 # Wed May 01 18:53:06 2024 + # Node ID c083cd8ead811426c6f7bd7c4ab58a413d80be52 # Parent 49dce50fad40bf09db81ca2a35983ecd7b740e43 Configure: fix warnings in a few feature tests. Signed-off-by: Piotr Sikora diff -r 49dce50fad

[PATCH] Configure: always test with provided C compiler options

2024-05-02 Thread Piotr Sikora via nginx-devel
# HG changeset patch # User Piotr Sikora # Date 1714589692 0 # Wed May 01 18:54:52 2024 + # Node ID df39b5d3c3a0c670f3d94e623351b6c659f5be84 # Parent 49dce50fad40bf09db81ca2a35983ecd7b740e43 Configure: always test with provided C compiler options. Previously, build in auto/include didn'

[PATCH] Configure: fix build on Windows using non-MSVC compilers

2024-05-02 Thread Piotr Sikora via nginx-devel
# HG changeset patch # User Piotr Sikora # Date 1714589717 0 # Wed May 01 18:55:17 2024 + # Node ID 43b04ece77b7132db868122a20c99c8ba89adfb5 # Parent 49dce50fad40bf09db81ca2a35983ecd7b740e43 Configure: fix build on Windows using non-MSVC compilers. Previously, kernel32 and user32 librar

[PATCH] Configure: build C++ test module using C++ compiler

2024-05-02 Thread Piotr Sikora via nginx-devel
# HG changeset patch # User Piotr Sikora # Date 1714589815 0 # Wed May 01 18:56:55 2024 + # Node ID 787e1adea9aa7f681884657f119e864af0be3e0d # Parent 49dce50fad40bf09db81ca2a35983ecd7b740e43 Configure: build C++ test module using C++ compiler. This fixes build when using C compiler that

[PATCH] Configure: postpone running the test binary

2024-05-02 Thread Piotr Sikora via nginx-devel
# HG changeset patch # User Piotr Sikora # Date 1714589827 0 # Wed May 01 18:57:07 2024 + # Node ID 2d5e754e3a4e7a59eaf7f653ad4fd5346f53eab4 # Parent 49dce50fad40bf09db81ca2a35983ecd7b740e43 Configure: postpone running the test binary. Previously, the ./configure script would attempt to

[PATCH] Configure: increase the default optimization level to -O2

2024-05-02 Thread Piotr Sikora via nginx-devel
# HG changeset patch # User Piotr Sikora # Date 1714589900 0 # Wed May 01 18:58:20 2024 + # Node ID 429191aad8d3ab8f70d40dfdd7684a256357bc48 # Parent 49dce50fad40bf09db81ca2a35983ecd7b740e43 Configure: increase the default optimization level to -O2. Signed-off-by: Piotr Sikora diff -r

<    1   2