Fix for bug #43461 by Sergei Golovin

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@38140 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2014-10-30 09:55:40 +00:00
parent f4bb557983
commit 04971f62ff
2 changed files with 16 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2014-10-30 Sergei Golovin <Golovin.SV@gmail.com>
* Source/NSURLProtocol.m: Fix memory leak and possible hang on retry
(bug #43461).
2014-10-17 Richard Frith-Macdonald <rfm@gnu.org>
* Documentation/news.texi:

View file

@ -1579,6 +1579,17 @@ static NSURLProtocol *placeholder = nil;
buffer + written length: len];
_writeOffset = 0;
}
else if (len == 0 && ![_body hasBytesAvailable])
{
/* all _body's bytes are read and written
* so we shouldn't wait for another
* opportunity to close _body and set
* the flag 'sent'.
*/
[_body close];
DESTROY(_body);
sent = YES;
}
}
else if ([this->output streamStatus]
== NSStreamStatusWriting)