[evolution-data-server] e_soup_session_util_normalize_uri_path: Normalize path only when not encoded
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] e_soup_session_util_normalize_uri_path: Normalize path only when not encoded
- Date: Thu, 7 Jul 2022 16:22:12 +0000 (UTC)
commit 8d42a69a5b2d063fe3c7c4b613f7dba037ab93f9
Author: Milan Crha <mcrha redhat com>
Date: Thu Jul 7 18:07:23 2022 +0200
e_soup_session_util_normalize_uri_path: Normalize path only when not encoded
When the GUri has set that the path is already encoded then do not re-encode it.
src/libedataserver/e-soup-session.c | 7 +++++++
1 file changed, 7 insertions(+)
---
diff --git a/src/libedataserver/e-soup-session.c b/src/libedataserver/e-soup-session.c
index 2254217fa..a004e2106 100644
--- a/src/libedataserver/e-soup-session.c
+++ b/src/libedataserver/e-soup-session.c
@@ -1649,11 +1649,18 @@ e_soup_session_util_normalize_uri_path (GUri *uri)
const gchar *path;
gchar **parts, *tmp;
GUri *nuri = NULL;
+ GUriFlags flags;
gint ii;
if (!uri)
return NULL;
+ flags = g_uri_get_flags (uri);
+
+ if ((flags & G_URI_FLAGS_ENCODED) != 0 ||
+ (flags & G_URI_FLAGS_ENCODED_PATH) != 0)
+ return NULL;
+
path = g_uri_get_path (uri);
if (!*path || g_strcmp0 (path, "/") == 0)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]