fix(rustup): deal with rustc lifetime issue

Related to #109
This commit is contained in:
Sebastian Thiel
2015-05-11 10:56:36 +02:00
parent 5e5f0dcc66
commit ee84fefb4a

View File

@@ -666,12 +666,14 @@ impl<'a, A> ResumableUploadHelper<'a, A>
if self.delegate.cancel_chunk_upload(&range_header) {
return None
}
match self.client.post(self.url)
.header(range_header)
.header(ContentType(self.media_type.clone()))
.header(UserAgent(self.user_agent.to_string()))
.body(&mut section_reader)
.send() {
// workaround https://github.com/rust-lang/rust/issues/22252
let res = self.client.post(self.url)
.header(range_header)
.header(ContentType(self.media_type.clone()))
.header(UserAgent(self.user_agent.to_string()))
.body(&mut section_reader)
.send();
match res {
Ok(mut res) => {
if res.status == StatusCode::PermanentRedirect {
continue