+void z_HTTP_header_add_content_type(ODR o, Z_HTTP_Header **hp,
+ const char *content_type,
+ const char *charset)
+{
+ const char *l = "Content-Type";
+ if (charset)
+ {
+ char *ctype = odr_malloc(o, strlen(content_type)+strlen(charset) + 15);
+ sprintf(ctype, "%s; charset=%s", content_type, charset);
+ z_HTTP_header_add(o, hp, l, ctype);
+ }
+ else
+ z_HTTP_header_add(o, hp, l, content_type);
+
+}
+