X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=client%2Fclient.c;h=619f963cf8c188a4ed9c7d8a6ce011c8816fed36;hp=769c1c5b699d2b2c07f378c08ec58c5018308d9d;hb=1e49cc7bdcdeb5cb9e7b2e709c5322acccec90df;hpb=0bfb420c37acbbdbf44d24fe7c121fdf630190b9 diff --git a/client/client.c b/client/client.c index 769c1c5..619f963 100644 --- a/client/client.c +++ b/client/client.c @@ -2,7 +2,7 @@ * Copyright (C) 1995-2007, Index Data ApS * See the file LICENSE for details. * - * $Id: client.c,v 1.338 2007-05-08 08:22:35 adam Exp $ + * $Id: client.c,v 1.339 2007-05-23 11:54:46 adam Exp $ */ /** \file client.c * \brief yaz-client program @@ -3820,11 +3820,11 @@ static void handle_srw_scan_response(Z_SRW_scanResponse *res) static void http_response(Z_HTTP_Response *hres) { int ret = -1; - const char *content_type = z_HTTP_header_lookup(hres->headers, - "Content-Type"); const char *connection_head = z_HTTP_header_lookup(hres->headers, "Connection"); - if (content_type && !yaz_strcmp_del("text/xml", content_type, "; ")) + if (!yaz_srw_check_content_type(hres)) + printf("Content type does not appear to be XML"); + else { Z_SOAP *soap_package = 0; ODR o = odr_createmem(ODR_DECODE);