From: Martin Schanzenbach Date: Tue, 12 Jun 2012 16:37:56 +0000 (+0000) Subject: -fix html detection X-Git-Tag: initial-import-from-subversion-38251~13115 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=18272d148770c907cd0bb632badaf37e3ec9f7dd;p=oweals%2Fgnunet.git -fix html detection --- 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)) {