X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=client%2Fclient.c;h=a02c99c0c54ec2eddb2ab61db876f5edb779fad3;hp=841ba069d83f8fa526e21af780289c83f28c3d4f;hb=9b9e5015dba09e7480f09351cfccdfafd99b2d30;hpb=2f405fd826dd2f2e837fe3557274fdc2c08d2f02 diff --git a/client/client.c b/client/client.c index 841ba06..a02c99c 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.215 2003-12-18 17:02:24 mike Exp $ */ #include @@ -117,7 +117,7 @@ typedef enum { static QueryType queryType = QueryType_Prefix; static CCL_bibset bibset; /* CCL bibset handle */ -static cql_transform_t cqltrans; /* CQL qualifier-set handle */ +static cql_transform_t cqltrans; /* CQL context-set handle */ #if HAVE_READLINE_COMPLETION_OVER @@ -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