Skip to content

Commit ca7e88b

Browse files
committed
API.Utility.GetUserAgent method fixed when HttpContext.Current is null and a blank string is returned instead
1 parent 27daff6 commit ca7e88b

File tree

3 files changed

+1
-1
lines changed

3 files changed

+1
-1
lines changed

rls/API.Library.dll

0 Bytes
Binary file not shown.

rls/API.Library.pdb

0 Bytes
Binary file not shown.

src/API.Library/Entities/Utility.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ private static string GetIP()
150150
/// </summary>
151151
private static string GetUserAgent()
152152
{
153-
return HttpContext.Current.Request.UserAgent.ToString();
153+
return HttpContext.Current == null ? "" : HttpContext.Current.Request.UserAgent.ToString();
154154
}
155155

156156
/// <summary>

0 commit comments

Comments
 (0)