summaryrefslogtreecommitdiffstats
path: root/mod_glusterfs/lighttpd
diff options
context:
space:
mode:
authorPavan Sondur <pavan@gluster.com>2009-05-27 10:39:38 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-05-29 02:12:53 -0700
commit23976ec1e8554963d5e6a868c3982a8baa3d361a (patch)
treef3166295fa4f475dca3f9416551fce90cdcf54d1 /mod_glusterfs/lighttpd
parentb84ab58d8c849347fc6a337a4e897c365c0b08ae (diff)
Fix mismatch in size of used buffer to prevent an infinite loop
A mismatch in the size of the used buffer, between reading and then further writing caused an infinite loop and big files(1Mb, 10Mb etc) could not be downloaded through the lighttpd web service using mod_glusterfs. This is because the big file which is broken up into chunks, has a read and a subsequent write. Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
Diffstat (limited to 'mod_glusterfs/lighttpd')
-rw-r--r--mod_glusterfs/lighttpd/1.4/mod_glusterfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mod_glusterfs/lighttpd/1.4/mod_glusterfs.c b/mod_glusterfs/lighttpd/1.4/mod_glusterfs.c
index 0fefd66f508..d565dce2839 100644
--- a/mod_glusterfs/lighttpd/1.4/mod_glusterfs.c
+++ b/mod_glusterfs/lighttpd/1.4/mod_glusterfs.c
@@ -270,7 +270,7 @@ mod_glusterfs_read_async (server *srv, connection *con, chunk *glusterfs_chunk)
check += buf->vector[i].iov_len;
- nw_write_buf->used = buf->vector[i].iov_len;
+ nw_write_buf->used = buf->vector[i].iov_len + 1;
nw_write_buf->size = buf->vector[i].iov_len;
nw_write_buf->ptr = buf->vector[i].iov_base;