aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/webui.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/webui.c b/src/webui.c
index 92b8c601c..05c64fc1d 100644
--- a/src/webui.c
+++ b/src/webui.c
@@ -225,7 +225,11 @@ http_calculate_content_length (struct evbuffer *evb, struct evhttp_request *req)
{
gchar numbuf[64];
+#if _EVENT_NUMERIC_VERSION > 0x02000000
rspamd_snprintf (numbuf, sizeof (numbuf), "%z", evbuffer_get_length (evb));
+#else
+ rspamd_snprintf (numbuf, sizeof (numbuf), "%z", evb->totallen);
+#endif
evhttp_add_header(req->output_headers, "Content-Length", numbuf);
}