diff --git a/src/transports/http.c b/src/transports/http.c index 1d0bbd64e..f33cad7ea 100644 --- a/src/transports/http.c +++ b/src/transports/http.c @@ -170,8 +170,10 @@ static int on_headers_complete(http_parser *parser) if (git_buf_oom(buf)) return t->parse_error = -1; - if (strcmp(t->content_type, git_buf_cstr(buf))) + if (strcmp(t->content_type, git_buf_cstr(buf))) { + giterr_set(GITERR_NET, "Invalid content-type: %s", t->content_type); return t->parse_error = -1; + } git_buf_clear(buf); return 0;