Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 22 additions & 5 deletions dotnet/src/dotnetframework/GxClasses/Core/GXApplication.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1243,6 +1243,7 @@ public IGxContext UtlClone()
DataStoreUtil.LoadDataStores(ctx);
ctx.SetPhysicalPath(this.GetPhysicalPath());
ctx.SetSession(this.GetSession());
ctx._isSumbited = this.IsSubmited;
if (this.HttpContext != null)
{
ctx.HttpContext = this.HttpContext;
Expand Down Expand Up @@ -1288,22 +1289,38 @@ public bool IsForward()
{
if (_HttpContext != null)
{
#if NETCORE
object callMethodObj;
if (_HttpContext.Items.TryGetValue("gx_webcall_method", out callMethodObj))
{

string callMethod = callMethodObj as string;
if (!string.IsNullOrEmpty(callMethod) && (string.Compare(callMethod, "forward", true) == 0))
{
return true;
}
}
#else
string callMethod = (string)_HttpContext.Items["gx_webcall_method"];
if ((callMethod != null) && (string.Compare(callMethod, "forward", true) == 0))
{
return true;
}
#endif
}
return false;
}

public bool isCrawlerRequest_impl()
{
if (_HttpContext != null && _HttpContext.Request.QueryString.ToString().Contains("_escaped_fragment_"))
{
return true;
}
return false;
string query;
#if NETCORE
QueryString? queryString = (_HttpContext?.Request?.QueryString);
query = queryString.HasValue ? queryString.Value.ToString() : null;
#else
query = _HttpContext?.Request?.QueryString.ToString();
#endif
return !string.IsNullOrEmpty(query) && query.Contains("_escaped_fragment_");
}

public HtmlTextWriter OutputWriter
Expand Down
Loading