X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fsrwutil.c;h=b2fc44d3345c94fb30d372af46b0319ac977281b;hb=455798a3154b5c08c872ca0fb90607ddea575038;hp=168d7b5b2b2e2d9dbdce84d04dd19a75d0890e44;hpb=fb6d99a0c7e07d9cc4a315c447deaf6564a85505;p=yaz-moved-to-github.git diff --git a/src/srwutil.c b/src/srwutil.c index 168d7b5..b2fc44d 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.28 2005-06-25 15:46:05 adam Exp $ + * $Id: srwutil.c,v 1.29 2005-08-22 20:34:21 adam Exp $ */ /** * \file srwutil.c @@ -251,7 +251,8 @@ int yaz_sru_decode(Z_HTTP_Request *hreq, Z_SRW_PDU **srw_pdu, {0, 0, 0} }; #endif - if (!strcmp(hreq->method, "GET")) + if (!strcmp(hreq->method, "GET") || + !strcmp(hreq->method, "POST") ) { char *db = "Default"; const char *p0 = hreq->path, *p1; @@ -289,6 +290,8 @@ int yaz_sru_decode(Z_HTTP_Request *hreq, Z_SRW_PDU **srw_pdu, memcpy (db, p0, p1 - p0); db[p1 - p0] = '\0'; } + if (!strcmp(hreq->method, "POST")) + p1 = hreq->content_buf; yaz_uri_array(p1, decode, &uri_name, &uri_val); #if HAVE_XML2 if (uri_name)