ObjFW  Check-in [0e2f8c361e]

Overview
Comment:ofhttp: Don't try writing a file for HEAD requests
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 0e2f8c361e5341674e75549bcd5dc0ccd5db323927e5d255110ba4be27496e61
User & Date: js on 2020-03-22 21:39:58
Other Links: manifest | tags
Context
2020-03-23
00:00
ofdns: Better options using OFOptionsParser check-in: 8bd5fe0c4e user: js tags: trunk
2020-03-22
21:39
ofhttp: Don't try writing a file for HEAD requests check-in: 0e2f8c361e user: js tags: trunk
16:15
ofhttp: Allow all request methods check-in: a013a9d577 user: js tags: trunk
Changes

Modified utils/ofhttp/OFHTTP.m from [a9d2a994f3] to [7982cd7599].

840
841
842
843
844
845
846



847
848
849
850
851
852
853
	}
}

-      (void)client: (OFHTTPClient *)client
  didPerformRequest: (OFHTTPRequest *)request
	   response: (OFHTTPResponse *)response
{



	if (_detectFileNameRequest) {
		_currentFileName = [fileNameFromContentDisposition(
		    [response.headers objectForKey: @"Content-Disposition"])
		    copy];
		_detectedFileName = true;

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







>
>
>







840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
	}
}

-      (void)client: (OFHTTPClient *)client
  didPerformRequest: (OFHTTPRequest *)request
	   response: (OFHTTPResponse *)response
{
	if (_method == OF_HTTP_REQUEST_METHOD_HEAD)
		goto next;

	if (_detectFileNameRequest) {
		_currentFileName = [fileNameFromContentDisposition(
		    [response.headers objectForKey: @"Content-Disposition"])
		    copy];
		_detectedFileName = true;

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