http_request: factor out curlinfo_strbuf
commit132b70a2ed6d952e8142981474b41884ff93b780
authorJeff King <peff@peff.net>
Sat, 28 Sep 2013 08:31:11 +0000 (28 04:31 -0400)
committerJonathan Nieder <jrnieder@gmail.com>
Mon, 30 Sep 2013 20:04:45 +0000 (30 13:04 -0700)
tree146fd3bf421de4fdf66c3fcadbcb19b264f3b44f
parent3d1fb769b26dbf278a0ef0cf7427aac86a161bb0
http_request: factor out curlinfo_strbuf

When we retrieve the content-type of an http response, curl
gives us a pointer to internal storage, which we then copy
into a strbuf. Let's factor out the get-and-copy routine,
which can be used for getting other curl info.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
http.c