X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=client%2Fclient.c;h=a02c99c0c54ec2eddb2ab61db876f5edb779fad3;hp=ab8fa032d75ccc6234bf45151a9b6226f305ee45;hb=9b9e5015dba09e7480f09351cfccdfafd99b2d30;hpb=4d16fbc7b32700afd686bbaa51c2253d7f3287ec diff --git a/client/client.c b/client/client.c index ab8fa03..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.212 2003-11-02 17:59:28 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 @@ -2574,7 +2574,9 @@ int send_sortrequest(const char *arg, int newset) void display_term(Z_TermInfo *t) { - if (t->term->which == Z_Term_general) + if (t->displayTerm) + printf("%s", t->displayTerm); + else if (t->term->which == Z_Term_general) { printf("%.*s", t->term->u.general->len, t->term->u.general->buf); sprintf(last_scan_line, "%.*s", t->term->u.general->len, @@ -3336,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