path: root/mod_glusterfs
diff options
authorPavan Sondur <>2009-05-27 10:39:38 +0000
committerAnand V. Avati <>2009-05-29 02:12:53 -0700
commit23976ec1e8554963d5e6a868c3982a8baa3d361a (patch)
treef3166295fa4f475dca3f9416551fce90cdcf54d1 /mod_glusterfs
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 <>
Diffstat (limited to 'mod_glusterfs')
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 0fefd66..d565dce2 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;