diff options
author | Jeff King <peff@peff.net> | 2014-05-22 13:36:12 +0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-05-27 20:59:22 +0400 |
commit | c553fd1c1ef76688b6200e66a825b530b0b02140 (patch) | |
tree | 47fa0f751549ddb1944bb5b9908f784bc84b760c | |
parent | fc1b774c72990f0ff92370316412b19fd72baa77 (diff) |
http: default text charset to iso-8859-1
This is specified by RFC 2616 as the default if no "charset"
parameter is given.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r-- | http.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -978,6 +978,9 @@ static void extract_content_type(struct strbuf *raw, struct strbuf *type, while (*p && !isspace(*p)) p++; } + + if (!charset->len && starts_with(type->buf, "text/")) + strbuf_addstr(charset, "ISO-8859-1"); } /* http_request() targets */ |