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>

Jeff King committed May 22, 2014 at 05:36 UTC c553fd1c1ef76688b6200e66a825b530b0b02140
1 file changed +3
http.c
+3
@@ -978,6 +978,9 @@ static void extract_content_type(struct strbuf *raw, struct strbuf *type,
978 while (*p && !isspace(*p))
979 p++;
980 }
981 +
982 + if (!charset->len && starts_with(type->buf, "text/"))
983 + strbuf_addstr(charset, "ISO-8859-1");
984 }
985
986 /* http_request() targets */