X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Fsrwutil.c;h=c476d1105b23a7a2bcc0088dd6673a93a2b8113e;hp=fc060e378e9af73e0cfe8056e769ae01a239fb9e;hb=84d7b06c13daa609e93f353e655c4b02f936d65c;hpb=4c176312acdc3444c9afc820f76a393e64668e52 diff --git a/src/srwutil.c b/src/srwutil.c index fc060e3..c476d11 100644 --- a/src/srwutil.c +++ b/src/srwutil.c @@ -2,13 +2,14 @@ * Copyright (C) 1995-2005, Index Data ApS * See the file LICENSE for details. * - * $Id: srwutil.c,v 1.23 2005-01-15 19:47:14 adam Exp $ + * $Id: srwutil.c,v 1.27 2005-02-01 14:43:50 adam Exp $ */ /** * \file srwutil.c * \brief Implements SRW/SRU utilities. */ +#include #include #include @@ -167,7 +168,9 @@ int yaz_srw_decode(Z_HTTP_Request *hreq, Z_SRW_PDU **srw_pdu, { const char *content_type = z_HTTP_header_lookup(hreq->headers, "Content-Type"); - if (content_type && !yaz_strcmp_del("text/xml", content_type, "; ")) + if (content_type && + (!yaz_strcmp_del("text/xml", content_type, "; ") || + !yaz_strcmp_del("text/plain", content_type, "; "))) { char *db = "Default"; const char *p0 = hreq->path, *p1; @@ -252,6 +255,7 @@ int yaz_sru_decode(Z_HTTP_Request *hreq, Z_SRW_PDU **srw_pdu, { char *db = "Default"; const char *p0 = hreq->path, *p1; +#if HAVE_XML2 const char *operation = 0; char *version = 0; char *query = 0; @@ -268,6 +272,7 @@ int yaz_sru_decode(Z_HTTP_Request *hreq, Z_SRW_PDU **srw_pdu, char *maximumTerms = 0; char *responsePosition = 0; char *extraRequestData = 0; +#endif char **uri_name; char **uri_val;