ObjFW  Diff

Differences From Artifact [fb6dd8b062]:

To Artifact [e41f9ea835]:


253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
			      port: [URL port]
			    target: self
			  selector: @selector(socketDidConnect:context:
					exception:)
			   context: nil];
}

- (void)didCreateResponse: (OFHTTPResponse *)response
{
	[_client->_delegate client:_client
		 didPerformRequest:_request
			  response:response];
}

- (void)createResponseWithSocket: (OFTCPSocket *)socket
{
	OFURL *URL = [_request URL];
	OFHTTPClientResponse *response;
	OFString *connectionHeader;
	bool keepAlive;
	OFString *location;







<
<
<
<
<
<
<







253
254
255
256
257
258
259







260
261
262
263
264
265
266
			      port: [URL port]
			    target: self
			  selector: @selector(socketDidConnect:context:
					exception:)
			   context: nil];
}








- (void)createResponseWithSocket: (OFTCPSocket *)socket
{
	OFURL *URL = [_request URL];
	OFHTTPClientResponse *response;
	OFString *connectionHeader;
	bool keepAlive;
	OFString *location;
394
395
396
397
398
399
400
401



402
403
404
405
406
407
408
409
410
	if (_status / 100 != 2)
		@throw [OFHTTPRequestFailedException
		    exceptionWithRequest: _request
				response: response];

	_client->_inProgress = false;

	[self performSelector: @selector(didCreateResponse:)



		   withObject: response
		   afterDelay: 0];
}

- (bool)handleFirstLine: (OFString *)line
{
	/*
	 * It's possible that the write succeeds on a connection that is
	 * keep-alive, but the connection has already been closed by the remote







|
>
>
>
|
|







387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
	if (_status / 100 != 2)
		@throw [OFHTTPRequestFailedException
		    exceptionWithRequest: _request
				response: response];

	_client->_inProgress = false;

	[_client->_delegate performSelector: @selector(client:didPerformRequest:
						 response:)
				 withObject: _client
				 withObject: _request
				 withObject: response
				 afterDelay: 0];
}

- (bool)handleFirstLine: (OFString *)line
{
	/*
	 * It's possible that the write succeeds on a connection that is
	 * keep-alive, but the connection has already been closed by the remote