ObjFW  Diff

Differences From Artifact [e2bb21d82f]:

To Artifact [075e25cbdb]:


802
803
804
805
806
807
808



809
810
811
812
813
814
815
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818







+
+
+







	    context: (id)context
{
	if ([context isEqual: @"detectFileName"]) {
		_currentFileName = [fileNameFromContentDisposition(
		    [[response headers] objectForKey: @"Content-Disposition"])
		    copy];
		_detectedFileName = true;

		/* Handle this URL on the next -[downloadNextURL] call */
		_URLIndex--;

		[self performSelector: @selector(downloadNextURL)
			   afterDelay: 0];
		return;
	}

	if ([_outputPath isEqual: @"-"])
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
917
918
919
920
921
922
923



924
925
926
927
928
929
930







-
-
-







		_errorCode = 1;
		goto next;
	}

	clientHeaders = [[_clientHeaders mutableCopy] autorelease];

	if (_detectFileName && !_detectedFileName) {
		/* Handle this URL on the next -[downloadNextURL] call */
		_URLIndex--;

		if (!_quiet)
			[of_stdout writeFormat: @"⠒ %@", [URL string]];

		request = [OFHTTPRequest requestWithURL: URL];
		[request setHeaders: clientHeaders];
		[request setMethod: OF_HTTP_REQUEST_METHOD_HEAD];