+
+ if (c->host_port)
+ {
+ const char *cp0 = strstr(c->host_port, "://");
+ const char *cp1 = 0;
+ if (cp0)
+ cp0 = cp0+3;
+ else
+ cp0 = c->host_port;
+
+ cp1 = strchr(cp0, '/');
+ if (!cp1)
+ cp1 = cp0+strlen(cp0);
+
+ if (cp0 && cp1)
+ {
+ char *h = odr_malloc(c->odr_out, cp1 - cp0 + 1);
+ memcpy (h, cp0, cp1 - cp0);
+ h[cp1-cp0] = '\0';
+ z_HTTP_header_add(c->odr_out, &gdu->u.HTTP_Request->headers,
+ "host", h);
+ }
+ }
+
+ strcpy(ctype, "text/xml");
+ if (c->charset && strlen(c->charset) < 20)
+ {
+ strcat(ctype, "; charset=");
+ strcat(ctype, c->charset);
+ }