From f6ac059a05b65bd9e93ba59fd932e3f8568a250a Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Thu, 8 Sep 2011 08:26:16 +0000 Subject: Handle zero-length documents correctly svn path=/trunk/netsurf/; revision=12778 --- content/llcache.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'content/llcache.c') diff --git a/content/llcache.c b/content/llcache.c index b02d0135f..3862cb467 100644 --- a/content/llcache.c +++ b/content/llcache.c @@ -1444,6 +1444,15 @@ nserror llcache_object_notify_users(llcache_object *object) if (error != NSERROR_OK) return error; + continue; + } else if (error == NSERROR_NEED_DATA) { + /* User requested replay */ + handle->state = LLCACHE_FETCH_HEADERS; + + /* Continue with the next user -- we'll + * reemit the event next time round */ + user->iterator_target = false; + next_user = user->next; continue; } else if (error != NSERROR_OK) { user->iterator_target = false; @@ -1521,6 +1530,15 @@ nserror llcache_object_notify_users(llcache_object *object) if (error != NSERROR_OK) return error; + continue; + } else if (error == NSERROR_NEED_DATA) { + /* User requested replay */ + handle->state = LLCACHE_FETCH_DATA; + + /* Continue with the next user -- we'll + * reemit the event next time round */ + user->iterator_target = false; + next_user = user->next; continue; } else if (error != NSERROR_OK) { user->iterator_target = false; -- cgit v1.2.3