ObjFW  Check-in [a74b645cb2]

Overview
Comment:OFHTTPServer: Fix _contentLength not being set
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: a74b645cb297b313e4fd3c20a72305eaeda0ccd42915956cecc479c7926c39d3
User & Date: js on 2018-01-14 13:30:47
Other Links: manifest | tags
Context
2018-01-14
14:12
OFIntrospection: Fix property parsing on Apple RT check-in: cc198764b7 user: js tags: trunk
13:30
OFHTTPServer: Fix _contentLength not being set check-in: a74b645cb2 user: js tags: trunk
2018-01-07
04:09
OFHTTPClient: Make sure _firstLine is always reset check-in: 0fde3368f6 user: js tags: trunk
Changes

Modified src/OFHTTPServer.m from [2d02abe498] to [949fef07b2].

503
504
505
506
507
508
509




510
511

512
513
514
515
516
517
518
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523







+
+
+
+


+







		} @catch (OFInvalidFormatException *e) {
			return [self sendErrorAndClose: 400];
		}

		if (contentLength > 0) {
			char *buffer;

			if (contentLength < 0 ||
			    (uintmax_t)contentLength > SIZE_MAX)
				@throw [OFOutOfRangeException exception];

			buffer = [self allocMemoryWithSize: BUFFER_SIZE];
			_body = [[OFMutableData alloc] init];
			_contentLength = contentLength;

			[_socket asyncReadIntoBuffer: buffer
					      length: BUFFER_SIZE
					      target: self
					    selector: @selector(socket:
							  didReadIntoBuffer:
							  length:context: