ObjFW  Check-in [a45da5cb30]

Overview
Comment:ofhttp: Prevent empty file name
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: a45da5cb300f0d6ee68983d106764b539078a5f137dfbd571b5efca69984b7d0
User & Date: js on 2023-08-26 15:30:33
Other Links: manifest | tags
Context
2023-08-26
19:02
configure: Change TLS default to OpenSSL check-in: 121e9fddd2 user: js tags: trunk
15:30
ofhttp: Prevent empty file name check-in: a45da5cb30 user: js tags: trunk
10:44
ofhttp: Add error message for failed TLS handshake check-in: 579dd0a7ee user: js tags: trunk
Changes

Modified utils/ofhttp/OFHTTP.m from [32c3b36a14] to [02af79d7f6].

1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123

	if (_currentFileName == nil)
		_currentFileName = [_outputPath copy];

	if (_currentFileName == nil)
		_currentFileName = [IRI.path.lastPathComponent copy];

	if ([_currentFileName isEqual: @"/"]) {
		[_currentFileName release];
		_currentFileName = nil;
	}

	if (_currentFileName == nil)
		_currentFileName = @"unnamed";








|







1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123

	if (_currentFileName == nil)
		_currentFileName = [_outputPath copy];

	if (_currentFileName == nil)
		_currentFileName = [IRI.path.lastPathComponent copy];

	if ([_currentFileName isEqual: @"/"] || _currentFileName.length == 0) {
		[_currentFileName release];
		_currentFileName = nil;
	}

	if (_currentFileName == nil)
		_currentFileName = @"unnamed";