fix bug handling eof in read

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@24088 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2006-11-14 15:54:21 +00:00
parent 5b06ca2b78
commit 27d3458cb4
2 changed files with 88 additions and 1 deletions

View file

@ -1,3 +1,88 @@
2006-11-14 Richard Frith-Macdonald <rfm@gnu.org>
* Source/GSHTTPURLHandle.m: fix bug detecting eof in read.
Add code to check for eof immediately before writing.
2006-11-12 Richard Frith-Macdonald <rfm@gnu.org>
* Source/GSHTTPURLHandle.m: Clear pageInfo before load.
Improve checking for dropped connections.
2006-11-08 Richard Frith-Macdonald <rfm@gnu.org>
Source/NSIndexSet.m: ([addIndexesInRange:])
Fix for case when added range lies within existing range.
2006-11-08 Richard Frith-Macdonald <rfm@gnu.org>
* Source/Additions/GSXML.m: ([stringByEscapingXML]) Fix bug causing
newline characters to be removed from escaped strings.
2006-11-07 David Wetzel <dave@turbocat.de>
* Source/Additions/GSXML.m:
Fix error setting start and end element for SAX.
2006-11-06 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSObject.m: Use %p to print address in description.
* Documentation/General/OpenStepCompliance.gsdoc:
* Documentation/General/Debugging.gsdoc:
* Tools/gsdoc.gsdoc:
* Tools/gdomap.gsdoc:
* Tools/gsdoc-1_0_1.dtd:
* Tools/gsdoc-1_0_1.rnc:
* Tools/autogsdoc.m:
* Tools/AGSOutput.m:
* Tools/autogsdoc.1:
* Tools/BaseTools.gsdoc:
Minor documentation version fixups.
2006-11-03 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSString.m: ([stringByAddingPercentEscapesUsingEncoding:])
Improved documentation.
* Source/Additions/GSMime.m: Add more charset mappings for where the
hyphen after the 'iso' has been omitted.
2006-11-02 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSString.m: ([stringByAddingPercentEscapesUsingEncoding:])
Make the set of characters escaped compatible with MacOS-X (10.4).
2006-11-01 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSSortDescriptor.m; minor tidyups
* Headers/Foundation/NSSortDescriptor.h: add documentation
* Headers/Foundation/NSKeyValueCoding.h: improve version macros
* Headers/Foundation/NSKeyValueObserving.h: add include for NSArray
2006-10-31 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSSocketPortNameServer.m:
* Source/NSRunLoop.m:
* Source/NSDebug.m:
* Source/unix/GSRunLoopCtxt.m:
* Source/NSPort.m:
* Source/NSConcreteNumber.h:
* Source/win32/GSRunLoopCtxt.m:
* Source/NSThread.m:
* Source/NSSerializer.m:
* Documentation/Base.gsdoc:
* Headers/Foundation/NSTimeZone.h:
* Headers/Foundation/NSHashTable.h:
* Headers/Foundation/NSCoder.h:
* Headers/Foundation/NSRange.h:
* Headers/Foundation/NSURLCredential.h:
* Headers/Foundation/NSHTTPCookieStorage.h:
* Headers/Foundation/NSException.h:
* Headers/Foundation/NSByteOrder.h:
* Headers/Foundation/NSPortCoder.h:
* Headers/Foundation/NSURL.h:
* Headers/Foundation/NSURLAuthenticationChallenge.h:
* Headers/Foundation/NSCompoundPredicate.h:
* Headers/Foundation/NSObject.h:
* Headers/Foundation/NSString.h:
2006-11-14 Adam Fedor <fedor@gnu.org>
* Headers/Additions/GNUstepBase/GSCategories.h: Add GSOnce macros.

View file

@ -516,6 +516,7 @@ static void debugWrite(GSHTTPURLHandle *handle, NSData *data)
NSDictionary *dict = [not userInfo];
NSData *d;
NSRange r;
unsigned readCount;
BOOL complete = NO;
RETAIN(self);
@ -523,6 +524,7 @@ static void debugWrite(GSHTTPURLHandle *handle, NSData *data)
if (debug) NSLog(@"%@ %s", NSStringFromSelector(_cmd), keepalive?"K":"");
d = [dict objectForKey: NSFileHandleNotificationDataItem];
if (debug == YES) debugRead(self, d);
readCount = [d length];
if (connectionState == idle)
{
@ -717,7 +719,7 @@ static void debugWrite(GSHTTPURLHandle *handle, NSData *data)
}
}
if (complete == NO && [d length] == 0)
if (complete == NO && readCount == 0)
{
/* The read failed ... dropped, but parsing is not complete.
* The request was sent, so we can't know whether it was