]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
Calculate Content-Length properly.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 28 Mar 2013 17:03:26 +0000 (17:03 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 28 Mar 2013 17:03:26 +0000 (17:03 +0000)
src/webui.c

index c3788f92519e486bedb64d6e285d31647ee7214f..17762743c2f77ff77c510eeeee4754155081ddc9 100644 (file)
@@ -255,7 +255,7 @@ http_calculate_content_length (struct evbuffer *evb, struct evhttp_request *req)
 #if _EVENT_NUMERIC_VERSION > 0x02000000
        rspamd_snprintf (numbuf, sizeof (numbuf), "%z", evbuffer_get_length (evb));
 #else
-       rspamd_snprintf (numbuf, sizeof (numbuf), "%z", evb->totallen);
+       rspamd_snprintf (numbuf, sizeof (numbuf), "%z", EVBUFFER_LENGTH (evb));
 #endif
        evhttp_add_header(req->output_headers, "Content-Length", numbuf);
 }