Closed orzen closed 1 year ago
git2-rs is just a thin wrapper around the libgit2 library. This is probably an issue for their issue tracker at https://github.com/libgit2/libgit2/issues. Per this comment, I don't believe they will be supporting the dumb protocol.
Hi,
I am experiencing the following error when I try to clone a repo over HTTPS using git2-rs
0.16.1
.'https://git.openembedded.org/meta-openembedded': invalid content-type: 'text/plain; charset=UTF-8'; class=Http (34)
git2-rs seems to be validating the content type and rejecting
text/plain
.text/plain
from my understanding should be the default content-type, according to git-scm, for "dumb" servers (seehttps://www.git-scm.com/docs/http-protocol
). It looks like git2-rs only accepts headers containing content-typeapplication/x-git-*
from what I can see ingit2-curl/src/lib.rs:165
.This brings me to the question if git2-rs mainly supports "smart" protocol or if it's a bug?
I've been using a customized version of the official clone example for my testing, found here
https://github.com/rust-lang/git2-rs/blob/master/examples/clone.rs
and the modified version can be found herehttps://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=b3cf6b2bf07b3e9b58935a4587adc841
.Thanks in advance
/orzen