Differences From Artifact [df33921628]:
- File src/OFDataArray.m — part of check-in [9c421b6ff0] at 2013-01-13 03:17:11 on branch trunk — OFBigDataArray: Always keep at least one page. (user: js, size: 15096) [annotate] [blame] [check-ins using]
To Artifact [993787fe25]:
- File
src/OFDataArray.m
— part of check-in
[bdf9c4d96b]
at
2013-01-26 00:13:56
on branch trunk
— Make OFHTTPRequestReply a stream.
This also implements chunked transfer encoding for OFHTTPServer and adds
a property for the protocol version to OFHTTPRequest(Reply).Additionally, this makes it possible to add an async version of
OFHTTPClient. (user: js, size: 15474) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | #import "OFDataArray.h" #import "OFString.h" #import "OFFile.h" #import "OFURL.h" #import "OFHTTPClient.h" #import "OFHTTPRequest.h" #import "OFHTTPRequestReply.h" #import "OFXMLElement.h" #import "OFSystemInfo.h" #import "OFHTTPRequestFailedException.h" #import "OFInvalidArgumentException.h" #import "OFInvalidFormatException.h" #import "OFOutOfMemoryException.h" #import "OFOutOfRangeException.h" #import "autorelease.h" #import "base64.h" #import "macros.h" /* References for static linking */ void _references_to_categories_of_OFDataArray(void) | > > | 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | #import "OFDataArray.h" #import "OFString.h" #import "OFFile.h" #import "OFURL.h" #import "OFHTTPClient.h" #import "OFHTTPRequest.h" #import "OFHTTPRequestReply.h" #import "OFDictionary.h" #import "OFXMLElement.h" #import "OFSystemInfo.h" #import "OFHTTPRequestFailedException.h" #import "OFInvalidArgumentException.h" #import "OFInvalidFormatException.h" #import "OFOutOfMemoryException.h" #import "OFOutOfRangeException.h" #import "OFTruncatedDataException.h" #import "autorelease.h" #import "base64.h" #import "macros.h" /* References for static linking */ void _references_to_categories_of_OFDataArray(void) |
︙ | ︙ | |||
140 141 142 143 144 145 146 147 148 149 150 151 152 153 | - initWithContentsOfURL: (OFURL*)URL { void *pool; OFHTTPClient *client; OFHTTPRequest *request; OFHTTPRequestReply *reply; Class c; c = [self class]; [self release]; pool = objc_autoreleasePoolPush(); | > > | 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 | - initWithContentsOfURL: (OFURL*)URL { void *pool; OFHTTPClient *client; OFHTTPRequest *request; OFHTTPRequestReply *reply; OFDictionary *headers; OFString *contentLength; Class c; c = [self class]; [self release]; pool = objc_autoreleasePoolPush(); |
︙ | ︙ | |||
163 164 165 166 167 168 169 | if ([reply statusCode] != 200) @throw [OFHTTPRequestFailedException exceptionWithClass: [request class] request: request reply: reply]; | | > > > > > > > > | 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 | if ([reply statusCode] != 200) @throw [OFHTTPRequestFailedException exceptionWithClass: [request class] request: request reply: reply]; self = [[reply readDataArrayTillEndOfStream] retain]; headers = [reply headers]; if ((contentLength = [headers objectForKey: @"Content-Length"]) != nil) if ([self count] != (size_t)[contentLength decimalValue]) @throw [OFTruncatedDataException exceptionWithClass: [self class]]; objc_autoreleasePoolPop(pool); return self; } - initWithStringRepresentation: (OFString*)string { self = [super init]; |
︙ | ︙ |