Overview
Comment: | OFHTTPClient: Minor type cleanups |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
562d4e2f614cd2baf601f7f93954c30e |
User & Date: | js on 2018-02-18 21:26:25 |
Other Links: | manifest | tags |
Context
2018-02-19
| ||
22:57 | OFHTTPClient: Add missing _closed = true check-in: 21d9bced96 user: js tags: trunk | |
2018-02-18
| ||
21:26 | OFHTTPClient: Minor type cleanups check-in: 562d4e2f61 user: js tags: trunk | |
00:20 | OFHTTPClient: Add a callback for the request body check-in: 8681bba25e user: js tags: trunk | |
Changes
Modified src/OFHTTPClient.m from [aea3f9620c] to [55384f926c].
︙ | |||
69 70 71 72 73 74 75 | 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 | - + - + | - (void)closeAndReconnect; @end @interface OFHTTPClientRequestBodyStream: OFStream <OFReadyForWritingObserving> { OFHTTPClientRequestHandler *_handler; OFTCPSocket *_socket; |
︙ | |||
755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 | 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 | + - - + + + + | - (instancetype)initWithHandler: (OFHTTPClientRequestHandler *)handler socket: (OFTCPSocket *)sock { self = [super init]; @try { OFDictionary OF_GENERIC(OFString *, OFString *) *headers; intmax_t contentLength; OFString *contentLengthString; _handler = [handler retain]; _socket = [sock retain]; headers = [_handler->_request headers]; contentLengthString = [headers objectForKey: @"Content-Length"]; if (contentLengthString == nil) @throw [OFInvalidArgumentException exception]; |
︙ | |||
795 796 797 798 799 800 801 | 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 | - - - - - - - + + - - - - - - + | } - (size_t)lowlevelWriteBuffer: (const void *)buffer length: (size_t)length { size_t written; |
︙ | |||
879 880 881 882 883 884 885 | 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 | - - - - - + | @try { intmax_t toRead = [contentLength decimalValue]; if (toRead < 0) @throw [OFInvalidServerReplyException exception]; |
︙ | |||
918 919 920 921 922 923 924 | 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 | - + - - - - - + + + + + + + - + | [_socket release]; _socket = nil; } return 0; } |
︙ | |||
963 964 965 966 967 968 969 | 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 | - + - + - + | range = [line rangeOfString: @";"]; if (range.location != OF_NOT_FOUND) line = [line substringWithRange: of_range(0, range.location)]; @try { |
︙ |