BUG/MEDIUM: htx: Don't return the start-line if the HTX message is empty
In the function htx_get_stline(), NULL must be returned if the HTX message
doesn't contain any element.
This patch must be backported to 1.9.
diff --git a/include/common/htx.h b/include/common/htx.h
index 9cbc953..cd7db05 100644
--- a/include/common/htx.h
+++ b/include/common/htx.h
@@ -280,7 +280,7 @@
{
struct htx_sl *sl = NULL;
- if (htx->sl_off != -1)
+ if (htx->used && htx->sl_off != -1)
sl = ((void *)htx->blocks + htx->sl_off);
return sl;