William,
Christopher,

Am 01.09.20 um 10:29 schrieb Christopher Faulet:
>>> There is no applet for uncached requests. So there is no reason to call
>>> the release callback function. Looking at your 4th patch, you should
>>> manually release 'if_none_match' variable for uncached requests in the
>>> http_action_req_cache_use() function.
>>
>> Ah, you are correct of course. What solution would you prefer here?
>>
>> 1. Manually freeing in the else part of `if(res)`
>> 2. Moving the whole If-N-M logic down into the `si_register_handler`
>> part? I initially didn't do this, because I assumed that this was within
>> a lock, but now I realize that there's an unlock before the
>> `si_register_handler`.
>>
> 
> The second one is probably the best.

Okay, I've adjusted this.

I believe the patch is ready for a final review and merge now. Valgrind is
happy and both the old and new reg-tests pass.

Best regards

Tim Düsterhus (4):
  MINOR: http: Add `enum etag_type http_get_etag_type(const struct ist)`
  CLEANUP: compression: Make use of http_get_etag_type()
  MINOR: http: Add `int etag_compare(struct ist, struct ist, int)`
  MEDIUM: cache: Add support for if-none-match for cache responses

 include/haproxy/applet-t.h        |  1 +
 include/haproxy/http-t.h          |  6 +++
 include/haproxy/http.h            | 23 ++++++++++
 reg-tests/cache/if-none-match.vtc | 72 +++++++++++++++++++++++++++++++
 src/cache.c                       | 41 ++++++++++++++++--
 src/flt_http_comp.c               |  5 +--
 src/http.c                        | 32 ++++++++++++++
 7 files changed, 173 insertions(+), 7 deletions(-)
 create mode 100644 reg-tests/cache/if-none-match.vtc

-- 
2.28.0


Reply via email to