From ff6768faa6cf82d0ddedb268e133f915a9ec28f5 Mon Sep 17 00:00:00 2001 From: schanzen Date: Tue, 12 Jun 2012 16:37:56 +0000 Subject: -fix html detection git-svn-id: https://gnunet.org/svn/gnunet@21922 140774ce-b5e7-0310-ab8b-a85725594a96 --- src/gns/gnunet-gns-proxy.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/gns/gnunet-gns-proxy.c b/src/gns/gnunet-gns-proxy.c index 65139beb4c..c99010dc44 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)) { -- cgit v1.2.3-18-g5258