From: Adam Dickmeiss Date: Tue, 1 Feb 2005 14:43:50 +0000 (+0000) Subject: Allow text/plain as HTTP Content-Type for SRW HTTP POST. I can't X-Git-Tag: YAZ.2.0.34~27 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=ee43c59df798a12d811827cfb2bb64aca37d492a;p=yaz-moved-to-github.git Allow text/plain as HTTP Content-Type for SRW HTTP POST. I can't get ab to send text/xml. --- diff --git a/src/srwutil.c b/src/srwutil.c index ae47de9..c476d11 100644 --- a/src/srwutil.c +++ b/src/srwutil.c @@ -2,7 +2,7 @@ * Copyright (C) 1995-2005, Index Data ApS * See the file LICENSE for details. * - * $Id: srwutil.c,v 1.26 2005-01-17 12:53:04 adam Exp $ + * $Id: srwutil.c,v 1.27 2005-02-01 14:43:50 adam Exp $ */ /** * \file srwutil.c @@ -168,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;