builtin/help.c: add --guide option
[gitweb.git] / http.c
diff --git a/http.c b/http.c
index d868d8b3d97cc1a430e1680f2bc5f780b5e66a84..8803c70825ac8aefb619b6c56d6015573eb5d227 100644 (file)
--- a/http.c
+++ b/http.c
@@ -5,6 +5,7 @@
 #include "url.h"
 #include "credential.h"
 #include "version.h"
+#include "pkt-line.h"
 
 int active_requests;
 int http_is_verbose;
@@ -841,6 +842,7 @@ static int http_request(const char *url, struct strbuf *type,
 
        if (type) {
                char *t;
+               strbuf_reset(type);
                curl_easy_getinfo(slot->curl, CURLINFO_CONTENT_TYPE, &t);
                if (t)
                        strbuf_addstr(type, t);