Index: utils/ofhttp/OFHTTP.m ================================================================== --- utils/ofhttp/OFHTTP.m +++ utils/ofhttp/OFHTTP.m @@ -496,10 +496,19 @@ @"%[prog]: -q / --quiet and -v / --verbose are mutually " @"exclusive!", @"prog", [OFApplication programName])]; [OFApplication terminateWithStatus: 1]; } + + if (_outputPath != nil && _detectFileName) { + [of_stderr writeLine: OF_LOCALIZED( + @"output_xor_detect_filename", + @"%[prog]: -o / --output and -O / --detect-filename are " + @"mutually exclusive!", + @"prog", [OFApplication programName])]; + [OFApplication terminateWithStatus: 1]; + } if (_outputPath != nil && _URLs.count > 1) { [of_stderr writeLine: OF_LOCALIZED(@"output_only_with_one_url", @"%[prog]: Cannot use -o / --output when more than one URL " @@ -930,18 +939,17 @@ _detectFileNameRequest = true; [_HTTPClient asyncPerformRequest: request]; return; } - [_currentFileName release]; - _currentFileName = nil; - _detectedFileName = false; - - if (!_quiet) - [of_stdout writeFormat: @"⇣ %@", URL.string]; - - if (_outputPath != nil) + if (!_detectedFileName) { + [_currentFileName release]; + _currentFileName = nil; + } else + _detectedFileName = false; + + if (_currentFileName == nil) _currentFileName = [_outputPath copy]; if (_currentFileName == nil) _currentFileName = [URL.path.lastPathComponent copy]; @@ -962,10 +970,13 @@ forKey: @"Range"]; } @catch (OFRetrieveItemAttributesFailedException *e) { } } + if (!_quiet) + [of_stdout writeFormat: @"⇣ %@", URL.string]; + request = [OFHTTPRequest requestWithURL: URL]; request.headers = clientHeaders; request.method = _method; _detectFileNameRequest = false; Index: utils/ofhttp/lang/de.json ================================================================== --- utils/ofhttp/lang/de.json +++ utils/ofhttp/lang/de.json @@ -27,10 +27,14 @@ "unknown_long_option": "%[prog]: Unbekannte Option: --%[opt]", "unknown_option": "%[prog]: Unbekannte Option: -%[opt]", "quiet_xor_verbose": [ "%[prog]: -q / --quiet und -v / --verbose schließen sich gegenseitig ", "aus!" + ], + "output_xor_detect_filename": [ + "%[prog]: -o / --output und -O / --detect-filename schließen sich ", + "gegenseitig aus!" ], "output_only_with_one_url": [ "%[prog]: -o / --output kann nicht mit mehr als einer URL benutzt ", "werden!" ],