summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2013-01-06 17:32:45 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2013-01-06 17:32:45 +0400
commit1d63fed447d8b74d81468a57af9773773f654210 (patch)
treef6af95d00710581d7a133341dc419e670e19bde3 /src
parent54c2f784b7848b15f0a12329dd282e24fad87c04 (diff)
downloadrspamd-1d63fed447d8b74d81468a57af9773773f654210.tar.gz
rspamd-1d63fed447d8b74d81468a57af9773773f654210.zip
Fix for old libevent.
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);
}