From ee43c59df798a12d811827cfb2bb64aca37d492a Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Tue, 1 Feb 2005 14:43:50 +0000 Subject: [PATCH] Allow text/plain as HTTP Content-Type for SRW HTTP POST. I can't get ab to send text/xml. --- src/srwutil.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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; -- 1.7.10.4