Skip to content

Commit b55fb39

Browse files
claudiamurialdoBeta Bot
authored andcommitted
Cherry pick branch 'genexuslabs:fix/IsCrawlerRequest' into beta
1 parent 352bbd6 commit b55fb39

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

dotnet/src/dotnetframework/GxClasses/Core/GXApplication.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1301,11 +1301,8 @@ public bool IsForward()
13011301

13021302
public bool isCrawlerRequest_impl()
13031303
{
1304-
if (_HttpContext != null && _HttpContext.Request.QueryString.ToString().Contains("_escaped_fragment_"))
1305-
{
1306-
return true;
1307-
}
1308-
return false;
1304+
string query = _HttpContext?.Request?.QueryString.ToString();
1305+
return !string.IsNullOrEmpty(query) && query.Contains("_escaped_fragment_");
13091306
}
13101307

13111308
public HtmlTextWriter OutputWriter

0 commit comments

Comments
 (0)