Commit ff830366 by Philip Kelley

Http: Set an error for invalid content-type

parent e068f2bb
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment