Commit dce01d1e authored by Andreas Plesner Jacobsen's avatar Andreas Plesner Jacobsen Committed by Andreas Plesner Jacobsen

Small optimization: don't process header when inactive

parent e0007862
......@@ -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