Re: response header for CORS

2020-08-28 Thread Jonathan Matthews
On Thu, 27 Aug 2020 at 15:49, Senthil Naidu wrote: > Hi > > I am trying to enable corse with below in my frontend > > capture request header origin len 128 > Don’t the (1.6) docs suggest that line needs to be prefixed with “declare”? J -- Jonathan Matthews https://jpluscplusm.com

Re: [PATCH v3 0/2] Certificate Generation Enhancements

2020-08-28 Thread Gersner
On Tue, Aug 25, 2020 at 5:42 PM William Lallemand wrote: > On Sun, Aug 23, 2020 at 01:58:11PM +0300, gers...@gmail.com wrote: > > From: Shimi Gersner > > > > Hi Team, William, > > > > Took me some time to get back to this. This version resolves all > > comments from previous patch. > > As

Re: [PATCH v3 0/2] Certificate Generation Enhancements

2020-08-28 Thread William Lallemand
On Fri, Aug 28, 2020 at 11:53:47AM +0300, Gersner wrote: > Thanks William! > > I will commit some time to add those reg-tests. > > Shimi. Thanks a lot, that's greatly appreciated! -- William Lallemand

Re: [RFC PATCH] MEDIUM: Add support for if-none-match for cache responses

2020-08-28 Thread William Lallemand
On Thu, Aug 27, 2020 at 07:14:32PM +0200, Tim Düsterhus wrote: > William, > > Am 27.08.20 um 18:53 schrieb William Lallemand: > > Changing the status and reason in the IO handler is the right thing to > > do since it's for the response. > > Okay, good. Is there an easier way to generate a proper

[RFC PATCH v2 1/4] MINOR: http: Add `enum etag_type http_get_etag_type(const struct ist)`

2020-08-28 Thread Tim Duesterhus
http_get_etag_type returns whether a given `etag` is a strong, weak, or invalid ETag. --- include/haproxy/http-t.h | 6 ++ include/haproxy/http.h | 21 + 2 files changed, 27 insertions(+) diff --git a/include/haproxy/http-t.h b/include/haproxy/http-t.h index

[RFC PATCH v2 0/4] Add support for if-none-match for cache responses

2020-08-28 Thread Tim Duesterhus
William, Am 28.08.20 um 13:57 schrieb William Lallemand: >> So basically I would need to simply store the 'if-none-match' of the >> request within the `appctx`, yes? > > That's right, once the object is found in the cache, you can check the > etag from the request action and set a flag in the

[RFC PATCH v2 3/4] MINOR: http: Add `int etag_compare(struct ist, struct ist, int)`

2020-08-28 Thread Tim Duesterhus
etag_compare compares two ETags according to RFC 7232#2.3.2. --- include/haproxy/http.h | 2 ++ src/http.c | 32 2 files changed, 34 insertions(+) diff --git a/include/haproxy/http.h b/include/haproxy/http.h index f7ac72c87..09c35e417 100644 ---

[RFC PATCH v2 2/4] MINOR: compression: Make use of http_get_etag_type()

2020-08-28 Thread Tim Duesterhus
This commit makes the compressor use http_get_etag_type to validate the ETag instead of using an ad-hoc condition. --- src/flt_http_comp.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/flt_http_comp.c b/src/flt_http_comp.c index 87f359d03..0360d94be 100644 ---

[RFC PATCH v2 4/4] MEDIUM: cache: Add support for if-none-match for cache responses

2020-08-28 Thread Tim Duesterhus
This commit adds support for conditional requests using ETags to the cache. Specifically the cache now is able to return a 304 Not Modified to requests if the resource is unchanged according to the validation logic of RFC 7232#3.2. The implementation is not 100% according to spec: Only the first