projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
73a4e2f
)
* if we decide whether we need to read another chunk, take into account if the buffer...
author
Wilfried Göesgens
<willi@citadel.org>
Mon, 17 Aug 2009 20:37:12 +0000
(20:37 +0000)
committer
Wilfried Göesgens
<willi@citadel.org>
Mon, 17 Aug 2009 20:37:12 +0000
(20:37 +0000)
webcit/tcp_sockets.c
patch
|
blob
|
history
diff --git
a/webcit/tcp_sockets.c
b/webcit/tcp_sockets.c
index 23fd9cf371422d8c9696647ebe42c7cb3e7126ae..45c07ee79aef137e6e78be391cb40a11fe649f4d 100644
(file)
--- a/
webcit/tcp_sockets.c
+++ b/
webcit/tcp_sockets.c
@@
-523,6
+523,9
@@
int client_read_to(ParsedHttpHdrs *Hdr, StrBuf *Target, int bytes, int timeout)
#ifdef HAVE_OPENSSL
if (is_https) {
long bufremain;
+ long baselen;
+
+ baselen = StrLength(Target);
if (Hdr->Pos == NULL)
Hdr->Pos = ChrPtr(Hdr->ReadBuf);
@@
-535,7
+538,7
@@
int client_read_to(ParsedHttpHdrs *Hdr, StrBuf *Target, int bytes, int timeout)
if (bytes > bufremain)
{
- while ((StrLength(Hdr->ReadBuf) + StrLength(Target) < bytes) &&
+ while ((StrLength(Hdr->ReadBuf) + StrLength(Target) < bytes
+ baselen
) &&
(retval >= 0))
retval = client_read_sslbuffer(Hdr->ReadBuf, timeout);
if (retval >= 0) {