curl-library
Re: header only response [PATCH]
Date: Mon, 8 Apr 2002 09:13:33 +0200 (MET DST)
On Mon, 8 Apr 2002, Daniel Stenberg wrote:
I think I made a little mistake in the previous patch, I think this will work
better:
diff -u -r1.89 transfer.c
--- lib/transfer.c 4 Apr 2002 12:19:56 -0000 1.89
+++ lib/transfer.c 8 Apr 2002 07:13:11 -0000
@@ -366,15 +366,12 @@
reading! */
if(-1 != conn->size)
conn->maxdownload = conn->size;
-
- /* If max download size is *zero* (nothing) we already
- have nothing and can safely return ok now! */
- if(0 == conn->maxdownload)
- stop_reading = TRUE;
-
- /* What to do if the size is *not* known? */
}
-
+ /* If max download size is *zero* (nothing) we already
+ have nothing and can safely return ok now! */
+ if(0 == conn->maxdownload)
+ stop_reading = TRUE;
+
if(stop_reading) {
/* we make sure that this socket isn't read more now */
k->keepon &= ~KEEP_READ;
@@ -447,6 +444,7 @@
* NOT contain a message-body, and thus is always terminated
* by the first empty line after the header fields. */
conn->size=0;
+ conn->maxdownload=0;
break;
default:
/* nothing */
-- Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/Received on 2002-04-08