Commit 8d3ad6e2 authored by Andreas Plesner Jacobsen's avatar Andreas Plesner Jacobsen Committed by Tollef Fog Heen

Small optimization: don't process header when inactive

parent bc40c1af
......@@ -330,9 +330,9 @@ collect_backend(struct logline *lp, enum VSL_tag_e tag, unsigned spec,
break;
case SLT_TxHeader:
split = strchr(ptr, ':');
if (!lp->active)
break;
split = strchr(ptr, ':');
if (split == NULL)
break;
if (isprefix(ptr, "authorization:", end, &next) &&
......@@ -438,9 +438,9 @@ collect_client(struct logline *lp, enum VSL_tag_e tag, unsigned spec,
case SLT_TxHeader:
case SLT_RxHeader:
split = strchr(ptr, ':');
if (!lp->active)
break;
split = strchr(ptr, ':');
if (split == NULL)
break;
if (tag == SLT_RxHeader &&
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment