- switch(gdu->which)
- {
- case Z_GDU_Z3950:
- // std::cout << "Got PDU. Sending init response\n";
- Z_APDU *apdu = zget_APDU(odr, Z_APDU_initResponse);
-
- apdu->u.initResponse->implementationName = "YP2/YAZ";
-
- package.response() = apdu;
- break;
- case Z_GDU_HTTP_Request:
- Z_GDU *gdu = z_get_HTTP_Response(odr, 200);
- Z_HTTP_Response *http_res = gdu->u.HTTP_Response;
-
- z_HTTP_header_add(odr, &http_res->headers,
- "Content-Type", "text/plain");
-
- http_res->content_buf =
- odr_strdup(odr, "Welcome to YP2");
- http_res->content_len = strlen(http_res->content_buf);
-
- package.response() = gdu;
- break;
- default:
- break;
- }
+ Z_GDU *gdu = z_get_HTTP_Response(odr, 200);
+ Z_HTTP_Response *http_res = gdu->u.HTTP_Response;
+
+ z_HTTP_header_add(odr, &http_res->headers,
+ "Content-Type", "text/plain");
+
+ http_res->content_buf =
+ odr_strdup(odr, "Welcome to YP2");
+ http_res->content_len = strlen(http_res->content_buf);
+
+ package.response() = gdu;