ObjFW  Diff

Differences From Artifact [8f125e31a5]:

To Artifact [110acb1505]:


438
439
440
441
442
443
444
445
446
447
448
449
450

451
452
453
454
455
456
457
438
439
440
441
442
443
444






445
446
447
448
449
450
451
452







-
-
-
-
-
-
+







	self = [super init];

	@try {
		void *pool = objc_autoreleasePoolPush();
		char *tmp, *tmp2;
		bool isIPv6Host = false;

		if ((UTF8String2 = OFStrdup(string.UTF8String)) == NULL)
			@throw [OFOutOfMemoryException
			     exceptionWithRequestedSize:
			     string.UTF8StringLength];

		UTF8String = UTF8String2;
		UTF8String = UTF8String2 = OFStrDup(string.UTF8String);

		if ((tmp = strchr(UTF8String, ':')) == NULL)
			@throw [OFInvalidFormatException exception];

		if (strncmp(tmp, "://", 3) != 0)
			@throw [OFInvalidFormatException exception];

629
630
631
632
633
634
635
636
637
638
639
640
641

642
643
644
645
646
647
648
624
625
626
627
628
629
630






631
632
633
634
635
636
637
638







-
-
-
-
-
-
+








		_URLEncodedScheme = [URL->_URLEncodedScheme copy];
		_URLEncodedHost = [URL->_URLEncodedHost copy];
		_port = [URL->_port copy];
		_URLEncodedUser = [URL->_URLEncodedUser copy];
		_URLEncodedPassword = [URL->_URLEncodedPassword copy];

		if ((UTF8String2 = OFStrdup(string.UTF8String)) == NULL)
			@throw [OFOutOfMemoryException
			     exceptionWithRequestedSize:
			     string.UTF8StringLength];

		UTF8String = UTF8String2;
		UTF8String = UTF8String2 = OFStrDup(string.UTF8String);

		if ((tmp = strchr(UTF8String, '#')) != NULL) {
			*tmp = '\0';
			_URLEncodedFragment = [[OFString alloc]
			    initWithUTF8String: tmp + 1];

			OFURLVerifyIsEscaped(_URLEncodedFragment,