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>
This commit is contained in:
parent
fc1b774c72
commit
c553fd1c1e
3
http.c
3
http.c
@ -978,6 +978,9 @@ static void extract_content_type(struct strbuf *raw, struct strbuf *type,
|
|||||||
while (*p && !isspace(*p))
|
while (*p && !isspace(*p))
|
||||||
p++;
|
p++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!charset->len && starts_with(type->buf, "text/"))
|
||||||
|
strbuf_addstr(charset, "ISO-8859-1");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* http_request() targets */
|
/* http_request() targets */
|
||||||
|
Loading…
Reference in New Issue
Block a user