ObjFW  Check-in [eadd1a0c54]

Overview
Comment:OFHTTPClient: Compare port using -[isEqual:]

-[OFURL port] used to be an integer, but was changed to being an
OFNumber, so needs -[isEqual:] now.

Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: eadd1a0c5432cb96489cf361e1ce06bfa5005f496d97e68e9411195971cf2c2f
User & Date: js on 2019-03-19 22:36:40
Other Links: manifest | tags
Context
2019-03-20
21:04
Force inline tryReadBits and of_huffman_tree_walk check-in: 6a0bf8be32 user: js tags: trunk
2019-03-19
22:36
OFHTTPClient: Compare port using -[isEqual:] check-in: eadd1a0c54 user: js tags: trunk
22:23
OFTCPSocket: Properly close socket on error check-in: 7d78a2b675 user: js tags: trunk
Changes

Modified src/OFHTTPClient.m from [fa73320acf] to [e2bb72d5a2].

628
629
630
631
632
633
634
635


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

635
636
637
638
639
640
641
642
643







-
+
+







	OFURL *URL = _request.URL;
	OFTCPSocket *sock;

	/* Can we reuse the last socket? */
	if (_client->_socket != nil && !_client->_socket.atEndOfStream &&
	    [_client->_lastURL.scheme isEqual: URL.scheme] &&
	    [_client->_lastURL.host isEqual: URL.host] &&
	    _client->_lastURL.port == URL.port &&
	    (_client->_lastURL.port == URL.port ||
	    [_client->_lastURL.port isEqual: URL.port]) &&
	    (_client->_lastWasHEAD || _client->_lastResponse.atEndOfStream)) {
		/*
		 * Set _socket to nil, so that in case of an error it won't be
		 * reused. If everything is successful, we set _socket again
		 * at the end.
		 */
		sock = [_client->_socket autorelease];