mirror of
https://git.proxmox.com/git/libgit2
synced 2025-08-11 19:58:02 +00:00
Http: Set an error for invalid content-type
This commit is contained in:
parent
e068f2bb71
commit
ff830366ea
@ -170,8 +170,10 @@ static int on_headers_complete(http_parser *parser)
|
|||||||
if (git_buf_oom(buf))
|
if (git_buf_oom(buf))
|
||||||
return t->parse_error = -1;
|
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;
|
return t->parse_error = -1;
|
||||||
|
}
|
||||||
|
|
||||||
git_buf_clear(buf);
|
git_buf_clear(buf);
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user