On Wed, Feb 26, 2020 at 04:20:51PM +0100, Tim Duesterhus wrote:
> This patch replaces the ad-hoc generation of stream's `unique_id` values
> by calls to `stream_generate_unique_id`.

It seems to me that it won't generate the unique_id anymore if there
is no unique-id-header directive in the config :

>               http_manage_client_side_cookies(s, req);
>  
>       /* add unique-id if "header-unique-id" is specified */
> +     if (sess->fe->header_unique_id && 
> !LIST_ISEMPTY(&sess->fe->format_unique_id)) {
            ^^^^^^^^^^^^^^^^^^^^^^^^^^
All the unique-id generation seems to be enclosed in this. Am I missing
something ?

(...)

Other than that I have a suggestion, I've seen recently in this thread
a few calls to strlen() on unique_id and header_unique_id. I think they
should be turned to ist so that the length is always stored with them
and we don't need to run strlen on them anymore at runtime. And this
will simplify the header addition which will basically look like this:

     http_add_header(htx, sess->fe->header_unique_id, s->unique_id);

Willy

Reply via email to