- Z_HTTP_Response *res = 0;
- const char *location = 0;
- Z_GDU *gdu = get_HTTP_Request_url(out, uri);
- yaz_log(YLOG_LOG, "GET %s", uri);
- gdu->u.HTTP_Request->method = odr_strdup(out, "GET");
- if (username && password)
- {
- z_HTTP_header_add_basic_auth(out, &gdu->u.HTTP_Request->headers,
- wrbuf_cstr(username),
- wrbuf_cstr(password));
- }
- z_HTTP_header_add(out, &gdu->u.HTTP_Request->headers, "Accept",
- "application/xml");
- if (!z_GDU(out, &gdu, 0, 0))
- {
- yaz_log(YLOG_WARN, "Can not encode HTTP request URL:%s", uri);
- break;
- }
- void *add;
- COMSTACK conn = cs_create_host(uri, 1, &add);
- if (!conn)
- yaz_log(YLOG_WARN, "Bad address for URL:%s", uri);
- else if (cs_connect(conn, add) < 0)
- yaz_log(YLOG_WARN, "Can not connect to URL:%s", uri);
+ doc = xmlParseMemory(http_response->content_buf,
+ http_response->content_len);
+ if (doc)
+ package.log("zoom", YLOG_LOG, "Torus: %s OK",
+ url_template.c_str());