summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergio Villar Senin <svillar@igalia.com>2013-01-18 19:06:48 +0100
committerSergio Villar Senin <svillar@igalia.com>2013-01-18 19:34:04 +0100
commit1d94ff8543c372c13220971e65e5508f7efeebb7 (patch)
treef6c9d0e2abce5d5fa0d477af6b78e092def9ed4a
parent91f1eea16dac133609a9a083f7e34d5d4ce44003 (diff)
downloadlibsoup-1d94ff8543c372c13220971e65e5508f7efeebb7.tar.gz
soup-body-input-stream: update priv->eof when skipping
We must update the priv->eof field in the skip() operation as we do in read(). This bug was causing redirects not to finish because the SoupBodyInputStream was creating a pollable source that will never issue anything instead of a plain timeout source. https://bugzilla.gnome.org/show_bug.cgi?id=692026
-rw-r--r--libsoup/soup-body-input-stream.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libsoup/soup-body-input-stream.c b/libsoup/soup-body-input-stream.c
index fff07803..939753a9 100644
--- a/libsoup/soup-body-input-stream.c
+++ b/libsoup/soup-body-input-stream.c
@@ -286,7 +286,9 @@ soup_body_input_stream_skip (GInputStream *stream,
MIN (count, priv->read_length),
cancellable, error);
- if (skipped != -1)
+ if (skipped == 0)
+ priv->eof = TRUE;
+ else if (skipped > 0)
priv->pos += skipped;
return skipped;