Skip to content

Commit 292dd2f

Browse files
committed
fix(template): URL-encoding '/' in URLs is not accepted by Google APIs.
1 parent 4a92a47 commit 292dd2f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/mako/api/lib/mbuild.mako

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ match result {
481481
/// Perform the operation you have build so far.
482482
${action_fn} {
483483
% if URL_ENCODE in special_cases:
484-
use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET};
484+
use url::percent_encoding::{percent_encode, DEFAULT_ENCODE_SET};
485485
% endif
486486
use std::io::{Read, Seek};
487487
use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location};
@@ -632,7 +632,7 @@ else {
632632
}
633633
% if URL_ENCODE in special_cases:
634634
if find_this.as_bytes()[1] == '+' as u8 {
635-
replace_with = percent_encode(replace_with.as_bytes(), FORM_URLENCODED_ENCODE_SET);
635+
replace_with = percent_encode(replace_with.as_bytes(), DEFAULT_ENCODE_SET);
636636
}
637637
% endif
638638
url = url.replace(find_this, ${url_replace_arg});

0 commit comments

Comments
 (0)