diff -ru http-tiny-1.2.orig/http_lib.c http-tiny-1.2/http_lib.c
--- http-tiny-1.2.orig/http_lib.c	1998-09-23 07:19:50.000000000 +0100
+++ http-tiny-1.2/http_lib.c	2006-08-03 14:29:02.000000000 +0100
@@ -33,7 +33,7 @@
 
 static char *rcsid="$Id: http_lib.c,v 3.5 1998/09/23 06:19:15 dl Exp $";
 
-#define VERBOSE
+
 
 /* http_lib - Http data exchanges mini library.
  */
@@ -341,17 +341,17 @@
       if (typebuf) sscanf(header,"content-type: %s",typebuf);
     }
     if (length<=0) {
-      close(fd);
-      return ERRNOLG;
+        /* length is not set! - choose a default length */
+        length = 10*1024;
     }
-    if (plength) *plength=length;
     if (!(*pdata=malloc(length))) {
       close(fd);
       return ERRMEM;
     }
     n=http_read_buffer(fd,*pdata,length);
     close(fd);
-    if (n!=length) ret=ERRRDDT;
+    if (n>length) ret=ERRRDDT;
+    if (plength) *plength = n;
   } else if (ret>=0) close(fd);
   return ret;
 }
