On 09/10/2021 07:18 PM, Tim Düsterhus wrote:
Patch 2 looks odd to me. Is the issue that .ptr is equal to NULL and
*that* is causing issues? Then I recommend the following instead:

if (!isttest(v))
v = ist("");

this is much cleaner, because it does not attempt to cram so much logic
into that single huge line.

In any case if the issue is a NULL then you must test for that NULL
instead of testing the length.

Hello Tim,

the problem is that in this case after calling the function
htx_get_blk_value(), v.ptr is not a NULL pointer but v.len is equal
to 0, if the http header has no value.

Of course, it could look like this:

if (v.len == 0)
   v.ptr = "" /* or v = ist("") */;


Best regards,

--
Zaga    <[email protected]>

What can change the nature of a man?

Reply via email to