| 154 | }; |
| 155 | |
| 156 | static void HttpConnection_Close(struct HttpConnection* conn) { |
| 157 | if (conn->sslCtx) { |
| 158 | SSL_Free(conn->sslCtx); |
| 159 | conn->sslCtx = NULL; |
| 160 | } |
| 161 | |
| 162 | if (conn->socket != -1) { |
| 163 | Socket_Close(conn->socket); |
| 164 | conn->socket = -1; |
| 165 | } |
| 166 | conn->valid = false; |
| 167 | } |
| 168 | |
| 169 | static void ExtractHostPort(const struct HttpUrl* url, cc_string* host, cc_string* port) { |
| 170 | /* address can have the form of either "host" or "host:port" */ |
no test coverage detected