X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fsrwutil.c;h=1de920db0e078305bcb5879c7b5fee713f61f45e;hb=fcb40f9ed16ce6a8ef86997890057af0f7692377;hp=723ffc3cd89833ffcf4b132be425bbc233854369;hpb=20fefe985756693f69f2fedef8deaeb686034b8d;p=yaz-moved-to-github.git diff --git a/src/srwutil.c b/src/srwutil.c index 723ffc3..1de920d 100644 --- a/src/srwutil.c +++ b/src/srwutil.c @@ -97,6 +97,8 @@ int yaz_srw_check_content_type(Z_HTTP_Response *hres) return 1; if (!yaz_strcmp_del("application/xml", content_type, "; ")) return 1; + if (!yaz_strcmp_del("application/sru+xml", content_type, "; ")) + return 1; } return 0; } @@ -416,7 +418,7 @@ int yaz_sru_decode(Z_HTTP_Request *hreq, Z_SRW_PDU **srw_pdu, p1 = p0 + strlen(p0); if (p1 != p0) db = yaz_decode_sru_dbpath_odr(decode, p0, p1 - p0); - if (!strcmp(hreq->method, "POST")) + if (!strcmp(hreq->method, "POST") && hreq->content_buf) p1 = hreq->content_buf; yaz_uri_to_array(p1, decode, &uri_name, &uri_val); #if YAZ_HAVE_XML2