X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=client%2Fclient.c;h=4fddacff766860e9050608531c602fa07421d60c;hb=9c0500654d398012434385e07f44aa2a7545133b;hp=841ba069d83f8fa526e21af780289c83f28c3d4f;hpb=2f405fd826dd2f2e837fe3557274fdc2c08d2f02;p=yaz-moved-to-github.git diff --git a/client/client.c b/client/client.c index 841ba06..4fddacf 100644 --- a/client/client.c +++ b/client/client.c @@ -2,7 +2,7 @@ * Copyright (c) 1995-2003, Index Data * See the file LICENSE for details. * - * $Id: client.c,v 1.213 2003-11-19 19:06:41 adam Exp $ + * $Id: client.c,v 1.214 2003-12-09 17:13:35 adam Exp $ */ #include @@ -3338,17 +3338,20 @@ static void http_response(Z_HTTP_Response *hres) } close_session(); } - if (!strcmp(hres->version, "1.0")) - { - /* HTTP 1.0: only if Keep-Alive we stay alive.. */ - if (!connection_head || strcmp(connection_head, "Keep-Alive")) - close_session(); - } - else + else { - /* HTTP 1.1: only if no close we stay alive .. */ - if (connection_head && !strcmp(connection_head, "close")) - close_session(); + if (!strcmp(hres->version, "1.0")) + { + /* HTTP 1.0: only if Keep-Alive we stay alive.. */ + if (!connection_head || strcmp(connection_head, "Keep-Alive")) + close_session(); + } + else + { + /* HTTP 1.1: only if no close we stay alive .. */ + if (connection_head && !strcmp(connection_head, "close")) + close_session(); + } } } #endif