ObjFW  Check-in [0fde3368f6]

Overview
Comment:OFHTTPClient: Make sure _firstLine is always reset
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 0fde3368f69b4344a569ad9bcb6a17e924366ceff7d5e4032dd42f72666b6ce6
User & Date: js on 2018-01-07 04:09:59
Other Links: manifest | tags
Context
2018-01-14
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
2018-01-03
23:00
ofhttp: Fix file name not always being reset check-in: 8377e80ba9 user: js tags: trunk
Changes

Modified src/OFHTTPClient.m from [665aefad5d] to [6b671b812e].

219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
	self = [super init];

	@try {
		_client = [client retain];
		_request = [request retain];
		_redirects = redirects;
		_context = [context retain];
		_firstLine = true;
		_serverHeaders = [[OFMutableDictionary alloc] init];
	} @catch (id e) {
		[self release];
		@throw e;
	}

	return self;







<







219
220
221
222
223
224
225

226
227
228
229
230
231
232
	self = [super init];

	@try {
		_client = [client retain];
		_request = [request retain];
		_redirects = redirects;
		_context = [context retain];

		_serverHeaders = [[OFMutableDictionary alloc] init];
	} @catch (id e) {
		[self release];
		@throw e;
	}

	return self;
539
540
541
542
543
544
545

546
547
548
549
550
551
552
		[_client->_delegate client: _client
		     didEncounterException: exception
				forRequest: _request
				   context: _context];
		return 0;
	}


	[sock asyncReadLineWithTarget: self
			     selector: @selector(socket:didReadLine:context:
					   exception:)
			      context: nil];
	return 0;
}








>







538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
		[_client->_delegate client: _client
		     didEncounterException: exception
				forRequest: _request
				   context: _context];
		return 0;
	}

	_firstLine = true;
	[sock asyncReadLineWithTarget: self
			     selector: @selector(socket:didReadLine:context:
					   exception:)
			      context: nil];
	return 0;
}