File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ name = "${util.program_name()}"
2626% endif
2727
2828[dependencies]
29- hyper = " >= 0.6.0 "
29+ hyper = " >= 0.6.4 "
3030# # Must match the one hyper uses, otherwise there are duplicate similarly named `Mime` structs
3131mime = " 0.0.12"
3232serde = " >= 0.4.1"
Original file line number Diff line number Diff line change @@ -703,15 +703,12 @@ else {
703703 if should_ask_dlg_for_url && (upload_url = dlg.upload_url()) == () && upload_url.is_some() {
704704 should_ask_dlg_for_url = false;
705705 upload_url_from_server = false;
706- let mut response = hyper::client::Response::new(Box::new(cmn::DummyNetworkStream));
707- match response {
708- Ok(ref mut res) => {
709- res.status = hyper::status::StatusCode::Ok;
710- res.headers.set(Location(upload_url.as_ref().unwrap().clone()))
711- }
712- _ => unreachable!(),
713- }
714- response
706+ let url = upload_url.as_ref().and_then(|s| Some(hyper::Url::parse(s).unwrap())).unwrap();
707+ hyper::client::Response::new(url, Box::new(cmn::DummyNetworkStream)).and_then(|mut res| {
708+ res.status = hyper::status::StatusCode::Ok;
709+ res.headers.set(Location(upload_url.as_ref().unwrap().clone()));
710+ Ok(res)
711+ })
715712 } else {
716713 % endif
717714<%block filter =" indent_by(resumable_media_param and 4 or 0)" > \
You can’t perform that action at this time.
0 commit comments