ObjFW  Diff

Differences From Artifact [f132e311be]:

To Artifact [723a0ca5c9]:


506
507
508
509
510
511
512
513

514
515
516
517
518
519
520
521
522
523
524
525

526
527
528
529
530
531
532
506
507
508
509
510
511
512

513



514
515
516
517
518
519
520
521

522
523
524
525
526
527
528
529







-
+
-
-
-








-
+







	}

	lineC = line.UTF8String;

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

	if ((keyC = malloc(tmp - lineC + 1)) == NULL)
	keyC = of_malloc(1, tmp - lineC + 1);
		@throw [OFOutOfMemoryException
		    exceptionWithRequestedSize: tmp - lineC + 1];

	memcpy(keyC, lineC, tmp - lineC);
	keyC[tmp - lineC] = '\0';
	normalizeKey(keyC);

	@try {
		key = [OFString stringWithUTF8StringNoCopy: keyC
					      freeWhenDone: true];
	} @catch (id e) {
		free(keyC);
		of_free(keyC);
		@throw e;
	}

	do {
		tmp++;
	} while (*tmp == ' ');