aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/inputStream_http.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/inputStream_http.c b/src/inputStream_http.c
index f2dadf4e3..48972ac8b 100644
--- a/src/inputStream_http.c
+++ b/src/inputStream_http.c
@@ -686,7 +686,6 @@ static int recv_response(InputStream * is)
parse_headers(is, response, needle);
if (is->size <= 0)
is->seekable = 0;
- is->seekable = 0;
needle += sizeof("\r\n\r\n") - 1;
peeked = needle - response;
assert(peeked <= r);
@@ -810,6 +809,8 @@ int inputStream_httpSeek(InputStream * is, long offset, int whence)
}
diff = is->offset - old_offset;
+ if (!diff)
+ return 0; /* nothing to seek */
if (diff > 0) { /* seek forward if we've already buffered it */
long avail = (long)ringbuf_read_space(data->rb);
if (avail >= diff) {