From 18272d148770c907cd0bb632badaf37e3ec9f7dd Mon Sep 17 00:00:00 2001 From: Martin Schanzenbach Date: Tue, 12 Jun 2012 16:37:56 +0000 Subject: [PATCH] -fix html detection --- src/gns/gnunet-gns-proxy.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/gns/gnunet-gns-proxy.c b/src/gns/gnunet-gns-proxy.c index 65139beb4..c99010dc4 100644 --- a/src/gns/gnunet-gns-proxy.c +++ b/src/gns/gnunet-gns-proxy.c @@ -40,7 +40,7 @@ /* MHD/cURL defines */ #define BUF_WAIT_FOR_CURL 0 #define BUF_WAIT_FOR_MHD 1 -#define HTML_HDR_CONTENT "Content-Type: text/html\r\n" +#define HTML_HDR_CONTENT "Content-Type: text/html" /* regexp */ //#define RE_DOTPLUS " bytes) + return bytes; - memcpy (hdr, buffer, bytes); - hdr[bytes] = '\0'; + memcpy (hdr, buffer, len); + hdr[len] = '\0'; if (0 == strcmp (hdr, HTML_HDR_CONTENT)) { -- 2.25.1