mirror of
https://gitlab.com/TheOneWithTheBraid/dart_pkpass.git
synced 2025-07-05 12:58:47 +00:00
fix: handle trailing slash in web service
Signed-off-by: The one with the braid <info@braid.business>
This commit is contained in:
parent
8e28630523
commit
08bfebb09e
1 changed files with 4 additions and 0 deletions
|
@ -21,6 +21,10 @@ class PassWebService {
|
||||||
String? webServiceURL,
|
String? webServiceURL,
|
||||||
}) {
|
}) {
|
||||||
if (authenticationToken == null || webServiceURL == null) return null;
|
if (authenticationToken == null || webServiceURL == null) return null;
|
||||||
|
// normalize the end of the URL
|
||||||
|
if (webServiceURL.endsWith('/')) {
|
||||||
|
webServiceURL = webServiceURL.substring(0, webServiceURL.length - 1);
|
||||||
|
}
|
||||||
final uri = Uri.tryParse(webServiceURL);
|
final uri = Uri.tryParse(webServiceURL);
|
||||||
if (uri == null || uri.scheme != 'https') return null;
|
if (uri == null || uri.scheme != 'https') return null;
|
||||||
return PassWebService(
|
return PassWebService(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue