Commit 180069c5 authored by Carlos Garcia Campos's avatar Carlos Garcia Campos
Browse files

session: never try to reuse a connection in IN_USE state in http/1.x

parent ab457547
Pipeline #285127 passed with stages
in 5 minutes and 5 seconds
......@@ -1794,16 +1794,18 @@ get_connection_for_host (SoupSession *session,
force_http1 = TRUE;
for (conns = host->connections; conns; conns = conns->next) {
SoupHTTPVersion http_version;
conn = conns->data;
if (force_http1 && soup_connection_get_negotiated_protocol (conn) > SOUP_HTTP_1_1)
http_version = soup_connection_get_negotiated_protocol (conn);
if (force_http1 && http_version > SOUP_HTTP_1_1)
continue;
switch (soup_connection_get_state (conn)) {
case SOUP_CONNECTION_IN_USE:
if (!need_new_connection && soup_connection_is_reusable (conn)) {
if (!need_new_connection && http_version == SOUP_HTTP_2_0 && soup_connection_is_reusable (conn))
return conn;
}
break;
case SOUP_CONNECTION_IDLE:
if (!need_new_connection && soup_connection_is_idle_open (conn))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment