From 4a0e5a3462e4b36b2cd22e3e1711a80f5930dd95 Mon Sep 17 00:00:00 2001
From: Marcus Wellhardh <wellhard@roxen.com>
Date: Thu, 13 Jan 2000 21:17:27 +0100
Subject: [PATCH] Fixed a bug in data(). The function sometimes read too few
 charcters. (headbuf contains "\r" not "\r\n".)

Rev: lib/modules/Protocols.pmod/HTTP.pmod/Query.pike:1.10
---
 lib/modules/Protocols.pmod/HTTP.pmod/Query.pike | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/modules/Protocols.pmod/HTTP.pmod/Query.pike b/lib/modules/Protocols.pmod/HTTP.pmod/Query.pike
index 1a88deea30..8c0f11bf94 100644
--- a/lib/modules/Protocols.pmod/HTTP.pmod/Query.pike
+++ b/lib/modules/Protocols.pmod/HTTP.pmod/Query.pike
@@ -525,7 +525,7 @@ string data()
    if (zero_type(len)) 
       l=0x7fffffff;
    else
-      l=len-strlen(buf)+4+strlen(headerbuf);
+      l=len-strlen(buf)+datapos;
    if (l>0 && con)
    {
       string s=con->read(l);
-- 
GitLab