soup-filter-input-stream: fix non-blocking behavior to not spin
authorDan Winship <danw@gnome.org>
Wed, 12 Dec 2012 16:16:40 +0000 (17:16 +0100)
committerDan Winship <danw@gnome.org>
Wed, 12 Dec 2012 16:35:58 +0000 (17:35 +0100)
commit33170885f097133e609d9322405bcf3dcb70a546
tree1f62cd0dbb29319dee5b351ca805747d5cb62fc4
parent0243f71b16cd915f4ab0fdccb65f479b075613e5
soup-filter-input-stream: fix non-blocking behavior to not spin

Just having a non-empty internal buffer isn't enough to guarantee we
can do a non-blocking read; if the caller is doing a read_until, we
might have some data in the buffer but still be waiting to find the
boundary. So track that. Based on a patch from Gustavo Noronha Silva.
libsoup/soup-filter-input-stream.c