From 292dd2f34f04a2376c3d44990111d4a0fc2c400e Mon Sep 17 00:00:00 2001 From: Lewin Bormann Date: Wed, 21 Sep 2016 09:49:01 +0200 Subject: [PATCH] fix(template): URL-encoding '/' in URLs is not accepted by Google APIs. --- src/mako/api/lib/mbuild.mako | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mako/api/lib/mbuild.mako b/src/mako/api/lib/mbuild.mako index b8ee0d8fd10..00fb79ce6d9 100644 --- a/src/mako/api/lib/mbuild.mako +++ b/src/mako/api/lib/mbuild.mako @@ -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}; @@ -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});