ObjFW  Diff

Differences From Artifact [af54b95e34]:

To Artifact [be1d7818d7]:


259
260
261
262
263
264
265















266
267
268
269
270
271
272
			}

			[s_headers setObject: value
				      forKey: key];
		}

		data = [[sock readDataArrayTillEndOfStream] retain];
















		result = [[OFHTTPRequestResult alloc]
		    initWithStatusCode: status
			       headers: s_headers
				  data: data];
	} @finally {
		[pool release];







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
			}

			[s_headers setObject: value
				      forKey: key];
		}

		data = [[sock readDataArrayTillEndOfStream] retain];

		if ([s_headers objectForKey: @"Content-Length"] != nil) {
			intmax_t cl;

			cl = [[s_headers objectForKey: @"Content-Length"]
			    decimalValue];

			if (cl > SIZE_MAX)
				@throw [OFOutOfRangeException
				    newWithClass: isa];

			if (cl != [data count])
				@throw [OFTruncatedDataException
				    newWithClass: isa];
		}

		result = [[OFHTTPRequestResult alloc]
		    initWithStatusCode: status
			       headers: s_headers
				  data: data];
	} @finally {
		[pool release];