http_request: reset "type" strbuf before adding
authorJeff King <redacted>
Wed, 6 Feb 2013 10:39:52 +0000 (05:39 -0500)
committerJunio C Hamano <redacted>
Wed, 6 Feb 2013 15:50:56 +0000 (07:50 -0800)
commit3443db51a0f2a43061d4badc6a0065672386eae5
tree7f5965d57f00c7c472db6513df0204a0915028c9
parentaf3aec4469f91dcd34d60706a1addfedbb84ece5
http_request: reset "type" strbuf before adding

Callers may pass us a strbuf which we use to record the
content-type of the response. However, we simply appended to
it rather than overwriting its contents, meaning that cruft
in the strbuf gave us a bogus type. E.g., the multiple
requests triggered by http_request could yield a type like
"text/plainapplication/x-git-receive-pack-advertisement".

Reported-by: Michael Schubert <redacted>
Signed-off-by: Jeff King <redacted>
Signed-off-by: Junio C Hamano <redacted>
http.c
git clone https://git.99rst.org/PROJECT