From d12b5dc54ecf01d5c4bf2eb28f39223362d3ac78 Mon Sep 17 00:00:00 2001 From: Pasu Chan Date: Fri, 24 Mar 2017 17:41:58 +0800 Subject: [PATCH] Support binary HTTP(s) response bodies --- src/modules/DifferentContent.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/modules/DifferentContent.c b/src/modules/DifferentContent.c index ce1f777..1c3bf58 100644 --- a/src/modules/DifferentContent.c +++ b/src/modules/DifferentContent.c @@ -62,9 +62,13 @@ httpse_check_different_content(const HttpseTData *tdata) /* Remark: if strcmp == 0, no diff content */ - if(0 == strcmp(tdata->rs->userp->c_str, tdata->rp->userp->c_str)) + if(tdata->rs->userp->size == tdata->rp->userp->size) { - return HTTPSE_OK; + if(0 == memcmp(tdata->rs->userp->data, tdata->rp->userp->data, + tdata->rs->userp->size)) + { + return HTTPSE_OK; + } }