From 4e59e24359a9be682c642ce16b4c983332ab0cc2 Mon Sep 17 00:00:00 2001 From: Zhihui Tian Date: Wed, 27 Feb 2019 13:24:43 +0900 Subject: [PATCH 1/2] Add port to support the server doesn't using 80. --- lib/sentry.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/sentry.dart b/lib/sentry.dart index aa46678652..75d3df525f 100644 --- a/lib/sentry.dart +++ b/lib/sentry.dart @@ -161,7 +161,7 @@ class SentryClient { @visibleForTesting String get postUri => - '${dsnUri.scheme}://${dsnUri.host}/api/$projectId/store/'; + '${dsnUri.scheme}://${dsnUri.host}:${dsnUri.port}/api/$projectId/store/'; /// Reports an [event] to Sentry.io. Future capture( From 002acf30d1d9b08684f81b65fe969cda71cb1f34 Mon Sep 17 00:00:00 2001 From: Zhihui Tian Date: Wed, 27 Feb 2019 19:02:15 +0900 Subject: [PATCH 2/2] Fix unit test fails --- lib/sentry.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/sentry.dart b/lib/sentry.dart index 75d3df525f..b6eef96b4c 100644 --- a/lib/sentry.dart +++ b/lib/sentry.dart @@ -161,7 +161,7 @@ class SentryClient { @visibleForTesting String get postUri => - '${dsnUri.scheme}://${dsnUri.host}:${dsnUri.port}/api/$projectId/store/'; + '${dsnUri.scheme}://${dsnUri.host}${dsnUri.port != 80 && dsnUri.port != 443 ? ':' + dsnUri.port.toString() : ''}/api/$projectId/store/'; /// Reports an [event] to Sentry.io. Future capture(