changeset 293:332beeff0b3d

2003-10-22 Brian Masney <masneyb@gftp.org> * lib/rfc2068.c - fixed parsing some chunked file transfers
author masneyb
date Wed, 22 Oct 2003 20:27:23 +0000
parents e5ce6f15290f
children 4747f621b79b
files ChangeLog lib/rfc2068.c
diffstat 2 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sun Oct 19 13:31:25 2003 +0000
+++ b/ChangeLog	Wed Oct 22 20:27:23 2003 +0000
@@ -1,3 +1,6 @@
+2003-10-22 Brian Masney <masneyb@gftp.org>
+	* lib/rfc2068.c - fixed parsing some chunked file transfers
+
 2003-10-19 Brian Masney <masneyb@gftp.org>
 	* lib/rfc959.c - abort a file transfer properly. When a transfer is
 	aborted, you will not be disconnected from the remote site.
@@ -1592,7 +1595,7 @@
 
 	* cvsclean - added this script
 
-	* *.[ch] - added $Id: ChangeLog,v 1.154 2003/10/19 13:31:24 masneyb Exp $ tags
+	* *.[ch] - added $Id: ChangeLog,v 1.155 2003/10/22 20:27:23 masneyb Exp $ tags
 
 	* debian/* - updated files from Debian maintainer
 
--- a/lib/rfc2068.c	Sun Oct 19 13:31:25 2003 +0000
+++ b/lib/rfc2068.c	Wed Oct 22 20:27:23 2003 +0000
@@ -764,8 +764,10 @@
 
   if (read_size > 0 && !params->eof)
     {
-      read_size--; /* decrement by one so that we can put the NUL character in
-                      the buffer */
+      if (size == read_size)
+        read_size--; /* decrement by one so that we can put the NUL character
+                        in the buffer */
+
       retval = params->real_read_function (request, read_ptr_pos, read_size, fd);
 
       if (retval > 0)