Skip to content

Commit

Permalink
fix(template): URL-encoding '/' in URLs is not accepted by Google APIs.
Browse files Browse the repository at this point in the history
  • Loading branch information
dermesser committed Sep 21, 2016
1 parent 4a92a47 commit 292dd2f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/mako/api/lib/mbuild.mako
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ match result {
/// Perform the operation you have build so far.
${action_fn} {
% if URL_ENCODE in special_cases:
use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET};
use url::percent_encoding::{percent_encode, DEFAULT_ENCODE_SET};
% endif
use std::io::{Read, Seek};
use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location};
Expand Down Expand Up @@ -632,7 +632,7 @@ else {
}
% if URL_ENCODE in special_cases:
if find_this.as_bytes()[1] == '+' as u8 {
replace_with = percent_encode(replace_with.as_bytes(), FORM_URLENCODED_ENCODE_SET);
replace_with = percent_encode(replace_with.as_bytes(), DEFAULT_ENCODE_SET);
}
% endif
url = url.replace(find_this, ${url_replace_arg});
Expand Down

0 comments on commit 292dd2f

Please sign in to comment.