Skip to content
Merged
Show file tree
Hide file tree
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
12 changes: 6 additions & 6 deletions dotnet/src/dotnetframework/GxClasses/Helpers/HttpHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ static void CorsValuesToHeaders(OutgoingWebResponseContext httpResponse, string[
if (!string.IsNullOrEmpty(origin))
httpResponse.Headers[HeaderNames.AccessControlAllowOrigin] = origin;
}
httpResponse.Headers[HeaderNames.AccessControlAllowCredentials] = true.ToString();
httpResponse.Headers[HeaderNames.AccessControlAllowCredentials] = bool.TrueString;

if (!string.IsNullOrEmpty(requestHeaders))
httpResponse.Headers[HeaderNames.AccessControlAllowHeaders] = StringUtil.Sanitize(requestHeaders, StringUtil.HttpHeaderWhiteList);
Expand All @@ -276,7 +276,7 @@ static void CorsValuesToHeaders(HttpResponseMessageProperty httpResponse, string
if (!string.IsNullOrEmpty(origin))
httpResponse.Headers[HeaderNames.AccessControlAllowOrigin] = origin;
}
httpResponse.Headers[HeaderNames.AccessControlAllowCredentials] = true.ToString();
httpResponse.Headers[HeaderNames.AccessControlAllowCredentials] = bool.TrueString;

if (!string.IsNullOrEmpty(requestHeaders))
httpResponse.Headers[HeaderNames.AccessControlAllowHeaders] = StringUtil.Sanitize(requestHeaders, StringUtil.HttpHeaderWhiteList);
Expand All @@ -296,7 +296,7 @@ static void CorsValuesToHeaders(HttpResponse httpResponse, string[] origins, str
if (!string.IsNullOrEmpty(origin))
httpResponse.AppendHeader(HeaderNames.AccessControlAllowOrigin, origin);
}
httpResponse.AppendHeader(HeaderNames.AccessControlAllowCredentials, true.ToString());
httpResponse.AppendHeader(HeaderNames.AccessControlAllowCredentials, bool.TrueString);

if (!string.IsNullOrEmpty(requestHeaders))
httpResponse.AppendHeader(HeaderNames.AccessControlAllowHeaders, StringUtil.Sanitize(requestHeaders, StringUtil.HttpHeaderWhiteList));
Expand Down Expand Up @@ -880,18 +880,18 @@ public static void NewSessionCheck(this HttpContext context)
string value = websession.Get<string>(NEWSESSION);
if (string.IsNullOrEmpty(value))
{
websession.Set<string>(NEWSESSION, true.ToString());
websession.Set<string>(NEWSESSION, bool.TrueString);
}
else
{
websession.Set<string>(NEWSESSION, false.ToString());
websession.Set<string>(NEWSESSION, bool.FalseString);
}
}
public static bool IsNewSession(this HttpContext context)
{
GxWebSession websession = new GxWebSession(new HttpSessionState(context.Session));
string value=websession.Get<string>(NEWSESSION);
return string.IsNullOrEmpty(value) || value == true.ToString();
return string.IsNullOrEmpty(value) || value == bool.TrueString;
}
#else
public static bool IsNewSession(this HttpContext context)
Expand Down
2 changes: 1 addition & 1 deletion dotnet/src/dotnetframework/GxClasses/Model/gxproc.cs
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ private void SetRecordCountSupportedHeader()
if (!RecordCountSupported())
{
GXLogging.Debug(log, $"Adding '{RECORD_COUNT_SUPPORTED}' header");
context.SetHeader(RECORD_COUNT_SUPPORTED, false.ToString());
context.SetHeader(RECORD_COUNT_SUPPORTED, bool.FalseString);
}
}

Expand Down
Loading