curl-library
Re: header only response [PATCH]
Date: Mon, 8 Apr 2002 11:28:39 +0800
Hi, Daniel,
Ha. I am surrendered. You are really great to maintain those code. After I
add some codes, it will be easily break the others. But I still think that
libcurl should be able to handle some poor servers. Here is the patch to
transfer.c which seems have no side effect up to now I have been tested. But
it is not the clever patch you want I think.
What do you thnk about the patch? Will it introduce some undesired
behaviours?
Jacky
--- transfer.c.old Mon Apr 8 11:21:49 2002
+++ transfer.c Mon Apr 8 11:21:25 2002
@@ -376,6 +376,13 @@
/* What to do if the size is *not* known? */
}
+ /* Header only response for HTTP/1.0 should be forced to stop
reading */
+ if(k->httpversion == 10)
+ {
+ if(k->httpcode==304) /* Maybe some more...*/
+ stop_reading = TRUE;
+ }
+
if(stop_reading) {
/* we make sure that this socket isn't read more now */
k->keepon &= ~KEEP_READ;
Received on 2002-04-08