/* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2011 Index Data
+ * Copyright (C) 1995-2013 Index Data
* See the file LICENSE for details.
*/
#if HAVE_CONFIG_H
{
int len = 0;
char *buf = odr_getbuf(odr, &len, 0);
-
+
if (buf)
{
if (len == strlen(expect) && !memcmp(buf, expect, len))
{
Z_SRW_PDU *sr = yaz_srw_get_pdu(odr, Z_SRW_searchRetrieve_request,
"1.2");
-
+
YAZ_CHECK(compare_solr_req(
odr, sr, 0,
"GET Default/select? HTTP/1.1\r\n"
{
Z_SRW_PDU *sr = yaz_srw_get_pdu(odr, Z_SRW_searchRetrieve_request,
"1.2");
-
+
sr->u.request->query_type = Z_SRW_query_type_cql;
sr->u.request->query.cql = "title:solr";
sr->u.request->startRecord = odr_intdup(odr, 3);
{
Z_SRW_PDU *sr = yaz_srw_get_pdu(odr, Z_SRW_searchRetrieve_request,
"1.2");
-
+
sr->u.request->query_type = Z_SRW_query_type_cql;
sr->u.request->query.cql = "title:solr";
sr->u.request->startRecord = odr_intdup(odr, 3);
Z_SRW_PDU *sr_p;
char *http_response = odr_malloc(o, strlen(content) + 300);
- strcpy(http_response,
+ strcpy(http_response,
"HTTP/1.1 200 OK\r\n"
"Last-Modified: Wed, 13 Apr 2011 08:30:59 GMT\r\n"
"ETag: \"MjcyMWE5M2JiNDgwMDAwMFNvbHI=\"\r\n"
Z_SRW_searchRetrieveResponse *response;
YAZ_CHECK(check_response(
- odr,
+ odr,
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
"<response>\n"
"<lst name=\"responseHeader\"><int name=\"status\">0</int>"
YAZ_CHECK(
check_response(
- odr,
+ odr,
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
"<response><lst name=\"responseHeader\">"
"<int name=\"status\">0</int><int name=\"QTime\">2</int>"
"</doc>";
Z_SRW_record *record = response->records;
-
+
YAZ_CHECK(record->recordData_len == strlen(doc) &&
!memcmp(record->recordData_buf, doc, record->recordData_len));
}