diff options
author | Jeff King <peff@peff.net> | 2014-05-22 05:36:12 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-05-27 09:59:22 -0700 |
commit | c553fd1c1ef76688b6200e66a825b530b0b02140 (patch) | |
tree | 47fa0f751549ddb1944bb5b9908f784bc84b760c /http.c | |
parent | fc1b774c72990f0ff92370316412b19fd72baa77 (diff) | |
download | git-c553fd1c1ef76688b6200e66a825b530b0b02140.tar.gz |
http: default text charset to iso-8859-1jk/http-errors
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>
Diffstat (limited to 'http.c')
-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 */ |