Differences From Artifact [62848f22ab]:
- File
src/OFHTTPClient.m
— part of check-in
[7f102e8c95]
at
2020-10-31 19:16:46
on branch trunk
— OFHTTPClient: Remove didFailWithException
Instead, add an exception to didPerformRequest, to make it more
consistent with other places. (user: js, size: 30336) [annotate] [blame] [check-ins using]
To Artifact [c27ed01d4c]:
- File src/OFHTTPClient.m — part of check-in [4bbac7ab17] at 2020-11-01 11:35:03 on branch trunk — OFString: Add -[substring{From,To}Index:] (user: js, size: 30275) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
998 999 1000 1001 1002 1003 1004 | if (_toRead == 0) _toRead = -2; return length; } else { void *pool = objc_autoreleasePoolPush(); OFString *line; | | | | | < | < | 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 | if (_toRead == 0) _toRead = -2; return length; } else { void *pool = objc_autoreleasePoolPush(); OFString *line; size_t pos; @try { line = [_socket tryReadLine]; } @catch (OFInvalidEncodingException *e) { @throw [OFInvalidServerReplyException exception]; } if (line == nil) return 0; pos = [line rangeOfString: @";"].location; if (pos != OF_NOT_FOUND) line = [line substringToIndex: pos]; if (line.length < 1) { /* * We have read the empty string because the socket is * at end of stream. */ if (_socket.atEndOfStream && pos == OF_NOT_FOUND) @throw [OFTruncatedDataException exception]; else @throw [OFInvalidServerReplyException exception]; } @try { |
︙ | ︙ |