From 2c8c98ad2424a3de7a61efe4e03964ef88a2a988 Mon Sep 17 00:00:00 2001 From: Francesco Chemolli Date: Mon, 3 Oct 2011 17:44:56 +0200 Subject: [PATCH] Optimization in HttpHdrCc::packInto : if there is nothing to fill in don't even look --- src/HttpHdrCc.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/HttpHdrCc.cc b/src/HttpHdrCc.cc index 74a86f1247..1df1278dae 100644 --- a/src/HttpHdrCc.cc +++ b/src/HttpHdrCc.cc @@ -216,6 +216,10 @@ HttpHdrCc::parse(const String & str) void HttpHdrCc::packInto(Packer * p) const { + // optimization: if the mask is empty do nothing + if (mask==0) + return; + http_hdr_cc_type flag; int pcount = 0; assert(p); -- 2.47.3