Chunked encoding parser

This commit is contained in:
Tomasz Drwięga
2016-08-31 10:43:55 +02:00
parent 2a549386a6
commit bff847b90c
9 changed files with 355 additions and 24 deletions

View File

@@ -33,7 +33,9 @@ pub struct GithubApp {
impl GithubApp {
pub fn url(&self) -> String {
format!("https://github.com/{}/{}/archive/{}.zip", self.account, self.repo, self.commit.to_hex())
// Since https fetcher doesn't support redirections we use direct link
// format!("https://github.com/{}/{}/archive/{}.zip", self.account, self.repo, self.commit.to_hex())
format!("https://codeload.github.com/{}/{}/zip/{}", self.account, self.repo, self.commit.to_hex())
}
fn commit(bytes: &[u8]) -> Option<[u8;COMMIT_LEN]> {