ObjFW  Check-in [a7872e1065]

Overview
Comment:ofhttp: Only print HEAD request for -O with -v

This also fixes trying to print the name when it has not been detected
yet.

Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: a7872e10653f2b01ffdf799d41df3408a66d06856dde46a32d3fd0a3fb6b5a93
User & Date: js on 2019-03-18 21:27:20
Other Links: manifest | tags
Context
2019-03-19
00:32
ofhttp: Set _resumedFrom to 0 if statusCode != 206 check-in: 967a498fcc user: js tags: trunk
2019-03-18
21:27
ofhttp: Only print HEAD request for -O with -v check-in: a7872e1065 user: js tags: trunk
2019-03-16
23:37
Add -[OFASN1Boolean DEREncodedValue] check-in: f77aff5b45 user: js tags: trunk
Changes

Modified utils/ofhttp/OFHTTP.m from [64f6fe7e2e] to [6159de2c20].

763
764
765
766
767
768
769
770

771
772
773
774
775
776
777
778
779
780
781
782
783
784

785
786
787
788
789
790
791
763
764
765
766
767
768
769

770
771
772
773
774
775
776
777
778
779
780
781
782
783

784
785
786
787
788
789
790
791







-
+













-
+







			void *pool = objc_autoreleasePoolPush();
			OFEnumerator OF_GENERIC(OFString *) *keyEnumerator =
			    [headers keyEnumerator];
			OFEnumerator OF_GENERIC(OFString *) *objectEnumerator =
			    [headers objectEnumerator];
			OFString *key, *object;

			if (statusCode / 100 == 2) {
			if (statusCode / 100 == 2 && _currentFileName != nil) {
				[of_stdout writeString: @"  "];
				[of_stdout writeLine: OF_LOCALIZED(
				    @"info_name_unaligned",
				    @"Name: %[name]",
				    @"name", _currentFileName)];
			}

			while ((key = [keyEnumerator nextObject]) != nil &&
			    (object = [objectEnumerator nextObject]) != nil)
				[of_stdout writeFormat: @"  %@: %@\n",
							key, object];

			objc_autoreleasePoolPop(pool);
		} else if (statusCode / 100 == 2) {
		} else if (statusCode / 100 == 2 && !_detectFileNameRequest) {
			[of_stdout writeString: @"  "];
			[of_stdout writeLine: OF_LOCALIZED(@"info_name",
			    @"Name: %[name]",
			    @"name", _currentFileName)];
			[of_stdout writeString: @"  "];
			[of_stdout writeLine: OF_LOCALIZED(@"info_type",
			    @"Type: %[type]",