Skip to content

Commit 7fe6b30

Browse files
authored
fix: Uri encode platform information (#1196)
1 parent 6a5be51 commit 7fe6b30

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

packages/supabase/lib/src/constants.dart

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,11 @@ class Constants {
1414

1515
static final Map<String, String> defaultHeaders = {
1616
'X-Client-Info': 'supabase-dart/$version',
17-
if (platform != null) 'X-Supabase-Client-Platform': platform!,
17+
if (platform != null)
18+
'X-Supabase-Client-Platform':
19+
Uri.encodeFull(platform!).replaceAll("%20", " "),
1820
if (platformVersion != null)
19-
'X-Supabase-Client-Platform-Version': platformVersion!,
21+
'X-Supabase-Client-Platform-Version':
22+
Uri.encodeFull(platformVersion!).replaceAll("%20", " "),
2023
};
2124
}

0 commit comments

Comments
 (0)