+ if (!gdu_resp || gdu_resp->which != Z_GDU_HTTP_Response)
+ {
+ yaz_log(YLOG_LOG, "sparql: no HTTP response");
+ apdu_res = odr.create_searchResponse(apdu_req,
+ YAZ_BIB1_TEMPORARY_SYSTEM_ERROR,
+ "no HTTP response from backend");
+ }
+ else if (gdu_resp->u.HTTP_Response->code != 200)
+ {
+ mp::wrbuf w;
+
+ wrbuf_printf(w, "sparql: HTTP error %d from backend",
+ gdu_resp->u.HTTP_Response->code);
+ apdu_res = odr.create_searchResponse(apdu_req,
+ YAZ_BIB1_TEMPORARY_SYSTEM_ERROR,
+ w.c_str());
+ }
+ else