mirror of
https://github.com/rkd77/elinks.git
synced 2025-02-02 15:09:23 -05:00
[xml] Do not override all headers
I have no better idea how to preserve headers and set utf-8.
This commit is contained in:
parent
f56b953d4b
commit
a5c6adb7db
@ -287,7 +287,18 @@ render_xhtml_document(struct cache_entry *cached, struct document *document, str
|
|||||||
|
|
||||||
if (!init_string(&head)) return;
|
if (!init_string(&head)) return;
|
||||||
|
|
||||||
|
bool add_to_head = true;
|
||||||
|
if (cached->head) {
|
||||||
|
if (!strncmp(cached->head, "\r\nContent-Type: text/html; charset=utf-8\r\n",
|
||||||
|
sizeof("\r\nContent-Type: text/html; charset=utf-8\r\n") - 1)) {
|
||||||
|
add_to_head = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (add_to_head) {
|
||||||
add_to_string(&head, "\r\nContent-Type: text/html; charset=utf-8\r\n");
|
add_to_string(&head, "\r\nContent-Type: text/html; charset=utf-8\r\n");
|
||||||
|
if (cached->head) add_to_string(&head, cached->head);
|
||||||
|
}
|
||||||
|
|
||||||
xmlpp::Document *doc = document->dom;
|
xmlpp::Document *doc = document->dom;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user