From 6c4b288961f8577d7a395fc596114b7ece129767 Mon Sep 17 00:00:00 2001 From: Tatsuya Yamaguchi Date: Wed, 1 Mar 2023 10:42:14 +0900 Subject: [PATCH] GMapProvider: add Empty check for RefererUrl --- ExtLibs/GMap.NET.Core/GMap.NET.MapProviders/GMapProvider.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ExtLibs/GMap.NET.Core/GMap.NET.MapProviders/GMapProvider.cs b/ExtLibs/GMap.NET.Core/GMap.NET.MapProviders/GMapProvider.cs index 578c87537d..61bef78e5e 100644 --- a/ExtLibs/GMap.NET.Core/GMap.NET.MapProviders/GMapProvider.cs +++ b/ExtLibs/GMap.NET.Core/GMap.NET.MapProviders/GMapProvider.cs @@ -402,7 +402,8 @@ protected PureImage GetTileImageUsingHttp(string url) { request.Headers.Add("User-Agent", UserAgent); request.Headers.Add("Accept", requestAccept); - request.Headers.Add("Referer", RefererUrl); + if (!string.IsNullOrEmpty(RefererUrl)) + request.Headers.Add("Referer", RefererUrl); MemoryStream data = Task.Run(async () => {