diff lib/protocols.c @ 209:d79e2782eb1b

2003-7-5 Brian Masney <masneyb@gftp.org> * lib/protocols.c (gftp_get_line) - fixed bug where the read function was being called one extra time after the end of file was reached * lib/rfc2068.c - fixes for chunked file transfers. All known issues with the HTTP protocol should be (hopefully) fixed now * lib/httpcommon.h (struct rfc2068_params_tag) - added eof variable
author masneyb
date Sat, 05 Jul 2003 17:30:14 +0000
parents cf4098008615
children 3f2203e70218
line wrap: on
line diff
--- a/lib/protocols.c	Thu Jul 03 08:29:01 2003 +0000
+++ b/lib/protocols.c	Sat Jul 05 17:30:14 2003 +0000
@@ -2048,7 +2048,12 @@
 
           (*rbuf)->curpos = (*rbuf)->buffer;
 
-          if ((ret = read_function (request, pos, rlen, fd)) < 0)
+          if ((*rbuf)->eof)
+            ret = 0;
+          else
+            ret = read_function (request, pos, rlen, fd);
+
+          if (ret < 0)
             {
               gftp_free_getline_buffer (rbuf);
               return (ret);