+ if (cp0 && cp1)
+ {
+ char *h = odr_strdupn(odr, cp0, cp1 - cp0);
+ z_HTTP_header_add(odr, &p->u.HTTP_Request->headers, "Host", h);
+ }
+
+ if (!args)
+ {
+ if (*cp1)
+ args = cp1 + 1;
+ else
+ args = "";
+ }
+ p->u.HTTP_Request->path = odr_malloc(odr, cp1 - uri + strlen(args) + 2);
+ if (use_full_uri)
+ {
+ memcpy(p->u.HTTP_Request->path, uri, cp1 - uri);
+ strcpy(p->u.HTTP_Request->path + (cp1 - uri), "/");
+ }
+ else
+ strcpy(p->u.HTTP_Request->path, "/");
+ strcat(p->u.HTTP_Request->path, args);
+ return p;
+}
+
+Z_GDU *z_get_HTTP_Response_server(ODR o, int code, const char *details,
+ const char *server, const char *server_url)